1 /* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
2 /* { dg-require-effective-target powerpc_p9vector_ok } */
3 /* { dg-options "-O2 -mpower9-vector -mno-float128" } */
4
5 /* Test that we can use #pragma GCC target to enable -mfloat128 and generate
6 code on ISA 3.0 for the float128 built-in functions. Lp64 is required
7 because we need TImode to be available to enable __float128 using hardware
8 instructions. */
9
10 #ifdef __FLOAT128__
11 #error "-mno-float128 should disable initially defining __FLOAT128__"
12 #endif
13
14 #pragma GCC target("float128")
15
16 #ifndef __FLOAT128__
17 #error "#pragma GCC target(\"float128\") should enable -mfloat128"
18 #endif
19
20 __float128
21 qabs (__float128 a)
22 {
23 return __builtin_fabsf128 (a);
24 }
25
26 /* { dg-final { scan-assembler "xsabsqp" } } */