gcc/testsuite/gcc.target/i386/pr89618.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O3 -mavx512f -fdump-tree-vect-details" } */ |
| 3 | |
| 4 | void foo (int n, int *off, double *a) |
| 5 | { |
| 6 | const int m = 32; |
| 7 | |
| 8 | for (int j = 0; j < n/m; ++j) |
| 9 | { |
| 10 | int const start = j*m; |
| 11 | int const end = (j+1)*m; |
| 12 | |
| 13 | #pragma GCC ivdep |
| 14 | for (int i = start; i < end; ++i) |
| 15 | { |
| 16 | a[off[i]] = a[i] < 0 ? a[i] : 0; |
| 17 | } |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | /* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */ |