Debian Codegraph @

gcc/testsuite/gcc.target/i386/pr108938-load-2.c

raw
1 /* { dg-do run } */
2 /* { dg-options "-O2" } */
3
4 #include "pr108938-load-1.c"
5
6 int main ()
7 {
8 unsigned char a[8] = {1, 2, 3, 4, 5, 6, 7, 8};
9 uint64_t res = swap_rotate_64 (a);
10 if (res != 0x0203040506070801ULL)
11 __builtin_abort ();
12
13 res = swap_rotate_64_mask_1 (a);
14 if (res != 0x0506070801020300ULL)
15 __builtin_abort ();
16
17 res = swap_rotate_64_mask_2 (a);
18 if (res != 0x0203000506070801ULL)
19 __builtin_abort ();
20
21 uint32_t res2 = swap_rotate_32 (a);
22 if (res2 != 0x03040102)
23 __builtin_abort ();
24
25 res2 = swap_rotate_32_mask_1 (a);
26 if (res2 != 0x03040100)
27 __builtin_abort ();
28
29 return 0;
30 }