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]

[PATCH] Fix PR66165


Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.

Richard.

2015-05-19  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/66165
	* tree-vect-slp.c (vect_supported_load_permutation_p): Add guard
	for no load permutation.

	* gcc.dg/torture/pr66165.c: New testcase.

Index: gcc/tree-vect-slp.c
===================================================================
*** gcc/tree-vect-slp.c	(revision 223288)
--- gcc/tree-vect-slp.c	(working copy)
*************** vect_supported_load_permutation_p (slp_i
*** 1400,1405 ****
--- 1400,1407 ----
           no permutation is necessary.  */
        FOR_EACH_VEC_ELT (SLP_INSTANCE_LOADS (slp_instn), i, node)
          {
+ 	  if (!SLP_TREE_LOAD_PERMUTATION (node).exists ())
+ 	    continue;
  	  bool subchain_p = true;
            next_load = NULL;
            FOR_EACH_VEC_ELT (SLP_TREE_SCALAR_STMTS (node), j, load)
Index: gcc/testsuite/gcc.dg/torture/pr66165.c
===================================================================
*** gcc/testsuite/gcc.dg/torture/pr66165.c	(revision 0)
--- gcc/testsuite/gcc.dg/torture/pr66165.c	(working copy)
***************
*** 0 ****
--- 1,11 ----
+ /* { dg-do compile } */
+ 
+ void foo(double *d, double *a)
+ {
+   d[0] += d[2];
+   d[1] += d[3];
+   d[2] += d[4];
+   d[3] += d[5];
+   a[0] = d[0];
+   a[1] = d[1];
+ }


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