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