mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
c4ad402053
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
17 lines
631 B
LLVM
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)
|