===================================================================
@@ -2537,10 +2537,13 @@ scan_insn (bb_info_t bb_info, rtx_insn *insn)
clear_rhs_from_active_local_stores ();
}
}
- else if (SIBLING_CALL_P (insn) && reload_completed)
+ else if (SIBLING_CALL_P (insn)
+ && (reload_completed || HARD_FRAME_POINTER_IS_ARG_POINTER))
/* Arguments for a sibling call that are pushed to memory are passed
using the incoming argument pointer of the current function. After
- reload that might be (and likely is) frame pointer based. */
+ reload that might be (and likely is) frame pointer based. And, if
+ it is a frame pointer on the target, even before reload we need to
+ kill frame pointer based stores. */
add_wild_read (bb_info);
else
/* Every other call, including pure functions, may read any memory