From a6d46489b110dbb6285e9f4f1d2f62b8dd740e85 Mon Sep 17 00:00:00 2001 From: wschmidt Date: Wed, 20 Mar 2013 13:24:12 +0000 Subject: gcc: 2013-03-13 Bill Schmidt Steven Bosscher PR rtl-optimization/56605 * loop-iv.c (implies_p): Handle equal RTXs and subregs. gcc/testsuite: 2013-03-13 Bill Schmidt wschmidt@linux.vnet.ibm.com> PR rtl-optimization/56605 * gcc.target/powerpc/pr56605.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196823 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/loop-iv.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'gcc/loop-iv.c') diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c index 15f16619863..0847307e1a8 100644 --- a/gcc/loop-iv.c +++ b/gcc/loop-iv.c @@ -1496,19 +1496,26 @@ implies_p (rtx a, rtx b) rtx op0, op1, opb0, opb1, r; enum machine_mode mode; + if (rtx_equal_p (a, b)) + return true; + if (GET_CODE (a) == EQ) { op0 = XEXP (a, 0); op1 = XEXP (a, 1); - if (REG_P (op0)) + if (REG_P (op0) + || (GET_CODE (op0) == SUBREG + && REG_P (SUBREG_REG (op0)))) { r = simplify_replace_rtx (b, op0, op1); if (r == const_true_rtx) return true; } - if (REG_P (op1)) + if (REG_P (op1) + || (GET_CODE (op1) == SUBREG + && REG_P (SUBREG_REG (op1)))) { r = simplify_replace_rtx (b, op1, op0); if (r == const_true_rtx) -- cgit v1.2.1