gcc/testsuite/gcc.target/i386/vect-strided-2.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -msse2 -mno-avx" } */ |
| 3 | |
| 4 | void foo (int * __restrict a, int *b, int s) |
| 5 | { |
| 6 | for (int i = 0; i < 1024; ++i) |
| 7 | { |
| 8 | a[4*i+0] = b[s*i+0]; |
| 9 | a[4*i+1] = b[s*i+1]; |
| 10 | a[4*i+2] = b[s*i+0]; |
| 11 | a[4*i+3] = b[s*i+1]; |
| 12 | } |
| 13 | } |
| 14 | |
| 15 | /* One two-element load, one four-element store. */ |
| 16 | /* { dg-final { scan-assembler-times "movq" 1 } } */ |
| 17 | /* { dg-final { scan-assembler-times "movups" 1 } } */ |