function_invariant_p.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146701
138bc75d-0d04-0410-961f-
82ee72b054a4
* loop-iv.c (replace_single_def_regs): Look for REG_EQUAL notes;
follow chains of regs with a single definition, and allow expressions
that are function_invariant_p.
+ (simple_rhs_p): Allow expressions that are function_invariant_p.
2009-04-24 Paolo Bonzini <bonzini@gnu.org>
op1 = XEXP (rhs, 1);
/* Allow reg OP const and reg OP reg. */
if (!(REG_P (op0) && !HARD_REGISTER_P (op0))
- && !CONSTANT_P (op0))
+ && !function_invariant_p (op0))
return false;
if (!(REG_P (op1) && !HARD_REGISTER_P (op1))
- && !CONSTANT_P (op1))
+ && !function_invariant_p (op1))
return false;
return true;
/* Allow reg OP const. */
if (!(REG_P (op0) && !HARD_REGISTER_P (op0)))
return false;
- if (!CONSTANT_P (op1))
+ if (!function_invariant_p (op1))
return false;
return true;