From b1c92d54c4f880a15084dfdfa1779d59d9736f81 Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Fri, 13 Feb 2009 11:35:47 +0000 Subject: [PATCH] loop-iv.c (implies_p): In the final case, test that operands 0 of the two comparisons match. * loop-iv.c (implies_p): In the final case, test that operands 0 of the two comparisons match. From-SVN: r144152 --- gcc/ChangeLog | 5 +++++ gcc/loop-iv.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index baa3e673a3f..53bb0b0ed3b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-02-13 Bernd Schmidt + + * loop-iv.c (implies_p): In the final case, test that operands 0 + of the two comparisons match. + 2009-02-13 Richard Guenther * configure.ac: Enable LFS. diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c index 3723dbd463a..e8e89bca1eb 100644 --- a/gcc/loop-iv.c +++ b/gcc/loop-iv.c @@ -1556,7 +1556,8 @@ implies_p (rtx a, rtx b) && ((GET_CODE (a) == GT && op1 == constm1_rtx) || INTVAL (op1) >= 0) && GET_CODE (b) == LTU - && GET_CODE (opb1) == CONST_INT) + && GET_CODE (opb1) == CONST_INT + && rtx_equal_p (op0, opb0)) return INTVAL (opb1) < 0; return false;