1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/test/CodeGen/ARM/freeze-soften.ll
Juneyoung Lee c4ad402053 [LegalizeTypes] Add SoftenFloatRes_FREEZE
Summary: This adds SoftenFloatRes_FREEZE.

Reviewers: bkramer, JamesNagurne, craig.topper, efriedma

Reviewed By: craig.topper

Subscribers: AbigailLinden, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D76980
2020-03-31 10:16:38 +09:00

17 lines
631 B
LLVM

; RUN: llc -mtriple=thumbv8m.main-none-eabi %s -o - | FileCheck %s
; Check that freeze operations on floating types are successfully softened.
; CHECK-LABEL: sitofp_f32_i32:
; CHECK: bl __aeabi_i2f
define float @sitofp_f32_i32(i32 %x) #0 {
%val = call float @llvm.experimental.constrained.sitofp.f32.i32(i32 %x, metadata !"round.tonearest", metadata !"fpexcept.strict") #0
%val.fr = freeze float %val
ret float %val.fr
}
attributes #0 = { strictfp }
declare float @llvm.experimental.constrained.sitofp.f32.i32(i32, metadata, metadata)
declare double @llvm.experimental.constrained.sitofp.f64.i32(i32, metadata, metadata)