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
12 cs_negx_y (_Float128 x
, _Float128 y
)
14 return copysignf128 (-x
, y
); /* eliminate negation. */
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} } } */