1 /* { dg-do compile { target powerpc*-*-* } } */
2 /* { dg-options "-O -mpowerpc-gfxopt -g0 -ffinite-math-only" } */
3 /* { dg-final { scan-assembler-not "^L" } } */
5 /* Every single one of these should be compiled into straight-line
6 code using fsel (or, in a few cases, hardwired to 'true' or
7 'false'), no branches anywhere. */
10 test_isunordered(double x
, double y
, double a
, double b
)
12 return __builtin_isunordered(x
, y
) ? a
: b
;
16 test_not_isunordered(double x
, double y
, double a
, double b
)
18 return !__builtin_isunordered(x
, y
) ? a
: b
;
22 test_isless(double x
, double y
, double a
, double b
)
24 return __builtin_isless(x
, y
) ? a
: b
;
28 test_not_isless(double x
, double y
, double a
, double b
)
30 return !__builtin_isless(x
, y
) ? a
: b
;
34 test_islessequal(double x
, double y
, double a
, double b
)
36 return __builtin_islessequal(x
, y
) ? a
: b
;
40 test_not_islessequal(double x
, double y
, double a
, double b
)
42 return !__builtin_islessequal(x
, y
) ? a
: b
;
46 test_isgreater(double x
, double y
, double a
, double b
)
48 return __builtin_isgreater(x
, y
) ? a
: b
;
52 test_not_isgreater(double x
, double y
, double a
, double b
)
54 return !__builtin_isgreater(x
, y
) ? a
: b
;
58 test_isgreaterequal(double x
, double y
, double a
, double b
)
60 return __builtin_isgreaterequal(x
, y
) ? a
: b
;
64 test_not_isgreaterequal(double x
, double y
, double a
, double b
)
66 return !__builtin_isgreaterequal(x
, y
) ? a
: b
;
70 test_islessgreater(double x
, double y
, double a
, double b
)
72 return __builtin_islessgreater(x
, y
) ? a
: b
;
76 test_not_islessgreater(double x
, double y
, double a
, double b
)
78 return !__builtin_islessgreater(x
, y
) ? a
: b
;