[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / float128-5.c
blob85da4b8709269be6715c2085e5c6acb183146399
1 /* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
2 /* { dg-require-effective-target powerpc_vsx_ok } */
3 /* { dg-options "-O2 -mvsx -mno-float128" } */
4 /* { dg-additional-options "-mdejagnu-cpu=power9" { target { ! has_arch_pwr9 } } } */
6 /* Test that we can use #pragma GCC target to enable -mfloat128 and generate
7 code on ISA 3.0 for the float128 built-in functions. Lp64 is required
8 because we need TImode to be available to enable __float128 using hardware
9 instructions. */
11 #ifdef __FLOAT128__
12 #error "-mno-float128 should disable initially defining __FLOAT128__"
13 #endif
15 #pragma GCC target("float128")
17 #ifndef __FLOAT128__
18 #error "#pragma GCC target(\"float128\") should enable -mfloat128"
19 #endif
21 __float128
22 qabs (__float128 a)
24 return __builtin_fabsf128 (a);
27 /* { dg-final { scan-assembler "xsabsqp" } } */