* ubsan.c (ubsan_expand_null_ifn): Use _v1 suffixed type mismatch
[official-gcc.git] / gcc / testsuite / gcc.target / s390 / nearestint-1.c
blob1d9a753b3e471035aae65c754257c090b5a9ad33
1 /* Since z196 the nearest integer functions can be expanded to single
2 instructions. */
4 /* { dg-do compile } */
5 /* { dg-options "-O3 -march=z196 -mzarch" } */
7 extern float ceilf (float x);
8 extern double ceil (double x);
9 extern long double ceill (long double x);
10 extern float floorf (float x);
11 extern double floor (double x);
12 extern long double floorl (long double x);
13 extern float truncf (float x);
14 extern double trunc (double x);
15 extern long double truncl (long double x);
16 extern float nearbyintf (float x);
17 extern double nearbyint (double x);
18 extern long double nearbyintl (long double x);
19 extern float rintf (float x);
20 extern double rint (double x);
21 extern long double rintl (long double x);
23 float my_ceilf (float x) { return ceilf (x); }
24 double my_ceil (double x) { return ceil (x); }
25 long double my_ceill (long double x) { return ceill (x); }
27 float my_floorf (float x) { return floorf (x); }
28 double my_floor (double x) { return floor (x); }
29 long double my_floorl (long double x) { return floorl (x); }
31 float my_truncf (float x) { return truncf (x); }
32 double my_trunc (double x) { return trunc (x); }
33 long double my_truncl (long double x) { return truncl (x); }
35 float my_nearbyintf (float x) { return nearbyintf (x); }
36 double my_nearbyint (double x) { return nearbyint (x); }
37 long double my_nearbyintl (long double x) { return nearbyintl (x); }
39 float my_rintf (float x) { return rintf (x); }
40 double my_rint (double x) { return rint (x); }
41 long double my_rintl (long double x) { return rintl (x); }
43 /* { dg-final { scan-assembler-times "fiebr\t" 1 } } */
44 /* { dg-final { scan-assembler-times "fidbr\t" 1 } } */
45 /* { dg-final { scan-assembler-times "fixbr\t" 1 } } */
46 /* { dg-final { scan-assembler-times "fiebra\t" 4 } } */
47 /* { dg-final { scan-assembler-times "fidbra\t" 4 } } */
48 /* { dg-final { scan-assembler-times "fixbra\t" 4 } } */