aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/vect/slp-pr56812.cc
blob: 9c0b2b8b78b3ad7649cdf97fccc5662183b22988 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { 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" } */

class mydata {
public:
    mydata() {Set(-1.0);}
    void Set (float);
    static int upper() {return 8;}
    float data[8];
};

void mydata::Set (float x)
{
  for (int i=0; i<upper(); i++)
    data[i] = x;
}

/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" } } */
/* { dg-final { cleanup-tree-dump "slp" } } */