Debian Codegraph @

gcc/testsuite/gcc.dg/pr124138.c

raw
1 /* PR target/124138 */
2 /* { dg-do run } */
3 /* { dg-options "-Wno-psabi" } */
4
5 typedef __attribute__((__vector_size__ (8 * sizeof (unsigned long long)))) unsigned long long V;
6
7 [[gnu::noipa]] V
8 foo (V x)
9 {
10 return __builtin_shuffle (x, (V) { 0, 1, 2, 5, 4, 5, 6, 7 });
11 }
12
13 int
14 main ()
15 {
16 V x = foo ((V) { 1, 2, 3, 4, 5, 6, 7, 8 });
17 if (x[0] != 1 || x[1] != 2 || x[2] != 3 || x[3] != 6
18 || x[4] != 5 || x[5] != 6 || x[6] != 7 || x[7] != 8)
19 __builtin_abort ();
20 }