gcc/testsuite/gcc.dg/vect/pr97832-1.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-additional-options "-Ofast" } */ |
| 3 | /* { dg-require-effective-target vect_double } */ |
| 4 | |
| 5 | double a[1024], b[1024], c[1024]; |
| 6 | |
| 7 | void foo() |
| 8 | { |
| 9 | for (int i = 0; i < 256; ++i) |
| 10 | { |
| 11 | a[2*i] = a[2*i] + b[2*i] - c[2*i]; |
| 12 | a[2*i+1] = a[2*i+1] - b[2*i+1] - c[2*i+1]; |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | /* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" } } */ |
| 17 | /* { dg-final { scan-tree-dump "Loop contains only SLP stmts" "vect" } } */ |