1 /* PR rtl-optimization/100342 */
2 /* { dg-do run { target int128 } } */
3 /* { dg-options "-O2 -fno-dse -fno-forward-propagate -Wno-psabi -mno-sse2" } */
4 
5 #define SHL(x, y) ((x) << ((y) & (sizeof(x) * 8 - 1)))
6 #define SHR(x, y) ((x) >> ((y) & (sizeof(x) * 8 - 1)))
7 #define ROR(x, y) (SHR(x, y)) | (SHL(x, (sizeof(x) * 8 - (y))))
8 #define SHLV(x, y) ((x) << ((y) & (sizeof((x)[0]) * 8 - 1)))
9 #define SHLSV(x, y) ((x) << ((y) & (sizeof((y)[0]) * 8 - 1)))
10 typedef unsigned char A;
11 typedef unsigned char __attribute__((__vector_size__ (8))) B;
12 typedef unsigned char __attribute__((__vector_size__ (16))) C;
13 typedef unsigned char __attribute__((__vector_size__ (32))) D;
14 typedef unsigned char __attribute__((__vector_size__ (64))) E;
15 typedef unsigned short F;
16 typedef unsigned short __attribute__((__vector_size__ (16))) G;
17 typedef unsigned int H;
18 typedef unsigned int __attribute__((__vector_size__ (32))) I;
19 typedef unsigned long long J;
20 typedef unsigned long long __attribute__((__vector_size__ (8))) K;
21 typedef unsigned long long __attribute__((__vector_size__ (32))) L;
22 typedef unsigned long long __attribute__((__vector_size__ (64))) M;
23 typedef unsigned __int128 N;
24 typedef unsigned __int128 __attribute__((__vector_size__ (16))) O;
25 typedef unsigned __int128 __attribute__((__vector_size__ (32))) P;
26 typedef unsigned __int128 __attribute__((__vector_size__ (64))) Q;
27 B v1;
28 D v2;
29 L v3;
30 K v4;
31 I v5;
32 O v6;
33 
34 B
foo(A a,C b,E c,F d,G e,H f,J g,M h,N i,P j,Q k)35 foo (A a, C b, E c, F d, G e, H f, J g, M h, N i, P j, Q k)
36 {
37   b &= (A) f;
38   k += a;
39   G l = e;
40   D m = v2 >= (A) (J) v1;
41   J r = a + g;
42   L n = v3 <= f;
43   k -= i / f;
44   l -= (A) g;
45   c |= (A) d;
46   b -= (A) i;
47   J o = ROR (__builtin_clz (r), a);
48   K p = v4 | f, q = v4 <= f;
49   P s = SHLV (SHLSV (__builtin_bswap64 (i), (P) (0 < j)) <= 0, j);
50   n += a <= r;
51   M t = (M) (a / SHLV (c, 0)) != __builtin_bswap64 (i);
52   I u = f - v5;
53   E v = (E) h + (E) t + (E) k;
54   D w = (union { D b[2]; }) { }.b[0] + ((union { E b; }) v).b[1] + m + (D) u + (D) n + (D) s;
55   C x = ((union { D b; }) w).b[1] + b + (C) l + (C) v6;
56   B y = ((union { C a; B b; }) x).b + ((union { C a; B b[2]; }) x).b[1] + (B) p + (B) q;
57   J z = i + o;
58   F z2 = z;
59   A z3 = z2;
60   return y + z3;
61 }
62 
63 int
main()64 main ()
65 {
66   B x = foo (0, (C) { }, (E) { }, 10, (G) { }, 4, 2, (M) { }, 123842323652213865LL, (P) { 1 }, (Q) { });
67   if ((J) x != 0x2e2c2e2c2e2c2e30ULL)
68     __builtin_abort();
69   return 0;
70 }
71