[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / pr82748-1.c
blobfe053d9cc202d782f88eb9414c7f2e731f10b120
1 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
2 /* { dg-require-effective-target powerpc_vsx_ok } */
3 /* { dg-options "-mvsx -O2 -mabi=ieeelongdouble -Wno-psabi" } */
4 /* { dg-additional-options "-mdejagnu-cpu=power9" { target { ! has_arch_pwr9 } } } */
6 /* Make sure the old 'q' builtin functions work correctly when the long double
7 default has been changed to be IEEE 128-bit floating point. */
9 _Float128
10 do_fabs_f (_Float128 a)
12 return __builtin_fabsq (a);
15 _Float128
16 do_copysign_f (_Float128 a, _Float128 b)
18 return __builtin_copysignq (a, b);
21 _Float128
22 do_inf_f (void)
24 return __builtin_infq ();
27 _Float128
28 do_nan_f (void)
30 return __builtin_nanq ("");
33 _Float128
34 do_nans_f (void)
36 return __builtin_nansq ("");
39 _Float128
40 do_huge_val_f (void)
42 return __builtin_huge_valq ();
45 long double
46 do_fabs_ld (long double a)
48 return __builtin_fabsq (a);
51 long double
52 do_copysign_ld (long double a, long double b)
54 return __builtin_copysignq (a, b);
57 long double
58 do_inf_ld (void)
60 return __builtin_infq ();
63 long double
64 do_nan_ld (void)
66 return __builtin_nanq ("");
69 long double
70 do_nans_ld (void)
72 return __builtin_nansq ("");
75 long double
76 do_huge_val_ld (void)
78 return __builtin_huge_valq ();
81 /* { dg-final { scan-assembler {\mxsabsqp\M} } } */
82 /* { dg-final { scan-assembler {\mxscpsgnqp\M} } } */
83 /* { dg-final { scan-assembler-not {\mbl\M} } } */