Use gather loads for strided accesses
[official-gcc.git] / gcc / testsuite / gcc.target / nvptx / slp-2.c
blob18219996788eb962b9844c7f170ab7d91ac2efc9
1 /* { dg-do assemble } */
2 /* { dg-options "-O2 -ftree-slp-vectorize -save-temps" } */
4 long long int p[1000] __attribute__((aligned(16)));
5 long long int p2[1000] __attribute__((aligned(16)));
7 void __attribute__((noinline, noclone))
8 foo ()
10 long long int a, b;
12 int i;
13 for (i = 0; i < 1000; i += 2)
15 a = p[i];
16 b = p[i+1];
18 p2[i] = a;
19 p2[i+1] = b;
23 /* { dg-final { scan-assembler "ld.v2.u64" } } */
24 /* { dg-final { scan-assembler "st.v2.u64" } } */