diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2019-08-20 09:10:53 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2019-08-20 09:10:53 +0000 |
commit | 7ee98586a66efe3219ef5a8b00bcced4b0da23e5 (patch) | |
tree | 99b6fb388126ba631bb521fc0e6c659b39eedb97 /gcc/dse.c | |
parent | 257caa552bf930e2770100de70a459a4ede837c0 (diff) | |
download | gcc-7ee98586a66efe3219ef5a8b00bcced4b0da23e5.zip gcc-7ee98586a66efe3219ef5a8b00bcced4b0da23e5.tar.gz gcc-7ee98586a66efe3219ef5a8b00bcced4b0da23e5.tar.bz2 |
re PR rtl-optimization/91347 (hppa: wrong code generated with tail call optimisation)
PR rtl-optimization/91347
* dse.c (scan_insn): Call add_wild_read for non-const/memset tail calls
before reload if HARD_FRAME_POINTER_IS_ARG_POINTER.
From-SVN: r274708
Diffstat (limited to 'gcc/dse.c')
-rw-r--r-- | gcc/dse.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -2539,10 +2539,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 |