1 /* { dg-do run { target { powerpc*-*-linux* } } } */
2 /* { dg-require-effective-target ppc_float128_sw } */
3 /* { dg-options "-mvsx -O2" } */
9 #define TYPE __float128
10 #define NAN __builtin_nanq ("")
11 #define SNAN __builtin_nansq ("")
13 #define NAN __builtin_nan ("")
14 #define SNAN __builtin_nans ("")
17 extern void check (TYPE a
,
30 int i_un
) __attribute__((__noinline__
));
66 if (i_lt
!= __builtin_isless (a
, b
))
69 if (i_le
!= __builtin_islessequal (a
, b
))
72 if (i_gt
!= __builtin_isgreater (a
, b
))
75 if (i_ge
!= __builtin_isgreaterequal (a
, b
))
78 if (i_lg
!= __builtin_islessgreater (a
, b
))
81 if (i_un
!= __builtin_isunordered (a
, b
))
87 TYPE one
= (TYPE
) +1.0;
88 TYPE two
= (TYPE
) +2.0;
89 TYPE pzero
= (TYPE
) +0.0;
90 TYPE mzero
= (TYPE
) -0.0;
91 TYPE nan
= (TYPE
) NAN
;
92 TYPE snan
= (TYPE
) SNAN
;
94 check (one
, two
, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0);
95 check (one
, one
, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0);
96 check (one
, pzero
, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0);
97 check (mzero
, pzero
, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0);
98 check (nan
, one
, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
99 check (one
, nan
, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
100 check (nan
, nan
, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
101 check (snan
, one
, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
102 check (one
, snan
, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
103 check (snan
, nan
, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
104 check (nan
, snan
, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);