C++: simplify output from suggest_alternatives_for
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c / vec.c
blob608538fbd1f8106f0a7d600936404536cd24f6c1
1 /* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
2 /* { dg-skip-if "" { *-*-* } { "*" } { "-DACC_MEM_SHARED=0" } } */
3 /* { dg-additional-options "-std=c99 -ftree-slp-vectorize -foffload=-fdump-tree-slp1" } */
5 #include <stdio.h>
6 #include <sys/time.h>
8 long long int p[32 *1000] __attribute__((aligned(16)));
9 long long int p2[32 *1000] __attribute__((aligned(16)));
11 int
12 main (void)
14 #pragma acc parallel num_gangs(1) num_workers(1) vector_length(32)
16 if (((unsigned long int)p & (0xfULL)) != 0)
17 __builtin_abort ();
18 if (((unsigned long int)p2 & (0xfULL)) != 0)
19 __builtin_abort ();
21 for (unsigned int k = 0; k < 10000; k += 1)
23 #pragma acc loop vector
24 for (unsigned long long int j = 0; j < 32; j += 1)
26 unsigned long long a, b;
27 unsigned long long *p3, *p4;
28 p3 = (unsigned long long *)((unsigned long long int)p & (~0xfULL));
29 p4 = (unsigned long long *)((unsigned long long int)p2 & (~0xfULL));
31 for (unsigned int i = 0; i < 1000; i += 2)
33 a = p3[j * 1000 + i];
34 b = p3[j * 1000 + i + 1];
36 p4[j * 1000 + i] = a;
37 p4[j * 1000 + i + 1] = b;
43 return 0;
46 /* { dg-final { scan-offload-tree-dump "vector\\(2\\) long long unsigned int" "slp1" } } */