diff options
author | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-03-31 15:22:13 +0000 |
---|---|---|
committer | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-03-31 15:22:13 +0000 |
commit | b908751eaca1fd247690ac7767f49be3b43406b6 (patch) | |
tree | 67b42ea7123f999825d450e942b4c3d333fe23f0 /gcc/loop-iv.c | |
parent | f77c1bb01b175cdd966d3d79ec4c174f017f2610 (diff) | |
download | gcc-b908751eaca1fd247690ac7767f49be3b43406b6.tar.gz |
* loop-iv.c (simple_rhs_p): Allow more kinds of expressions.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145355 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-iv.c')
-rw-r--r-- | gcc/loop-iv.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c index 9b35b888210..67d1ebd2cb2 100644 --- a/gcc/loop-iv.c +++ b/gcc/loop-iv.c @@ -1336,9 +1336,10 @@ simple_rhs_p (rtx rhs) { case PLUS: case MINUS: + case AND: op0 = XEXP (rhs, 0); op1 = XEXP (rhs, 1); - /* Allow reg + const and reg + reg. */ + /* Allow reg OP const and reg OP reg. */ if (!(REG_P (op0) && !HARD_REGISTER_P (op0)) && !CONSTANT_P (op0)) return false; @@ -1349,9 +1350,12 @@ simple_rhs_p (rtx rhs) return true; case ASHIFT: + case ASHIFTRT: + case LSHIFTRT: + case MULT: op0 = XEXP (rhs, 0); op1 = XEXP (rhs, 1); - /* Allow reg << const. */ + /* Allow reg OP const. */ if (!(REG_P (op0) && !HARD_REGISTER_P (op0))) return false; if (!CONSTANT_P (op1)) |