1 ; Test f128 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, fp128 *%ptr1, fp128 *%ptr2) {
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
13 %f1 = load fp128, fp128 *%ptr1
14 %f2 = load fp128, fp128 *%ptr2
15 %cond = fcmp oeq fp128 %f1, %f2
16 %res = select i1 %cond, i64 %a, i64 %b
20 ; Check comparison with zero -- it is not worthwhile to copy to
21 ; FP pairs just so we can use LTXBR, so simply load up a zero.
22 define i64 @f2(i64 %a, i64 %b, fp128 *%ptr) {
24 ; CHECK-DAG: vl [[REG1:%v[0-9]+]], 0(%r4)
25 ; CHECK-DAG: vzero [[REG2:%v[0-9]+]]
26 ; CHECK: wfcxb [[REG1]], [[REG2]]
27 ; CHECK-NEXT: locgrne %r2, %r3
29 %f = load fp128, fp128 *%ptr
30 %cond = fcmp oeq fp128 %f, 0xL00000000000000000000000000000000
31 %res = select i1 %cond, i64 %a, i64 %b