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