cfgexpand: Expand comment on when non-var clobbers can show up
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / bb-slp-pr114435.c
blobd1eecf7979aed2c11870424a1574d1c71d2afefe
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_double } */
3 /* Predictive commining is supposed to happen. */
4 /* { dg-additional-options "-O3 -fdump-tree-pcom" } */
6 struct res {
7 double r0;
8 double r1;
9 double r2;
10 double r3;
13 struct pxl {
14 double v0;
15 double v1;
16 double v2;
17 double v3;
20 #define IS_NAN(x) ((x) == (x))
22 void fold(struct res *r, struct pxl *in, double k, int sz)
24 int i;
26 for (i = 0; i < sz; i++) {
27 if (IS_NAN(k)) continue;
28 r->r0 += in[i].v0 * k;
29 r->r1 += in[i].v1 * k;
30 r->r2 += in[i].v2 * k;
31 r->r3 += in[i].v3 * k;
35 /* { dg-final { scan-tree-dump "# r__r0_lsm\[^\r\n\]* = PHI" "pcom" } } */
36 /* { dg-final { scan-tree-dump "optimized: basic block part vectorized" "slp1" } } */
37 /* { dg-final { scan-tree-dump "# vect\[^\r\n\]* = PHI" "slp1" } } */