diff options
author | Bernd Schmidt <bernd.schmidt@analog.com> | 2009-09-27 16:56:57 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds@gcc.gnu.org> | 2009-09-27 16:56:57 +0000 |
commit | cdf1bf8bb3311493aa9822bc9c8f6d94571fe82e (patch) | |
tree | 95b8107b77b79331bb1eae28317bfa55077089c1 | |
parent | ee5fe537e8e43cad941c829d174c85d0ebf0233f (diff) | |
download | gcc-cdf1bf8bb3311493aa9822bc9c8f6d94571fe82e.zip gcc-cdf1bf8bb3311493aa9822bc9c8f6d94571fe82e.tar.gz gcc-cdf1bf8bb3311493aa9822bc9c8f6d94571fe82e.tar.bz2 |
loop-iv.c (iv_analyze_op): Use function_invariant_p, not CONSTANT_P, to test for GRD_INVARIANT.
* loop-iv.c (iv_analyze_op): Use function_invariant_p, not CONSTANT_P,
to test for GRD_INVARIANT.
(simple_rhs_p): Anything that's function_invariant_p is fine.
From-SVN: r152226
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/loop-iv.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index eb87556..7a2cce6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-09-27 Bernd Schmidt <bernd.schmidt@analog.com> + + * loop-iv.c (iv_analyze_op): Use function_invariant_p, not CONSTANT_P, + to test for GRD_INVARIANT. + (simple_rhs_p): Anything that's function_invariant_p is fine. + 2009-09-27 Rafael Avila de Espindola <espindola@google.com> * gengtype.c (main): Use plunge_files instead of plugin_output. diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c index 2f8650a8..af25d02 100644 --- a/gcc/loop-iv.c +++ b/gcc/loop-iv.c @@ -1120,7 +1120,7 @@ iv_analyze_op (rtx insn, rtx op, struct rtx_iv *iv) print_rtl_single (dump_file, insn); } - if (CONSTANT_P (op)) + if (function_invariant_p (op)) res = GRD_INVARIANT; else if (GET_CODE (op) == SUBREG) { @@ -1329,7 +1329,7 @@ simple_rhs_p (rtx rhs) { rtx op0, op1; - if (CONSTANT_P (rhs) + if (function_invariant_p (rhs) || (REG_P (rhs) && !HARD_REGISTER_P (rhs))) return true; |