1 ; Test f128 signaling comparisons on z14.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z14 | FileCheck %s
5 ; There is no memory form of 128-bit comparison.
6 define i64 @f1(i64 %a, i64 %b, ptr %ptr1, ptr %ptr2) #0 {
8 ; CHECK-DAG: vl [[REG1:%v[0-9]+]], 0(%r4)
9 ; CHECK-DAG: vl [[REG2:%v[0-9]+]], 0(%r5)
10 ; CHECK: wfkxb [[REG1]], [[REG2]]
11 ; CHECK-NEXT: locgrne %r2, %r3
13 %f1 = load fp128, ptr %ptr1
14 %f2 = load fp128, ptr %ptr2
15 %cond = call i1 @llvm.experimental.constrained.fcmps.f128(
18 metadata !"fpexcept.strict") #0
19 %res = select i1 %cond, i64 %a, i64 %b
23 ; Check comparison with zero -- it is not worthwhile to copy to
24 ; FP pairs just so we can use LTXBR, so simply load up a zero.
25 define i64 @f2(i64 %a, i64 %b, ptr %ptr) #0 {
27 ; CHECK-DAG: vl [[REG1:%v[0-9]+]], 0(%r4)
28 ; CHECK-DAG: vzero [[REG2:%v[0-9]+]]
29 ; CHECK: wfkxb [[REG1]], [[REG2]]
30 ; CHECK-NEXT: locgrne %r2, %r3
32 %f = load fp128, ptr %ptr
33 %cond = call i1 @llvm.experimental.constrained.fcmps.f128(
34 fp128 %f, fp128 0xL00000000000000000000000000000000,
36 metadata !"fpexcept.strict") #0
37 %res = select i1 %cond, i64 %a, i64 %b
41 attributes #0 = { strictfp }
43 declare i1 @llvm.experimental.constrained.fcmps.f128(fp128, fp128, metadata, metadata)