diff options
author | hp <hp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-10 07:30:16 +0000 |
---|---|---|
committer | hp <hp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-10 07:30:16 +0000 |
commit | ecd7bb6838c3e158ce1d45ed12b8dda512f368bf (patch) | |
tree | d935db8207d63d42c6ee9905193bb02d1356dfd1 /gcc/simplify-rtx.c | |
parent | 0310b09477b04782405e71a27f94e5b0151cc8f2 (diff) | |
download | gcc-ecd7bb6838c3e158ce1d45ed12b8dda512f368bf.tar.gz |
* simplify-rtx.c (simplify_relational_operation_1): For recent
canonicalization, don't recurse if op1 equals both PLUS arguments.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128323 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 02f9e2b4c36..329a0ff3839 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -3816,7 +3816,9 @@ simplify_relational_operation_1 (enum rtx_code code, enum machine_mode mode, /* Canonicalize (LTU/GEU (PLUS a b) b) as (LTU/GEU (PLUS a b) a). */ if ((code == LTU || code == GEU) && GET_CODE (op0) == PLUS - && rtx_equal_p (op1, XEXP (op0, 1))) + && 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)); if (op1 == const0_rtx) |