Debian Codegraph @

gcc/testsuite/gcc.target/i386/pr77761.c

raw
1 /* { dg-do run } */
2 /* { dg-options "-O2 -fno-guess-branch-probability -fschedule-insns -fno-tree-ter -mavx512f --param=max-pending-list-length=512" } */
3 /* { dg-require-effective-target int128 } */
4 /* { dg-require-effective-target avx512f } */
5
6 #include "avx512f-check.h"
7
8 typedef unsigned char u8;
9 typedef unsigned char v64u8 __attribute__ ((vector_size (64)));
10 typedef unsigned short u16;
11 typedef unsigned short v64u16 __attribute__ ((vector_size (64)));
12 typedef unsigned int u32;
13 typedef unsigned int v64u32 __attribute__ ((vector_size (64)));
14 typedef unsigned long long u64;
15 typedef unsigned long long v64u64 __attribute__ ((vector_size (64)));
16 typedef unsigned __int128 u128;
17 typedef unsigned __int128 v64u128 __attribute__ ((vector_size (64)));
18
19 v64u128 __attribute__ ((noinline, noclone))
20 foo(u8 x1, u16 x2, u32 x3, u64 x4, v64u8 x5, v64u16 x6, v64u32 x7, v64u64 x8, v64u128 x9)
21 {
22 u8 *p = &x1;
23 x9[0] -= *p;
24 x5 %= (v64u8){ 1, -x4, 0, x3, x5[9], x7[1], 4, x6[1], 13 << 4} | 1;
25 x5[1] = x5[0];
26 x8 %= (v64u64){1, x1} | 1;
27 x9 /= x9 | 1;
28 x5 -= (v64u8){0, 0, 3, 0, 0, 0, 0, x4, x9[0], 0, 1};
29 return x1 + x2 + x3 + x4 + (v64u128) x5 + (v64u128) x6 + (v64u128) x7 +
30 (v64u128) x8 + x9;
31 }
32
33 static void
34 avx512f_test (void)
35 {
36 v64u128 x = foo(1, 0, 0, 0, (v64u8){}, (v64u16){}, (v64u32){}, (v64u64){}, (v64u128){});
37
38 if ((u64)(x[0] >> 64) != 0x0000000000ff00ff)
39 __builtin_abort();
40 if ((u64)(x[0] >> 0) != 0x0000000000fd0002)
41 __builtin_abort();
42
43 if (x[1] != 1)
44 __builtin_abort();
45 if (x[2] != 1)
46 __builtin_abort();
47 if (x[3] != 1)
48 __builtin_abort();
49 }