1 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
2 /* { dg-require-effective-target powerpc_p9vector_ok } */
3 /* { dg-options "-mpower9-vector -O2" } */
4 
5 extern _Float128 floorf128 (_Float128);
6 extern _Float128 ceilf128 (_Float128);
7 extern _Float128 roundf128 (_Float128);
8 extern _Float128 truncf128 (_Float128);
9 
10 /* Check rounding optimizations that are done for double are also done for
11    _Float128.  */
12 
13 _Float128
floor_floor_x(_Float128 x)14 floor_floor_x (_Float128 x)
15 {
16   return floorf128 (floorf128 (x));
17 }
18 
19 _Float128
ceil_ceil_x(_Float128 x)20 ceil_ceil_x (_Float128 x)
21 {
22   return ceilf128 (ceilf128 (x));
23 }
24 
25 _Float128
trunc_trunc_x(_Float128 x)26 trunc_trunc_x (_Float128 x)
27 {
28   return truncf128 (truncf128 (x));
29 }
30 
31 _Float128
round_round_x(_Float128 x)32 round_round_x (_Float128 x)
33 {
34   return roundf128 (roundf128 (x));
35 }
36 
37 /* { dg-final { scan-assembler-times {\mxsrqpi\M} 4 } } */
38 /* { dg-final { scan-assembler-not   {\mbl\M}       } } */
39