aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-09-23 03:46:26 +0000
committerRichard Stallman <rms@gnu.org>1992-09-23 03:46:26 +0000
commitb81fd0f4f23b8a207fd2ac04f88b995843d67b6f (patch)
tree14f93a5fde374eb5bc2c847e6b8a13e60b9d2c1f
parent8c153768f4f545dd2c50dc016d7def08348cb643 (diff)
downloadgcc-b81fd0f4f23b8a207fd2ac04f88b995843d67b6f.zip
gcc-b81fd0f4f23b8a207fd2ac04f88b995843d67b6f.tar.gz
gcc-b81fd0f4f23b8a207fd2ac04f88b995843d67b6f.tar.bz2
(basic_induction_var): Inside PLUS, when looking for promoted
var, make sure it's a REG. From-SVN: r2210
-rw-r--r--gcc/loop.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index e4b47db..87509be 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -4693,7 +4693,8 @@ basic_induction_var (x, dest_reg, p, inc_val, mult_val)
arg = XEXP (x, 1);
else if (XEXP (x, 1) == dest_reg
|| (GET_CODE (XEXP (x, 1)) == SUBREG
- && SUBREG_PROMOTED_VAR_P (XEXP (x, 1))))
+ && SUBREG_PROMOTED_VAR_P (XEXP (x, 1))
+ && SUBREG_REG (XEXP (x, 1)) == dest_reg))
arg = XEXP (x, 0);
else
return 0;