[PR64164] Drop copyrename, use coalescible partition as base when optimizing.
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr54436.c
blob4bce324090665ee129ba414f8f4ab9f3b5f44c19
1 /* PR target/54436 */
2 /* { dg-do assemble } */
4 #if __SIZEOF_SHORT__ == 2 && __SIZEOF_LONG_LONG__ == 8
5 static inline unsigned short
6 baz (unsigned short *x)
8 union U { unsigned short a; unsigned char b[2]; } u = { *x };
9 u.b[0] = ((u.b[0] * 0x0802ULL & 0x22110ULL)
10 | (u.b[0] * 0x8020ULL & 0x88440ULL)) * 0x10101ULL >> 16;
11 u.b[1] = ((u.b[1] * 0x0802ULL & 0x22110ULL)
12 | (u.b[1] * 0x8020ULL & 0x88440ULL)) * 0x10101ULL >> 16;
13 unsigned char t = u.b[0];
14 u.b[0] = u.b[1];
15 u.b[1] = t;
16 return u.a;
19 static inline unsigned long long
20 bar (unsigned long long *x)
22 union U { unsigned long long a; unsigned short b[4]; } u = { *x };
23 u.b[0] = baz (&u.b[0]);
24 return u.a;
27 void
28 foo (void)
30 unsigned long long l = -1ULL;
31 __asm volatile ("" : : "r" (bar (&l)));
33 #else
34 void
35 foo (void)
38 #endif