2 /* { dg-options "-O2" } */
10 #if __CHAR_BIT__ * __SIZEOF_LONG_LONG__ == 64
11 __attribute__((noinline
, noclone
))
13 f1 (unsigned long long x
, unsigned int y
)
15 return (x
<< y
) | (x
>> ((-y
) & 63));
18 __attribute__((noinline
, noclone
))
20 f2 (unsigned long long x
, unsigned int y
)
22 return (x
<< y
) + (x
>> ((-y
) & 63));
25 __attribute__((noinline
, noclone
))
27 f3 (unsigned long long x
, unsigned int y
)
29 return (x
<< y
) ^ (x
>> ((-y
) & 63));
32 #if __CHAR_BIT__ * __SIZEOF_INT128__ == 128
33 __attribute__((noinline
, noclone
))
35 f4 (unsigned __int128 x
, unsigned int y
)
37 return (x
<< y
) | (x
>> ((-y
) & 127));
40 __attribute__((noinline
, noclone
))
42 f5 (unsigned __int128 x
, unsigned int y
)
44 return (x
<< y
) + (x
>> ((-y
) & 127));
47 __attribute__((noinline
, noclone
))
49 f6 (unsigned __int128 x
, unsigned int y
)
51 return (x
<< y
) ^ (x
>> ((-y
) & 127));
59 #if __CHAR_BIT__ * __SIZEOF_LONG_LONG__ == 64
60 if (f1 (0x123456789abcdef0ULL
, 0) != 0x123456789abcdef0ULL
)
62 if (f2 (0x123456789abcdef0ULL
, 0) != 0x2468acf13579bde0ULL
)
64 if (f3 (0x123456789abcdef0ULL
, 0) != 0)
66 if (f1 (0x123456789abcdef0ULL
, 1) != 0x2468acf13579bde0ULL
)
68 if (f2 (0x123456789abcdef0ULL
, 1) != 0x2468acf13579bde0ULL
)
70 if (f3 (0x123456789abcdef0ULL
, 1) != 0x2468acf13579bde0ULL
)
72 #if __CHAR_BIT__ * __SIZEOF_INT128__ == 128
73 if (f4 ((((unsigned __int128
) 0x123456789abcdef0ULL
) << 64)
74 | 0x0fedcba987654321ULL
, 0)
75 != ((((unsigned __int128
) 0x123456789abcdef0ULL
) << 64)
76 | 0x0fedcba987654321ULL
))
78 if (f5 ((((unsigned __int128
) 0x123456789abcdef0ULL
) << 64)
79 | 0x0fedcba987654321ULL
, 0)
80 != ((((unsigned __int128
) 0x2468acf13579bde0ULL
) << 64)
81 | 0x1fdb97530eca8642ULL
))
83 if (f6 ((((unsigned __int128
) 0x123456789abcdef0ULL
) << 64)
84 | 0x0fedcba987654321ULL
, 0) != 0)
86 if (f4 ((((unsigned __int128
) 0x123456789abcdef0ULL
) << 64)
87 | 0x0fedcba987654321ULL
, 1)
88 != ((((unsigned __int128
) 0x2468acf13579bde0ULL
) << 64)
89 | 0x1fdb97530eca8642ULL
))
91 if (f5 ((((unsigned __int128
) 0x123456789abcdef0ULL
) << 64)
92 | 0x0fedcba987654321ULL
, 1)
93 != ((((unsigned __int128
) 0x2468acf13579bde0ULL
) << 64)
94 | 0x1fdb97530eca8642ULL
))
96 if (f6 ((((unsigned __int128
) 0x123456789abcdef0ULL
) << 64)
97 | 0x0fedcba987654321ULL
, 1)
98 != ((((unsigned __int128
) 0x2468acf13579bde0ULL
) << 64)
99 | 0x1fdb97530eca8642ULL
))