2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / float128-hw6.c
blob89bb93ce69032659aaa6f8bdb7589ed5de99ee66
1 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
2 /* { dg-require-effective-target powerpc_p9vector_ok } */
3 /* { dg-options "-mpower9-vector -O2" } */
5 extern _Float128 fabsf128 (_Float128);
6 extern _Float128 copysignf128 (_Float128, _Float128);
8 /* Check copysign optimizations that are done for double are also done for
9 _Float128. */
11 _Float128
12 cs_negx_y (_Float128 x, _Float128 y)
14 return copysignf128 (-x, y); /* eliminate negation. */
17 _Float128
18 cs_absx_y (_Float128 x, _Float128 y)
20 return copysignf128 (fabsf128 (x), y); /* eliminate fabsf128. */
23 /* { dg-final { scan-assembler-times {\mxscpsgnqp\M} 2 } } */
24 /* { dg-final { scan-assembler-not {\mxsnegqp\M} } } */
25 /* { dg-final { scan-assembler-not {\mxsabsqp\M} } } */
26 /* { dg-final { scan-assembler-not {\mbl\M} } } */