aboutsummaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2012-10-24 11:13:09 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2012-10-24 11:13:09 +0200
commitbca3cc973b4ec85437b147a8586755f30e1f8366 (patch)
tree53c53bb47a681d284ef94aace31097589baaa6a4 /gcc/cse.c
parent848be0946c097a25e63acea3e16eee11fc41e6c9 (diff)
downloadgcc-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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index b5631f3..af66c37 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -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;