OSDN Git Service

PR tree-optimization/43771
authorirar <irar@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 18 Apr 2010 12:20:34 +0000 (12:20 +0000)
committerirar <irar@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 18 Apr 2010 12:20:34 +0000 (12:20 +0000)
* tree-vect-slp.c (vect_supported_load_permutation_p): Check that
load permutation doesn't have gaps.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158484 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/vect/pr43771.cc [new file with mode: 0644]
gcc/tree-vect-slp.c

index 912670d..f88ff21 100644 (file)
@@ -1,3 +1,9 @@
+2010-04-18 Ira Rosen <irar@il.ibm.com> 
+
+       PR tree-optimization/43771
+       * tree-vect-slp.c (vect_supported_load_permutation_p): Check that
+       load permutation doesn't have gaps.
+
 2010-04-18  Jan Hubicka  <jh@suse.cz>
 
        * i386.md (UNSPEC_SSE_PROLOGUE_SAVE_LOW): New.
index a926c84..901a727 100644 (file)
@@ -1,3 +1,8 @@
+2010-04-18 Ira Rosen <irar@il.ibm.com>
+
+       PR tree-optimization/43771
+       * g++.dg/vect/pr43771.cc: New test.
+
 2010-04-17  Steven G. Kargl  <kargl@gcc.gnu.org>
 
    PR fortran/31538
diff --git a/gcc/testsuite/g++.dg/vect/pr43771.cc b/gcc/testsuite/g++.dg/vect/pr43771.cc
new file mode 100644 (file)
index 0000000..1a2d09a
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+
+void KWayNodeRefine__(int nparts, int *gpwgts, int *badminpwgt, int
+*badmaxpwgt)
+{
+   int i;
+
+   for (i=0; i<nparts; i+=2) {
+       badminpwgt[i] = badminpwgt[i+1] = gpwgts[i]+gpwgts[i+1];
+       badmaxpwgt[i] = badmaxpwgt[i+1] = gpwgts[i]+gpwgts[i+1];
+   }
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
index d25d347..afc4f31 100644 (file)
@@ -844,7 +844,11 @@ vect_supported_load_permutation_p (slp_instance slp_instn, int group_size,
 
       SET_BIT (load_index, prev);
     }
-  
+  for (j = 0; j < group_size; j++)
+    if (!TEST_BIT (load_index, j))
+      return false;
+
   sbitmap_free (load_index);
 
   if (supported && i == group_size * group_size