Use conditional internal functions in if-conversion
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / bmi2-check.h
blobab032eaa7caef043c2e2da87147bbfd34ba5b977
1 #include <stdio.h>
2 #include <stdlib.h>
4 static void bmi2_test (void);
6 static void
7 __attribute__ ((noinline))
8 do_test (void)
10 bmi2_test ();
13 int
14 main ()
16 #ifdef __BUILTIN_CPU_SUPPORTS__
17 /* The BMI2 test for pext test requires the Bit Permute doubleword
18 (bpermd) instruction added in PowerISA 2.06 along with the VSX
19 facility. So we can test for arch_2_06. */
20 if ( __builtin_cpu_supports ("arch_2_06") )
22 do_test ();
23 #ifdef DEBUG
24 printf ("PASSED\n");
25 #endif
27 #ifdef DEBUG
28 else
29 printf ("SKIPPED\n");
30 #endif
31 #endif /* __BUILTIN_CPU_SUPPORTS__ */
32 return 0;