[RS6000] Tests that use int128_t and -m32
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / swaps-p8-6.c
blobc5cb8a81704b4a76796a2f74fc4c69f61be3e977
1 /* { dg-do run } */
2 /* { dg-require-effective-target p8vector_hw } */
3 /* { dg-options "-mdejagnu-cpu=power8 -O3" } */
5 void abort();
7 #define N 16
9 signed char ca[N] __attribute__((aligned(16)));
10 signed char cb[] __attribute__((aligned(16)))
11 = {8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7};
12 signed char cc[] __attribute__((aligned(16)))
13 = {1, 1, 2, 2, 3, 3, 2, 2, 1, 1, 0, 0, -1, -1, -2, -2};
15 __attribute__((noinline)) void foo ()
17 int i;
18 for (i = 0; i < N; i++) {
19 ca[i] = cb[i] - cc[i];
23 int main ()
25 signed char cd[] = {7, 6, 4, 3, 1, 0, 0, -1, -1, -2, -2, -3, -3, -4, -4, -5};
26 int i;
27 foo ();
28 for (i = 0; i < N; ++i)
29 if (ca[i] != cd[i])
30 abort ();
31 return 0;