Commit b30321cd by Bernd Schmidt Committed by Bernd Schmidt

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
parent 28af33b0
......@@ -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
......
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment