2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / opt / pr83252.C
blob331eb45b565297766390503c1e2bbbb1f05cb1e8
1 // PR target/83252
2 // { dg-do run }
3 // { dg-options "-O3" }
4 // { dg-additional-options "-mbmi2 -mtune=intel" { target bmi2 } }
5 // { dg-additional-options "-mclear-hwcap" { target *-*-solaris* } }
7 #if __SIZEOF_INT__ == 4 && __SIZEOF_LONG_LONG__ == 8 && __CHAR_BIT__ == 8
9 #ifdef __BMI2__
10 #include "../../gcc.target/i386/bmi2-check.h"
11 #endif
13 long long h = 707493562598231894LL, i, n, x3, x5;
14 long long j, l = -2228108721620697360LL, o, y9;
15 int k, p, r, s, t = 2, u, w, z8, x7, y4, y5, y6, y7, y8, x1, x2, x4, x6, d;
16 unsigned v, x = 751359462, z = 1, y3 = 60;
17 unsigned *y = &x, *z2 = &z, *z3 = &v;
18 unsigned long long z1 = 2;
19 unsigned long long *z4 = &z1;
20 long long *z7;
21 unsigned long long z9 = 7091529791657LL;
23 void
24 foo ()
26   if ((-2783342978U * (int) l || z) && z2 && h && z1 && z9 & ~-(-2783342978U * (int) l))
27     {
28       i = 3060393125LL < n;
29       y7 = o >> *y - 751359400;
30       *z3 = x7;
31       long a = (o >> *y - 751359400 >> ~-(-2783342978U * (int) l) - 88480234) - (-2783342978U * (int) l);
32       y6 = a;
33       if (~0 % *z4 % 5)
34         y8 = -3 * (l - 4 ? : 407228174574);
35       if (y3 < 1)
36         {
37           long long *b = &y9;
38           z3 = 0;
39           int c = *z2;
40           *z7 = 0;
41           x1 = ~(-((unsigned) (-2783342978U * (unsigned long long) l)));
42           p = *b & j;
43           x2 = c;
44         }
45       else
46         {
47           j = 0;
48           int e = !0 % (7 % *z4);
49           r = ((s || !k) && t) - -(-2783342978U * (unsigned long long) l);
50           x3 = o >> *y - 751359400;
51           y9 = z9;
52           long f = o >> *y - 751359400 >> ~-(-2783342978U * (int) l) - 88480234;
53           x4 = z1;
54           u = n * f * e * y4;
55         }
56       if (8ULL * -(-(-2783342978U * (int) l)))
57         ;
58       else
59         {
60           *z3 = 0;
61           int g = 3 & y5;
62           x5 = (unsigned) (~o + 9223372036854775807 >> l);
63           z8 = g + y9;
64           v = j || ~0 + 9223372036854775807 >> ~-(-2783342978U * (int) l);
65           x6 = o >> (8 * l);
66           w = *y ? -2783342978U * l : 0;
67         }
68     }
71 #ifdef __BMI2__
72 void
73 bmi2_test (void)
75   foo ();
76   if (r != 88480289)
77     __builtin_abort ();
79 #else
80 int
81 main ()
83   foo ();
84   if (r != 88480289)
85     __builtin_abort ();
87 #endif
88 #else
89 int
90 main ()
93 #endif