diff options
author | Jakub Jelinek <jakub@redhat.com> | 2010-01-12 10:45:19 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2010-01-12 10:45:19 +0100 |
commit | 4942b76bf647d2df3dcd9fcadc6fc752ee752028 (patch) | |
tree | 4da23a4e2fd43df61709686207ed5d3d94c478b4 /gcc/simplify-rtx.c | |
parent | 082ab5ff77937fc128fd802fde9d580ca76d71f1 (diff) | |
download | gcc-4942b76bf647d2df3dcd9fcadc6fc752ee752028.zip gcc-4942b76bf647d2df3dcd9fcadc6fc752ee752028.tar.gz gcc-4942b76bf647d2df3dcd9fcadc6fc752ee752028.tar.bz2 |
re PR debug/42662 (invalid rtl sharing found in the insn)
PR debug/42662
* simplify-rtx.c (simplify_relational_operation_1): Avoid invalid rtx
sharing when canonicalizing ({lt,ge}u (plus a b) b).
* gcc.dg/pr42662.c: New test.
From-SVN: r155831
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 5e384d4..7c79afb 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -4046,7 +4046,8 @@ simplify_relational_operation_1 (enum rtx_code code, enum machine_mode mode, && rtx_equal_p (op1, XEXP (op0, 1)) /* Don't recurse "infinitely" for (LTU/GEU (PLUS b b) b). */ && !rtx_equal_p (op1, XEXP (op0, 0))) - return simplify_gen_relational (code, mode, cmp_mode, op0, XEXP (op0, 0)); + return simplify_gen_relational (code, mode, cmp_mode, op0, + copy_rtx (XEXP (op0, 0))); if (op1 == const0_rtx) { |