diff mbox

Fix PR78699

Message ID alpine.LSU.2.11.1612091340110.5294@t29.fhfr.qr
State New
Headers show

Commit Message

Richard Biener Dec. 9, 2016, 12:41 p.m. UTC
Fixing the cost model for large permuted SLP groups broke this due to
the excessive amount of garbage we create.  A previous fix for this
was (ab-)using the cost-model so this one simply makes a hard upper
bound for SLP group sizes.

Bootstrap and regtest running on x86_64-unknown-linux-gnu.

Richard.

2016-12-09  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/78699
	* tree-vect-data-refs.c (vect_analyze_group_access_1): Limit
	group size.
diff mbox

Patch

Index: gcc/tree-vect-data-refs.c
===================================================================
--- gcc/tree-vect-data-refs.c	(revision 243474)
+++ gcc/tree-vect-data-refs.c	(working copy)
@@ -2390,7 +2416,9 @@  vect_analyze_group_access_1 (struct data
       if (groupsize == 0)
         groupsize = count + gaps;
 
-      if (groupsize > UINT_MAX)
+      /* This could be UINT_MAX but as we are generating code in a very
+         inefficient way we have to cap earlier.  See PR78699 for example.  */
+      if (groupsize > 4096)
 	{
 	  if (dump_enabled_p ())
 	    dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,