1 /* { dg-do compile } */
2 /* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */
3 /* { dg-require-effective-target arm_v8_vfp_ok } */
4 /* { dg-options "-O2 -march=armv8-a -ffast-math" } */
5 /* { dg-add-options arm_v8_vfp } */
6
7 int
foofloat(float x)8 foofloat (float x)
9 {
10 return __builtin_lroundf (x);
11 }
12
13 /* { dg-final { scan-assembler-times "vcvta.s32.f32\ts\[0-9\]+, s\[0-9\]+" 1 } } */
14
15
16 int
foodouble(double x)17 foodouble (double x)
18 {
19 return __builtin_lround (x);
20 }
21
22 /* { dg-final { scan-assembler-times "vcvta.s32.f64\ts\[0-9\]+, d\[0-9\]+" 1 } } */
23