gcc/testsuite/gcc.dg/vect/vect-gather-6.c
raw| 1 | /* { dg-do compile } */ |
| 2 | |
| 3 | void |
| 4 | f (int *restrict y, int *restrict x, int *restrict indices, int *restrict cond, int n) |
| 5 | { |
| 6 | for (int i = 0; i < n; ++i) |
| 7 | { |
| 8 | if (cond[i * 2]) |
| 9 | y[i * 2] = x[indices[i * 2]] + 1; |
| 10 | if (cond[i * 2 + 1]) |
| 11 | y[i * 2 + 1] = x[indices[i * 2 + 1]] + 2; |
| 12 | } |
| 13 | } |
| 14 | |
| 15 | /* { dg-final { scan-tree-dump "Loop contains only SLP stmts" vect { target vect_gather_load_ifn } } } */ |