diff options
author | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-02 23:06:26 +0000 |
---|---|---|
committer | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-02 23:06:26 +0000 |
commit | f37ca8000c2c0db7e030a3e0e5cf49b74d30769b (patch) | |
tree | 676c9dc6ae244c11a41cdeb64a78997e9e74f62b /gcc/loop.c | |
parent | da6a20f5690b7f41bf71bbe6d3f7ac38c5583d86 (diff) | |
download | gcc-f37ca8000c2c0db7e030a3e0e5cf49b74d30769b.tar.gz |
ChangeLog:
PR target/24600
* loop.c (loop_givs_rescan): Use force_operand to expand
complex GIVs.
testsuite/ChangeLog:
PR target/24600
* gcc.dg/pr24600.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106404 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop.c')
-rw-r--r-- | gcc/loop.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/loop.c b/gcc/loop.c index b16c6a75eb5..6df63026ab8 100644 --- a/gcc/loop.c +++ b/gcc/loop.c @@ -5497,9 +5497,16 @@ loop_givs_rescan (struct loop *loop, struct iv_class *bl, rtx *reg_map) /* Not replaceable; emit an insn to set the original giv reg from the reduced giv. */ else if (REG_P (*v->location)) - loop_insn_emit_before (loop, 0, v->insn, - gen_move_insn (*v->location, - v->new_reg)); + { + rtx tem; + start_sequence (); + tem = force_operand (v->new_reg, *v->location); + if (tem != *v->location) + emit_move_insn (*v->location, tem); + tem = get_insns (); + end_sequence (); + loop_insn_emit_before (loop, 0, v->insn, tem); + } else if (GET_CODE (*v->location) == PLUS && REG_P (XEXP (*v->location, 0)) && CONSTANT_P (XEXP (*v->location, 1))) |