* g++.dg/other/i386-2.C (dg-options): Add -mavx512pf.
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr55147.c
blob5be02f11c02f98f67d0bdd2f2f1f118f6aabfafa
1 /* PR target/55147 */
2 /* { dg-do run } */
3 /* { dg-options "-O1" } */
4 /* { dg-additional-options "-march=i486" { target ia32 } } */
6 extern void abort (void);
8 __attribute__((noclone, noinline)) unsigned int
9 foo (unsigned long long *p, int i)
11 return __builtin_bswap64 (p[i]);
14 int
15 main ()
17 unsigned long long p[64];
18 int i;
19 for (i = 0; i < 64; i++)
20 p[i] = 0x123456789abcdef0ULL ^ (1ULL << i) ^ (1ULL << (63 - i));
21 for (i = 0; i < 64; i++)
22 if (foo (p, i) != __builtin_bswap32 (p[i] >> 32))
23 abort ();
24 return 0;