This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[rs6000] fix PR 30282, load from stack moved past stack update
- From: Alan Modra <amodra at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: David Edelsohn <dje dot gcc at gmail dot com>
- Date: Sat, 5 Nov 2011 00:13:40 +1030
- Subject: [rs6000] fix PR 30282, load from stack moved past stack update
This patch fixes PR30282, caused by instructions being scheduled over
the stack reset. Note that only for ABI_V4 do we currently have
frame_reg_rtx != sp_reg_rtx in rs6000_emit_stack_reset, so the patch
doesn't emit *less* blockages. I did benchmark this change and saw
nothing but the usual benchmake noise.
Bootstrapped etc. powerpc-linux. OK to apply?
* config/rs6000/rs6000.c (rs6000_emit_stack_reset): Always emit
blockage for ABI_V4.
Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c (revision 177309)
+++ gcc/config/rs6000/rs6000.c (working copy)
@@ -19689,7 +19689,7 @@ rs6000_emit_stack_reset (rs6000_stack_t
{
/* This blockage is needed so that sched doesn't decide to move
the sp change before the register restores. */
- if (frame_reg_rtx != sp_reg_rtx
+ if (DEFAULT_ABI == ABI_V4
|| (TARGET_SPE_ABI
&& info->spe_64bit_regs_used != 0
&& info->first_gp_reg_save != 32))
--
Alan Modra
Australia Development Lab, IBM