aboutsummaryrefslogtreecommitdiff
path: root/gcc/simplify-rtx.c
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2007-09-10 07:30:16 +0000
committerHans-Peter Nilsson <hp@gcc.gnu.org>2007-09-10 07:30:16 +0000
commitcf369845fd042cc7bd25cb8b824857af6f22f446 (patch)
treed935db8207d63d42c6ee9905193bb02d1356dfd1 /gcc/simplify-rtx.c
parent3b010fe32e4a3dde31344cf518daf0b016da5401 (diff)
downloadgcc-cf369845fd042cc7bd25cb8b824857af6f22f446.zip
gcc-cf369845fd042cc7bd25cb8b824857af6f22f446.tar.gz
gcc-cf369845fd042cc7bd25cb8b824857af6f22f446.tar.bz2
simplify-rtx.c (simplify_relational_operation_1): For recent canonicalization, don't recurse if op1 equals both PLUS arguments.
* simplify-rtx.c (simplify_relational_operation_1): For recent canonicalization, don't recurse if op1 equals both PLUS arguments. From-SVN: r128323
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r--gcc/simplify-rtx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 02f9e2b..329a0ff 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)