diff options
author | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-11 06:44:40 +0000 |
---|---|---|
committer | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-11 06:44:40 +0000 |
commit | a03ae2b7b70906e775143c18dc24e82ca543221d (patch) | |
tree | 61032f35b38631d7d417c84e9e248af1d2d2a114 | |
parent | f860362b24466250cbb75955af1ebb550084c127 (diff) | |
download | gcc-a03ae2b7b70906e775143c18dc24e82ca543221d.tar.gz |
PR optimization/9745
* loop.c (loop_iv_add_mult_emit_before): Call loop_regs_update before
loop_insn_emit_before.
(loop_iv_add_mult_sink, loop_iv_add_mult_hoist): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69220 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/loop.c | 21 |
2 files changed, 19 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a9023445767..b175bdf684b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2003-07-10 James E Wilson <wilson@tuliptree.org> + + PR optimization/9745 + * loop.c (loop_iv_add_mult_emit_before): Call loop_regs_update before + loop_insn_emit_before. + (loop_iv_add_mult_sink, loop_iv_add_mult_hoist): Likewise. + 2003-07-10 Zack Weinberg <zack@codesourcery.com> * cppcharset.c: Fix comment. diff --git a/gcc/loop.c b/gcc/loop.c index b3c55170927..fdb8995534a 100644 --- a/gcc/loop.c +++ b/gcc/loop.c @@ -7737,11 +7737,12 @@ loop_iv_add_mult_emit_before (const struct loop *loop, rtx b, rtx m, rtx a, update_reg_last_use (b, before_insn); update_reg_last_use (m, before_insn); - loop_insn_emit_before (loop, before_bb, before_insn, seq); - /* It is possible that the expansion created lots of new registers. - Iterate over the sequence we just created and record them all. */ + Iterate over the sequence we just created and record them all. We + must do this before inserting the sequence. */ loop_regs_update (loop, seq); + + loop_insn_emit_before (loop, before_bb, before_insn, seq); } @@ -7764,11 +7765,12 @@ loop_iv_add_mult_sink (const struct loop *loop, rtx b, rtx m, rtx a, rtx reg) update_reg_last_use (b, loop->sink); update_reg_last_use (m, loop->sink); - loop_insn_sink (loop, seq); - /* It is possible that the expansion created lots of new registers. - Iterate over the sequence we just created and record them all. */ + Iterate over the sequence we just created and record them all. We + must do this before inserting the sequence. */ loop_regs_update (loop, seq); + + loop_insn_sink (loop, seq); } @@ -7784,11 +7786,12 @@ loop_iv_add_mult_hoist (const struct loop *loop, rtx b, rtx m, rtx a, rtx reg) /* Use copy_rtx to prevent unexpected sharing of these rtx. */ seq = gen_add_mult (copy_rtx (b), copy_rtx (m), copy_rtx (a), reg); - loop_insn_hoist (loop, seq); - /* It is possible that the expansion created lots of new registers. - Iterate over the sequence we just created and record them all. */ + Iterate over the sequence we just created and record them all. We + must do this before inserting the sequence. */ loop_regs_update (loop, seq); + + loop_insn_hoist (loop, seq); } |