]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR tree-optimization/62075 (Vectorizer ICE on dolphin)
authorRichard Biener <rguenther@suse.de>
Mon, 11 Aug 2014 14:48:24 +0000 (14:48 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 11 Aug 2014 14:48:24 +0000 (14:48 +0000)
2014-08-11  Richard Biener  <rguenther@suse.de>

PR tree-optimization/62075
* tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Properly
handle uses in patterns.

* gcc.dg/vect/pr62075.c: New testcase.

From-SVN: r213815

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/pr62075.c [new file with mode: 0644]
gcc/tree-vect-slp.c

index 56089df9fd7e84b72679116e4a1cd9e9999980f5..e24e03a8244b7ea302e15c7c82e3be3a1b7fced4 100644 (file)
@@ -1,3 +1,9 @@
+2014-08-11  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/62075
+       * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Properly
+       handle uses in patterns.
+
 2014-08-11  Alexander Ivchenko  <alexander.ivchenko@intel.com>
            Maxim Kuznetsov  <maxim.kuznetsov@intel.com>
            Anna Tikhonova  <anna.tikhonova@intel.com>
index 10b9eb28fd34b56f345ff3b5321fc9912fbe7c1c..6e7b1b0e4732dcbcb9a763994b79b5c6b142a10b 100644 (file)
@@ -1,3 +1,8 @@
+2014-08-11  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/62075
+       * gcc.dg/vect/pr62075.c: New testcase.
+
 2014-08-11  Felix Yang  <fei.yang0953@gmail.com>
 
        PR tree-optimization/62073
diff --git a/gcc/testsuite/gcc.dg/vect/pr62075.c b/gcc/testsuite/gcc.dg/vect/pr62075.c
new file mode 100644 (file)
index 0000000..798490e
--- /dev/null
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+
+int a[16][2];
+struct A
+{
+  int b[16][2];
+  int c[16][1];
+};
+
+void
+foo (struct A *x)
+{
+  int i;
+  for (i = 0; i < 16; ++i)
+    {
+      x->b[i][0] = a[i][0];
+      x->c[i][0] = 0 != a[i][0];
+      x->b[i][1] = a[i][1];
+    }
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
index 0ab267f7d8e0ee3c8ca3f37db07a5528f2a57329..d48d3f571e3714eff676abe84df80402e8b06bef 100644 (file)
@@ -1793,7 +1793,10 @@ vect_detect_hybrid_slp_stmts (slp_tree node)
            && (stmt_vinfo = vinfo_for_stmt (use_stmt))
            && !STMT_SLP_TYPE (stmt_vinfo)
             && (STMT_VINFO_RELEVANT (stmt_vinfo)
-                || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo)))
+                || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_vinfo))
+               || (STMT_VINFO_IN_PATTERN_P (stmt_vinfo)
+                   && STMT_VINFO_RELATED_STMT (stmt_vinfo)
+                   && !STMT_SLP_TYPE (vinfo_for_stmt (STMT_VINFO_RELATED_STMT (stmt_vinfo)))))
            && !(gimple_code (use_stmt) == GIMPLE_PHI
                  && STMT_VINFO_DEF_TYPE (stmt_vinfo)
                   == vect_reduction_def))