+2011-11-22 Tom de Vries <tom@codesourcery.com>
+
+ PR rtl-optimization/50764
+ * sched-deps.c (sched_analyze_insn): Make sure frame-related insns are
+ not moved past preceding jump.
+
2011-11-22 Jeff Law <law@redhat.com>
* doc/contrib.texi: Add entry for David Binderman.
during prologue generation and avoid marking the frame pointer setup
as frame-related at all. */
if (RTX_FRAME_RELATED_P (insn))
- deps->sched_before_next_jump
- = alloc_INSN_LIST (insn, deps->sched_before_next_jump);
+ {
+ /* Make sure prologue insn is scheduled before next jump. */
+ deps->sched_before_next_jump
+ = alloc_INSN_LIST (insn, deps->sched_before_next_jump);
+
+ /* Make sure epilogue insn is scheduled after preceding jumps. */
+ add_dependence_list (insn, deps->pending_jump_insns, 1, REG_DEP_ANTI);
+ }
if (code == COND_EXEC)
{