137 lines · plain
1; RUN: llc < %s -mtriple=armv8-linux-gnueabihf -mattr=+fp-armv8 | FileCheck --check-prefix=CHECK --check-prefix=DP %s2; RUN: llc < %s -mtriple=thumbv7em-linux-gnueabihf -mattr=+fp-armv8,-d32,-fp64 | FileCheck --check-prefix=SP %s3; RUN: llc < %s -mtriple=thumbv7em-linux-gnueabihf -mattr=+fp-armv8,-d32 | FileCheck --check-prefix=DP %s4 5; CHECK-LABEL: test16; CHECK: vrintm.f327define float @test1(float %a) {8entry:9 %call = call float @floorf(float %a) nounwind readnone10 ret float %call11}12 13; CHECK-LABEL: test214; SP: b floor15; DP: vrintm.f6416define double @test2(double %a) {17entry:18 %call = call double @floor(double %a) nounwind readnone19 ret double %call20}21 22; CHECK-LABEL: test323; CHECK: vrintp.f3224define float @test3(float %a) {25entry:26 %call = call float @ceilf(float %a) nounwind readnone27 ret float %call28}29 30; CHECK-LABEL: test431; SP: b ceil32; DP: vrintp.f6433define double @test4(double %a) {34entry:35 %call = call double @ceil(double %a) nounwind readnone36 ret double %call37}38 39; CHECK-LABEL: test540; CHECK: vrinta.f3241define float @test5(float %a) {42entry:43 %call = call float @roundf(float %a) nounwind readnone44 ret float %call45}46 47; CHECK-LABEL: test648; SP: b round49; DP: vrinta.f6450define double @test6(double %a) {51entry:52 %call = call double @round(double %a) nounwind readnone53 ret double %call54}55 56; CHECK-LABEL: test757; CHECK: vrintz.f3258define float @test7(float %a) {59entry:60 %call = call float @truncf(float %a) nounwind readnone61 ret float %call62}63 64; CHECK-LABEL: test865; SP: b trunc66; DP: vrintz.f6467define double @test8(double %a) {68entry:69 %call = call double @trunc(double %a) nounwind readnone70 ret double %call71}72 73; CHECK-LABEL: test974; CHECK: vrintr.f3275define float @test9(float %a) {76entry:77 %call = call float @nearbyintf(float %a) nounwind readnone78 ret float %call79}80 81; CHECK-LABEL: test1082; SP: b nearbyint83; DP: vrintr.f6484define double @test10(double %a) {85entry:86 %call = call double @nearbyint(double %a) nounwind readnone87 ret double %call88}89 90; CHECK-LABEL: test1191; CHECK: vrintx.f3292define float @test11(float %a) {93entry:94 %call = call float @rintf(float %a) nounwind readnone95 ret float %call96}97 98; CHECK-LABEL: test1299; SP: b rint100; DP: vrintx.f64101define double @test12(double %a) {102entry:103 %call = call double @rint(double %a) nounwind readnone104 ret double %call105}106 107; CHECK-LABEL: test13108; CHECK: vrintn.f32109define float @test13(float %a) {110entry:111 %round = call float @llvm.roundeven.f32(float %a)112 ret float %round113}114 115; CHECK-LABEL: test14116; CHECK: vrintn.f64117define double @test14(double %a) {118entry:119 %round = call double @llvm.roundeven.f64(double %a)120 ret double %round121}122 123declare float @floorf(float) nounwind readnone124declare double @floor(double) nounwind readnone125declare float @ceilf(float) nounwind readnone126declare double @ceil(double) nounwind readnone127declare float @roundf(float) nounwind readnone128declare double @round(double) nounwind readnone129declare float @truncf(float) nounwind readnone130declare double @trunc(double) nounwind readnone131declare float @nearbyintf(float) nounwind readnone132declare double @nearbyint(double) nounwind readnone133declare float @rintf(float) nounwind readnone134declare double @rint(double) nounwind readnone135declare float @llvm.roundeven.f32(float)136declare double @llvm.roundeven.f64(double)137