diff options
author | Jakub Jelinek <jakub@redhat.com> | 2012-10-24 11:13:09 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2012-10-24 11:13:09 +0200 |
commit | bca3cc973b4ec85437b147a8586755f30e1f8366 (patch) | |
tree | 53c53bb47a681d284ef94aace31097589baaa6a4 /gcc/cse.c | |
parent | 848be0946c097a25e63acea3e16eee11fc41e6c9 (diff) | |
download | gcc-bca3cc973b4ec85437b147a8586755f30e1f8366.zip gcc-bca3cc973b4ec85437b147a8586755f30e1f8366.tar.gz gcc-bca3cc973b4ec85437b147a8586755f30e1f8366.tar.bz2 |
re PR rtl-optimization/55010 (Internal consistency failure : invalid rtl sharing found in the insn)
PR rtl-optimization/55010
* cse.c (fold_rtx) <RTX_COMPARE>: Call copy_rtx on folded_arg{0,1}
before passing it to simplify_relational_operation.
* gcc.dg/pr55010.c: New test.
From-SVN: r192760
Diffstat (limited to 'gcc/cse.c')
-rw-r--r-- | gcc/cse.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -3461,9 +3461,10 @@ fold_rtx (rtx x, rtx insn) } { - rtx op0 = const_arg0 ? const_arg0 : folded_arg0; - rtx op1 = const_arg1 ? const_arg1 : folded_arg1; - new_rtx = simplify_relational_operation (code, mode, mode_arg0, op0, op1); + rtx op0 = const_arg0 ? const_arg0 : copy_rtx (folded_arg0); + rtx op1 = const_arg1 ? const_arg1 : copy_rtx (folded_arg1); + new_rtx = simplify_relational_operation (code, mode, mode_arg0, + op0, op1); } break; |