diff options
author | Bernd Schmidt <bernd.schmidt@analog.com> | 2009-03-31 15:22:13 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds@gcc.gnu.org> | 2009-03-31 15:22:13 +0000 |
commit | b30321cd329761db5fbf4e0e719983e3faef03e3 (patch) | |
tree | 67b42ea7123f999825d450e942b4c3d333fe23f0 | |
parent | 28af33b0313e692c910d94bb839b5c76aa9bd4c5 (diff) | |
download | gcc-b30321cd329761db5fbf4e0e719983e3faef03e3.zip gcc-b30321cd329761db5fbf4e0e719983e3faef03e3.tar.gz gcc-b30321cd329761db5fbf4e0e719983e3faef03e3.tar.bz2 |
loop-iv.c (simple_rhs_p): Allow more kinds of expressions.
* loop-iv.c (simple_rhs_p): Allow more kinds of expressions.
From-SVN: r145355
-rw-r--r-- | gcc/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/loop-iv.c | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d060adf..f5360a5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -23,6 +23,8 @@ changed. Use this when trying to improve the upper bound. Generate the comparison by using simplify_gen_relational. + * loop-iv.c (simple_rhs_p): Allow more kinds of expressions. + 2009-03-31 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> PR target/27237 diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c index 9b35b88..67d1ebd 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)) |