1 ; Test strict conversion of floating-point values to signed i32s.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
5 declare i32 @llvm.experimental.constrained.fptosi.i32.f32(float, metadata)
6 declare i32 @llvm.experimental.constrained.fptosi.i32.f64(double, metadata)
7 declare i32 @llvm.experimental.constrained.fptosi.i32.f128(fp128, metadata)
10 define i32 @f1(float %f) #0 {
12 ; CHECK: cfebr %r2, 5, %f0
14 %conv = call i32 @llvm.experimental.constrained.fptosi.i32.f32(float %f,
15 metadata !"fpexcept.strict") #0
20 define i32 @f2(double %f) #0 {
22 ; CHECK: cfdbr %r2, 5, %f0
24 %conv = call i32 @llvm.experimental.constrained.fptosi.i32.f64(double %f,
25 metadata !"fpexcept.strict") #0
30 define i32 @f3(ptr %src) #0 {
32 ; CHECK: ld %f0, 0(%r2)
33 ; CHECK: ld %f2, 8(%r2)
34 ; CHECK: cfxbr %r2, 5, %f0
36 %f = load fp128, ptr %src
37 %conv = call i32 @llvm.experimental.constrained.fptosi.i32.f128(fp128 %f,
38 metadata !"fpexcept.strict") #0
42 attributes #0 = { strictfp }