xref: /llvm-project/llvm/test/CodeGen/ARM/freeze-soften.ll (revision 519f5c37962a8b747bf5e6990256a77281fa1d77)
1*519f5c37SJuneyoung Lee; RUN: llc -mtriple=thumbv8m.main-none-eabi %s -o - | FileCheck %s
2*519f5c37SJuneyoung Lee
3*519f5c37SJuneyoung Lee; Check that freeze operations on floating types are successfully softened.
4*519f5c37SJuneyoung Lee
5*519f5c37SJuneyoung Lee; CHECK-LABEL: sitofp_f32_i32:
6*519f5c37SJuneyoung Lee; CHECK: bl __aeabi_i2f
7*519f5c37SJuneyoung Leedefine float @sitofp_f32_i32(i32 %x) #0 {
8*519f5c37SJuneyoung Lee  %val = call float @llvm.experimental.constrained.sitofp.f32.i32(i32 %x, metadata !"round.tonearest", metadata !"fpexcept.strict") #0
9*519f5c37SJuneyoung Lee  %val.fr = freeze float %val
10*519f5c37SJuneyoung Lee  ret float %val.fr
11*519f5c37SJuneyoung Lee}
12*519f5c37SJuneyoung Lee
13*519f5c37SJuneyoung Leeattributes #0 = { strictfp }
14*519f5c37SJuneyoung Lee
15*519f5c37SJuneyoung Leedeclare float @llvm.experimental.constrained.sitofp.f32.i32(i32, metadata, metadata)
16*519f5c37SJuneyoung Leedeclare double @llvm.experimental.constrained.sitofp.f64.i32(i32, metadata, metadata)
17