Debian Codegraph @

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

raw
1 /* { dg-do run } */
2 /* { dg-options "-O2" } */
3
4 #include "pr108938-1.c"
5
6 int main ()
7 {
8 uint64_t a = 0x0807060504030201ULL;
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 != 0x0203040506070800ULL)
15 __builtin_abort ();
16
17 res = swap_rotate_64_mask_2 (a);
18 if (res != 0x0203040506070001ULL)
19 __builtin_abort ();
20
21 uint32_t b = 0x04030201;
22 uint32_t res2 = swap_rotate_32 (b);
23 if (res2 != 0x03040102)
24 __builtin_abort ();
25
26 res2 = swap_rotate_32_mask_1 (b);
27 if (res2 != 0x03040002)
28 __builtin_abort ();
29
30 res2 = swap_rotate_32_mask_2 (b);
31 if (res2 != 0x03040100)
32 __builtin_abort ();
33
34 return 0;
35 }