1 /* { dg-do run { target { powerpc*-*-* && lp64 } } } */
2 /* { dg-require-effective-target p9vector_hw } */
3 /* { dg-options "-mpower9-vector -O2" } */
5 #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
6 #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
12 extern _Float128
roundf128 (_Float128
);
13 extern _Float128
floorf128 (_Float128
);
14 extern _Float128
ceilf128 (_Float128
);
15 extern _Float128
truncf128 (_Float128
);
24 { -2.0Q
, -2.0Q
, -2.0Q
, -2.0Q
, -2.0Q
},
25 { -1.7Q
, -2.0Q
, -2.0Q
, -1.0Q
, -1.0Q
},
26 { -1.5Q
, -2.0Q
, -2.0Q
, -1.0Q
, -1.0Q
},
27 { -1.3Q
, -1.0Q
, -2.0Q
, -1.0Q
, -1.0Q
},
28 { +0.0Q
, +0.0Q
, +0.0Q
, +0.0Q
, +0.0Q
},
29 { +1.3Q
, +1.0Q
, +1.0Q
, +2.0Q
, +1.0Q
},
30 { +1.5Q
, +2.0Q
, +1.0Q
, +2.0Q
, +1.0Q
},
31 { +1.7Q
, +2.0Q
, +1.0Q
, +2.0Q
, +1.0Q
},
32 { +2.0Q
, +2.0Q
, +2.0Q
, +2.0Q
, +2.0Q
}
41 for (i
= 0; i
< sizeof (a
) / sizeof (a
[0]); i
++)
44 if (roundf128 (v
) != a
[i
].exp_round
)
47 if (floorf128 (v
) != a
[i
].exp_floor
)
50 if (ceilf128 (v
) != a
[i
].exp_ceil
)
53 if (truncf128 (v
) != a
[i
].exp_trunc
)