[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / pr103743.c
blob41c686bb4cbd8457348fa52dd36dc388a7aca416
1 /* { dg-options "-O2" } */
2 /* { dg-do compile { target has_arch_ppc64 } } */
4 /* { dg-final { scan-assembler-times {\mcmpldi\M} 10 } } */
5 /* { dg-final { scan-assembler-times {\mcmpdi\M} 4 } } */
6 /* { dg-final { scan-assembler-times {\mrotldi\M} 14 } } */
8 int foo (int a);
10 int __attribute__ ((noinline)) udi_fun (unsigned long long in)
12 if (in == (0x8642000000000000ULL))
13 return foo (1);
14 if (in == (0x7642000000000000ULL))
15 return foo (12);
16 if (in == (0x8000000000000000ULL))
17 return foo (32);
18 if (in == (0x8700000000000091ULL))
19 return foo (33);
20 if (in == (0x8642FFFFFFFFFFFFULL))
21 return foo (46);
22 if (in == (0x7642FFFFFFFFFFFFULL))
23 return foo (51);
24 if (in == (0x7567000000ULL))
25 return foo (9);
26 if (in == (0xFFF8567FFFFFFFFFULL))
27 return foo (19);
29 return 0;
32 int __attribute__ ((noinline)) di_fun (long long in)
34 if (in == (0x8642000000000000LL))
35 return foo (1);
36 if (in == (0x7642000000000000LL))
37 return foo (12);
38 if (in == (0x8000000000000000LL))
39 return foo (32);
40 if (in == (0x8700000000000091LL))
41 return foo (33);
42 if (in == (0x8642FFFFFFFFFFFFLL))
43 return foo (46);
44 if (in == (0x7642FFFFFFFFFFFFLL))
45 return foo (51);
46 if (in == (0x7567000000LL))
47 return foo (9);
48 if (in == (0xFFF8567FFFFFFFFFLL))
49 return foo (19);
51 return 0;