re PR tree-optimization/56812 (Simple loop is not SLP-vectorized after r196872)
[gcc.git] / gcc / testsuite / g++.dg / vect / slp-pr56812.cc
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_float } */
3 /* { dg-options "-O3 -funroll-loops -fdump-tree-slp-details" } */
4
5 class mydata {
6 public:
7 mydata() {Set(-1.0);}
8 void Set (float);
9 static int upper() {return 8;}
10 float data[8];
11 };
12
13 void mydata::Set (float x)
14 {
15 for (int i=0; i<upper(); i++)
16 data[i] = x;
17 }
18
19 /* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" } } */
20 /* { dg-final { cleanup-tree-dump "slp" } } */