summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM/lround-conv.ll
blob: 3aaed74830b870678e149c2fc8e5e22947d86bc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
; RUN: llc < %s -mtriple=arm-eabi -float-abi=soft | FileCheck %s --check-prefix=SOFTFP
; RUN: llc < %s -mtriple=arm-eabi -float-abi=hard | FileCheck %s --check-prefix=HARDFP

; SOFTFP-LABEL: testmsws_builtin:
; SOFTFP:       bl      lroundf
; HARDFP-LABEL: testmsws_builtin:
; HARDFP:       bl      lroundf
define i32 @testmsws_builtin(float %x) {
entry:
  %0 = tail call i32 @llvm.lround.i32.f32(float %x)
  ret i32 %0
}

; SOFTFP-LABEL: testmswd_builtin:
; SOFTFP:       bl      lround
; HARDFP-LABEL: testmswd_builtin:
; HARDFP:       bl      lround
define i32 @testmswd_builtin(double %x) {
entry:
  %0 = tail call i32 @llvm.lround.i32.f64(double %x)
  ret i32 %0
}

declare i32 @llvm.lround.i32.f32(float) nounwind readnone
declare i32 @llvm.lround.i32.f64(double) nounwind readnone
OpenPOWER on IntegriCloud