1; Test f128 strict comparisons on z14. 2; 3; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z14 | FileCheck %s 4 5; There is no memory form of 128-bit comparison. 6define i64 @f1(i64 %a, i64 %b, fp128 *%ptr1, fp128 *%ptr2) #0 { 7; CHECK-LABEL: f1: 8; CHECK-DAG: vl [[REG1:%v[0-9]+]], 0(%r4) 9; CHECK-DAG: vl [[REG2:%v[0-9]+]], 0(%r5) 10; CHECK: wfcxb [[REG1]], [[REG2]] 11; CHECK-NEXT: locgrne %r2, %r3 12; CHECK: br %r14 13 %f1 = load fp128, fp128 *%ptr1 14 %f2 = load fp128, fp128 *%ptr2 15 %cond = call i1 @llvm.experimental.constrained.fcmp.f128( 16 fp128 %f1, fp128 %f2, 17 metadata !"oeq", 18 metadata !"fpexcept.strict") #0 19 %res = select i1 %cond, i64 %a, i64 %b 20 ret i64 %res 21} 22 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. 25define i64 @f2(i64 %a, i64 %b, fp128 *%ptr) #0 { 26; CHECK-LABEL: f2: 27; CHECK-DAG: vl [[REG1:%v[0-9]+]], 0(%r4) 28; CHECK-DAG: vzero [[REG2:%v[0-9]+]] 29; CHECK: wfcxb [[REG1]], [[REG2]] 30; CHECK-NEXT: locgrne %r2, %r3 31; CHECK: br %r14 32 %f = load fp128, fp128 *%ptr 33 %cond = call i1 @llvm.experimental.constrained.fcmp.f128( 34 fp128 %f, fp128 0xL00000000000000000000000000000000, 35 metadata !"oeq", 36 metadata !"fpexcept.strict") #0 37 %res = select i1 %cond, i64 %a, i64 %b 38 ret i64 %res 39} 40 41attributes #0 = { strictfp } 42 43declare i1 @llvm.experimental.constrained.fcmp.f128(fp128, fp128, metadata, metadata) 44 45