Debian Codegraph @

gcc/testsuite/gcc.target/powerpc/float128-hw10.c

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