xref: /llvm-project/llvm/test/CodeGen/ARM/lround-conv.ll (revision 73643b5041bbd90bc622b44fb50f0f9c15b6c8ce)
1*73643b50SAdhemerval Zanella; RUN: llc < %s -mtriple=arm-eabi -float-abi=soft | FileCheck %s --check-prefix=SOFTFP
2*73643b50SAdhemerval Zanella; RUN: llc < %s -mtriple=arm-eabi -float-abi=hard | FileCheck %s --check-prefix=HARDFP
3*73643b50SAdhemerval Zanella
4*73643b50SAdhemerval Zanella; SOFTFP-LABEL: testmsws_builtin:
5*73643b50SAdhemerval Zanella; SOFTFP:       bl      lroundf
6*73643b50SAdhemerval Zanella; HARDFP-LABEL: testmsws_builtin:
7*73643b50SAdhemerval Zanella; HARDFP:       bl      lroundf
8*73643b50SAdhemerval Zanelladefine i32 @testmsws_builtin(float %x) {
9*73643b50SAdhemerval Zanellaentry:
10*73643b50SAdhemerval Zanella  %0 = tail call i32 @llvm.lround.i32.f32(float %x)
11*73643b50SAdhemerval Zanella  ret i32 %0
12*73643b50SAdhemerval Zanella}
13*73643b50SAdhemerval Zanella
14*73643b50SAdhemerval Zanella; SOFTFP-LABEL: testmswd_builtin:
15*73643b50SAdhemerval Zanella; SOFTFP:       bl      lround
16*73643b50SAdhemerval Zanella; HARDFP-LABEL: testmswd_builtin:
17*73643b50SAdhemerval Zanella; HARDFP:       bl      lround
18*73643b50SAdhemerval Zanelladefine i32 @testmswd_builtin(double %x) {
19*73643b50SAdhemerval Zanellaentry:
20*73643b50SAdhemerval Zanella  %0 = tail call i32 @llvm.lround.i32.f64(double %x)
21*73643b50SAdhemerval Zanella  ret i32 %0
22*73643b50SAdhemerval Zanella}
23*73643b50SAdhemerval Zanella
24*73643b50SAdhemerval Zanelladeclare i32 @llvm.lround.i32.f32(float) nounwind readnone
25*73643b50SAdhemerval Zanelladeclare i32 @llvm.lround.i32.f64(double) nounwind readnone
26