summaryrefslogtreecommitdiff
path: root/gcc/loop-invariant.c
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2006-02-13 11:21:23 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2006-02-13 11:21:23 +0000
commit867eb367b050221585bf34ee6d40da0caecba19b (patch)
tree934621970c423e615e444a8421dba6db457cfcfb /gcc/loop-invariant.c
parent36c61b5578e113d5c199b0c5708e3e04d23af115 (diff)
downloadgcc-867eb367b050221585bf34ee6d40da0caecba19b.tar.gz
PR rtl-optimization/26222
* function.c (assign_stack_temp_for_type): Do not reuse stack slots after tree->rtl expansion. * loop-invariant.c (move_invariant_reg): Use force_operand on rhs before passing it to emit_move_insn. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110912 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-invariant.c')
-rw-r--r--gcc/loop-invariant.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c
index fd787a99346..eb6719e7f9b 100644
--- a/gcc/loop-invariant.c
+++ b/gcc/loop-invariant.c
@@ -1075,7 +1075,7 @@ move_invariant_reg (struct loop *loop, unsigned invno)
struct invariant *repr = VEC_index (invariant_p, invariants, inv->eqto);
unsigned i;
basic_block preheader = loop_preheader_edge (loop)->src;
- rtx reg, set;
+ rtx reg, set, seq, op;
struct use *use;
bitmap_iterator bi;
@@ -1115,7 +1115,14 @@ move_invariant_reg (struct loop *loop, unsigned invno)
}
else
{
- emit_insn_after (gen_move_insn (reg, SET_SRC (set)), BB_END (preheader));
+ start_sequence ();
+ op = force_operand (SET_SRC (set), reg);
+ if (op != reg)
+ emit_move_insn (reg, op);
+ seq = get_insns ();
+ end_sequence ();
+
+ emit_insn_after (seq, BB_END (preheader));
delete_insn (inv->insn);
}
}