gcc/testsuite/gcc.dg/vect/bb-slp-phis-1.c
raw| 1 | /* From gcc.c-torture/execute/loop-13.c */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-additional-options "-march=cascadelake" { target x86_64-*-* i?86-*-* } } */ |
| 4 | #define TYPE long |
| 5 | |
| 6 | void |
| 7 | scale (TYPE *alpha, TYPE *x, int n) |
| 8 | { |
| 9 | int i, ix; |
| 10 | |
| 11 | if (*alpha != 1) |
| 12 | for (i = 0, ix = 0; i < n; i++, ix += 2) |
| 13 | { |
| 14 | TYPE tmpr, tmpi; |
| 15 | tmpr = *alpha * x[ix]; |
| 16 | tmpi = *alpha * x[ix + 1]; |
| 17 | x[ix] = tmpr; |
| 18 | x[ix + 1] = tmpi; |
| 19 | } |
| 20 | } |