Debian Codegraph @

gcc/testsuite/gcc.target/s390/vector/long-double-to-float.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
3 /* { dg-do run { target { s390_z14_hw } } } */
4 #include <assert.h>
5
6 __attribute__ ((noipa)) static float
7 long_double_to_float (long double x)
8 {
9 return x;
10 }
11
12 /* { dg-final { scan-assembler-times {\n\twflrx\t%v\d+,%v\d+,0,3\n} 1 } } */
13 /* { dg-final { scan-assembler-times {\n\tledbr\t} 1 } } */
14
15 int
16 main (void)
17 {
18 assert (long_double_to_float (42.L) == 42.F);
19 assert (long_double_to_float (-42.L) == -42.F);
20 }