205 lines · plain
1; RUN: llc -O3 < %s -mtriple=arm64 | FileCheck %s2 3; CHECK-LABEL: test1:4; CHECK: frintm5; CHECK-NOT: frintx6define float @test1(float %a) #0 {7entry:8 %call = tail call float @floorf(float %a) nounwind readnone9 ret float %call10}11 12declare float @floorf(float) nounwind readnone13 14; CHECK-LABEL: test2:15; CHECK: frintm16; CHECK-NOT: frintx17define double @test2(double %a) #0 {18entry:19 %call = tail call double @floor(double %a) nounwind readnone20 ret double %call21}22 23declare double @floor(double) nounwind readnone24 25; CHECK-LABEL: test3:26; CHECK: frinti27define float @test3(float %a) #0 {28entry:29 %call = tail call float @nearbyintf(float %a) nounwind readnone30 ret float %call31}32 33declare float @nearbyintf(float) nounwind readnone34 35; CHECK-LABEL: test4:36; CHECK: frinti37define double @test4(double %a) #0 {38entry:39 %call = tail call double @nearbyint(double %a) nounwind readnone40 ret double %call41}42 43declare double @nearbyint(double) nounwind readnone44 45; CHECK-LABEL: test5:46; CHECK: frintp47; CHECK-NOT: frintx48define float @test5(float %a) #0 {49entry:50 %call = tail call float @ceilf(float %a) nounwind readnone51 ret float %call52}53 54declare float @ceilf(float) nounwind readnone55 56; CHECK-LABEL: test6:57; CHECK: frintp58; CHECK-NOT: frintx59define double @test6(double %a) #0 {60entry:61 %call = tail call double @ceil(double %a) nounwind readnone62 ret double %call63}64 65declare double @ceil(double) nounwind readnone66 67; CHECK-LABEL: test7:68; CHECK: frintx69define float @test7(float %a) #0 {70entry:71 %call = tail call float @rintf(float %a) nounwind readnone72 ret float %call73}74 75declare float @rintf(float) nounwind readnone76 77; CHECK-LABEL: test8:78; CHECK: frintx79define double @test8(double %a) #0 {80entry:81 %call = tail call double @rint(double %a) nounwind readnone82 ret double %call83}84 85declare double @rint(double) nounwind readnone86 87; CHECK-LABEL: test9:88; CHECK: frintz89; CHECK-NOT: frintx90define float @test9(float %a) #0 {91entry:92 %call = tail call float @truncf(float %a) nounwind readnone93 ret float %call94}95 96declare float @truncf(float) nounwind readnone97 98; CHECK-LABEL: test10:99; CHECK: frintz100; CHECK-NOT: frintx101define double @test10(double %a) #0 {102entry:103 %call = tail call double @trunc(double %a) nounwind readnone104 ret double %call105}106 107declare double @trunc(double) nounwind readnone108 109; CHECK-LABEL: test11:110; CHECK: frinta111; CHECK-NOT: frintx112define float @test11(float %a) #0 {113entry:114 %call = tail call float @roundf(float %a) nounwind readnone115 ret float %call116}117 118declare float @roundf(float %a) nounwind readnone119 120; CHECK-LABEL: test12:121; CHECK: frinta122; CHECK-NOT: frintx123define double @test12(double %a) #0 {124entry:125 %call = tail call double @round(double %a) nounwind readnone126 ret double %call127}128 129declare double @round(double %a) nounwind readnone130 131; CHECK-LABEL: test13:132; CHECK-NOT: frintx133; CHECK: frintm134define float @test13(float %a) #1 {135entry:136 %call = tail call float @floorf(float %a) nounwind readnone137 ret float %call138}139 140; CHECK-LABEL: test14:141; CHECK-NOT: frintx142; CHECK: frintm143define double @test14(double %a) #1 {144entry:145 %call = tail call double @floor(double %a) nounwind readnone146 ret double %call147}148 149; CHECK-LABEL: test15:150; CHECK-NOT: frintx151; CHECK: frintp152define float @test15(float %a) #1 {153entry:154 %call = tail call float @ceilf(float %a) nounwind readnone155 ret float %call156}157 158; CHECK-LABEL: test16:159; CHECK-NOT: frintx160; CHECK: frintp161define double @test16(double %a) #1 {162entry:163 %call = tail call double @ceil(double %a) nounwind readnone164 ret double %call165}166 167; CHECK-LABEL: test17:168; CHECK-NOT: frintx169; CHECK: frintz170define float @test17(float %a) #1 {171entry:172 %call = tail call float @truncf(float %a) nounwind readnone173 ret float %call174}175 176; CHECK-LABEL: test18:177; CHECK-NOT: frintx178; CHECK: frintz179define double @test18(double %a) #1 {180entry:181 %call = tail call double @trunc(double %a) nounwind readnone182 ret double %call183}184 185; CHECK-LABEL: test19:186; CHECK-NOT: frintx187; CHECK: frinta188define float @test19(float %a) #1 {189entry:190 %call = tail call float @roundf(float %a) nounwind readnone191 ret float %call192}193 194; CHECK-LABEL: test20:195; CHECK-NOT: frintx196; CHECK: frinta197define double @test20(double %a) #1 {198entry:199 %call = tail call double @round(double %a) nounwind readnone200 ret double %call201}202 203attributes #0 = { nounwind }204attributes #1 = { nounwind }205