118 lines · plain
1; RUN: llc < %s -mtriple=armv8-linux-gnueabi -mattr=+fp-armv8 | FileCheck %s2; RUN: llc < %s -mtriple=armv8-linux-gnueabihf -mattr=+fp-armv8 | FileCheck %s3 4; CHECK-LABEL: test15; CHECK: vcvtm.s32.f326define i32 @test1(float %a) {7entry:8 %call = call float @floorf(float %a) nounwind readnone9 %conv = fptosi float %call to i3210 ret i32 %conv11}12 13; CHECK-LABEL: test214; CHECK: vcvtm.u32.f3215define i32 @test2(float %a) {16entry:17 %call = call float @floorf(float %a) nounwind readnone18 %conv = fptoui float %call to i3219 ret i32 %conv20}21 22; CHECK-LABEL: test323; CHECK: vcvtm.s32.f6424define i32 @test3(double %a) {25entry:26 %call = call double @floor(double %a) nounwind readnone27 %conv = fptosi double %call to i3228 ret i32 %conv29}30 31; CHECK-LABEL: test432; CHECK: vcvtm.u32.f6433define i32 @test4(double %a) {34entry:35 %call = call double @floor(double %a) nounwind readnone36 %conv = fptoui double %call to i3237 ret i32 %conv38}39 40; CHECK-LABEL: test541; CHECK: vcvtp.s32.f3242define i32 @test5(float %a) {43entry:44 %call = call float @ceilf(float %a) nounwind readnone45 %conv = fptosi float %call to i3246 ret i32 %conv47}48 49; CHECK-LABEL: test650; CHECK: vcvtp.u32.f3251define i32 @test6(float %a) {52entry:53 %call = call float @ceilf(float %a) nounwind readnone54 %conv = fptoui float %call to i3255 ret i32 %conv56}57 58; CHECK-LABEL: test759; CHECK: vcvtp.s32.f6460define i32 @test7(double %a) {61entry:62 %call = call double @ceil(double %a) nounwind readnone63 %conv = fptosi double %call to i3264 ret i32 %conv65}66 67; CHECK-LABEL: test868; CHECK: vcvtp.u32.f6469define i32 @test8(double %a) {70entry:71 %call = call double @ceil(double %a) nounwind readnone72 %conv = fptoui double %call to i3273 ret i32 %conv74}75 76; CHECK-LABEL: test977; CHECK: vcvta.s32.f3278define i32 @test9(float %a) {79entry:80 %call = call float @roundf(float %a) nounwind readnone81 %conv = fptosi float %call to i3282 ret i32 %conv83}84 85; CHECK-LABEL: test1086; CHECK: vcvta.u32.f3287define i32 @test10(float %a) {88entry:89 %call = call float @roundf(float %a) nounwind readnone90 %conv = fptoui float %call to i3291 ret i32 %conv92}93 94; CHECK-LABEL: test1195; CHECK: vcvta.s32.f6496define i32 @test11(double %a) {97entry:98 %call = call double @round(double %a) nounwind readnone99 %conv = fptosi double %call to i32100 ret i32 %conv101}102 103; CHECK-LABEL: test12104; CHECK: vcvta.u32.f64105define i32 @test12(double %a) {106entry:107 %call = call double @round(double %a) nounwind readnone108 %conv = fptoui double %call to i32109 ret i32 %conv110}111 112declare float @floorf(float) nounwind readnone113declare double @floor(double) nounwind readnone114declare float @ceilf(float) nounwind readnone115declare double @ceil(double) nounwind readnone116declare float @roundf(float) nounwind readnone117declare double @round(double) nounwind readnone118