1 /* { dg-do compile } */
2 /* { dg-skip-if "No __builtin_cbrt" { powerpc*-*-darwin* } } */
3 /* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm -mpowerpc-gpopt -fno-ident" } */
7 extern void abort (void);
14 return pow (x
, 1.0 / 3.0);
18 main (int argc
, char *argv
[])
20 double values
[NVALS
] = { 3.0, 1.95, 2.227, 729.0, 64.0, .0008797 };
23 for (i
= 0; i
< NVALS
; i
++)
24 if (convert_it (values
[i
]) != cbrt (values
[i
]))
31 /* { dg-final { scan-assembler-times "cbrt" 2 { target powerpc*-*-* } } } */
32 /* { dg-final { scan-assembler-not "bl\[\\. \]+pow" { target powerpc*-*-* } } } */