From cf369845fd042cc7bd25cb8b824857af6f22f446 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Mon, 10 Sep 2007 07:30:16 +0000 Subject: 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 --- gcc/simplify-rtx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc/simplify-rtx.c') 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) -- cgit v1.2.1