1 ; Test signaling vector floating-point comparisons on z13.
2 ; Note that these must be scalarized as we do not have native instructions.
4 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
7 define <4 x i32> @f1(<4 x float> %val1, <4 x float> %val2) #0 {
14 %cmp = call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(
15 <4 x float> %val1, <4 x float> %val2,
17 metadata !"fpexcept.strict") #0
18 %ret = sext <4 x i1> %cmp to <4 x i32>
23 define <2 x i64> @f2(<2 x i64> %dummy, <2 x double> %val1, <2 x double> %val2) #0 {
25 ; CHECK: {{kdbr|wfkdb}}
26 ; CHECK: {{kdbr|wfkdb}}
28 %cmp = call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(
29 <2 x double> %val1, <2 x double> %val2,
31 metadata !"fpexcept.strict") #0
32 %ret = sext <2 x i1> %cmp to <2 x i64>
36 ; Test an f64 comparison that uses vector registers.
37 define i64 @f3(i64 %a, i64 %b, double %f1, <2 x double> %vec) #0 {
39 ; CHECK: wfkdb %f0, %v24
40 ; CHECK-NEXT: locgrne %r2, %r3
42 %f2 = extractelement <2 x double> %vec, i32 0
43 %cond = call i1 @llvm.experimental.constrained.fcmps.f64(
44 double %f1, double %f2,
46 metadata !"fpexcept.strict") #0
47 %res = select i1 %cond, i64 %a, i64 %b
51 attributes #0 = { strictfp }
53 declare <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float>, <4 x float>, metadata, metadata)
54 declare <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double>, <2 x double>, metadata, metadata)
55 declare i1 @llvm.experimental.constrained.fcmps.f64(double, double, metadata, metadata)