This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] rs6000: Fix separate shrink-wrapping for TARGET_MULTIPLE


On Tue, Oct 18, 2016 at 12:17:32AM +0100, Iain Sandoe wrote:
> > Bootstrapped and tested on powerpc64-linux {-m64,-m32}.  I'll commit it
> > if Iain's testing (on darwin) also succeeds.
> 
> thanks!
> 
> All-langs bootstrap was restored with the patch (and others in progress for existing known issues); 
> 
> I can’t see any evidence of the assert firing in the test-suite, so it all looks good to me (there’s quite a bit of stage-1-ish testsuite noise at present, however).

Thanks for testing!  I committed the slightly simpler patch below.


Segher


2016-10-18  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/rs6000/rs6000.c (rs6000_savres_strategy): Do not select
	{SAVE,REST}_MULTIPLE if shrink-wrapping separate components.
	(rs6000_get_separate_components): Assert we do not have those
	strategies selected.

---
 gcc/config/rs6000/rs6000.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 613af48..1b67592 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -25511,7 +25511,10 @@ rs6000_savres_strategy (rs6000_stack_t *info,
   if (TARGET_MULTIPLE
       && !TARGET_POWERPC64
       && !(TARGET_SPE_ABI && info->spe_64bit_regs_used)
-      && info->first_gp_reg_save < 31)
+      && info->first_gp_reg_save < 31
+      && !(flag_shrink_wrap
+	   && flag_shrink_wrap_separate
+	   && optimize_function_for_speed_p (cfun)))
     {
       /* Prefer store multiple for saves over out-of-line routines,
 	 since the store-multiple instruction will always be smaller.  */
@@ -27445,6 +27448,9 @@ rs6000_get_separate_components (void)
   sbitmap components = sbitmap_alloc (32);
   bitmap_clear (components);
 
+  gcc_assert (!(info->savres_strategy & SAVE_MULTIPLE)
+	      && !(info->savres_strategy & REST_MULTIPLE));
+
   /* The GPRs we need saved to the frame.  */
   if ((info->savres_strategy & SAVE_INLINE_GPRS)
       && (info->savres_strategy & REST_INLINE_GPRS))
-- 
1.9.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]