+2018-02-08 Richard Biener <rguenther@suse.de>
+
+ * g++.dg/vect/slp-pr56812.cc: Allow either basic-block or
+ loop vectorization to happen.
+
2018-02-08 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/83204
-/* { dg-do compile } */\r
-/* { dg-require-effective-target vect_float } */\r
-/* { dg-require-effective-target vect_hw_misalign } */\r
-/* { dg-additional-options "-O3 -funroll-loops -fvect-cost-model=dynamic" } */\r
-\r
-class mydata {\r
-public:\r
- mydata() {Set(-1.0);}\r
- void Set (float);\r
- static int upper() {return 8;}\r
- float data[8];\r
-};\r
-\r
-void mydata::Set (float x)\r
-{\r
- for (int i=0; i<upper(); i++)\r
- data[i] = x;\r
-}\r
-\r
-/* For targets without vector loop peeling the loop becomes cheap\r
- enough to be vectorized. */\r
-/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp1" { xfail { ! vect_peeling_profitable } } } } */\r
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_float } */
+/* { dg-require-effective-target vect_hw_misalign } */
+/* { dg-additional-options "-O3 -funroll-loops -fvect-cost-model=dynamic -fopt-info-vec" } */
+
+class mydata {
+public:
+ mydata() {Set(-1.0);}
+ void Set (float);
+ static int upper() {return 8;}
+ float data[8];
+};
+
+void mydata::Set (float x)
+{
+ /* We want to vectorize this either as loop or basic-block. */
+ for (int i=0; i<upper(); i++) /* { dg-message "note: \[^\n\]* vectorized" } */
+ data[i] = x;
+}