diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-12 09:45:19 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-12 09:45:19 +0000 |
commit | fe8274f858ba00a769db7a68a2aa11b59dce7e58 (patch) | |
tree | 4da23a4e2fd43df61709686207ed5d3d94c478b4 /gcc/simplify-rtx.c | |
parent | 9f28a7ee8ff2cd44964cffaa0e12a87664cf2dba (diff) | |
download | gcc-fe8274f858ba00a769db7a68a2aa11b59dce7e58.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155831 138bc75d-0d04-0410-961f-82ee72b054a4
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 5e384d4e8f4..7c79afbe5fd 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) { |