diff options
author | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-27 16:56:57 +0000 |
---|---|---|
committer | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-27 16:56:57 +0000 |
commit | e54e3d9f21e2a0833c44d1638dcb1a137f441fa7 (patch) | |
tree | 95b8107b77b79331bb1eae28317bfa55077089c1 /gcc/loop-iv.c | |
parent | 592e8cd7dbfc0138b2eaabfad647c0fefc1dd3c9 (diff) | |
download | gcc-e54e3d9f21e2a0833c44d1638dcb1a137f441fa7.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152226 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-iv.c')
-rw-r--r-- | gcc/loop-iv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c index 2f8650a82f7..af25d02ed61 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; |