1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_double } */
3
4 double foo (int x, double *p)
5 {
6 double res = p[0] + p[1];
7 double tem = p[0] / x;
8 if (x)
9 {
10 p[0] = tem;
11 p[1] /= x;
12 }
13 return res + tem;
14 }
15
16 /* We may not SLP vectorize the FP division because it can trap and it
17 is distributed between two basic-blocks. */
18 /* { dg-final { scan-tree-dump "Build SLP failed: different BB for PHI or possibly trapping operation in _\[0-9\]+ = _\[0-9\]+ / _\[0-9\]+;" "slp2" } } */