1 ; Test 64-bit unsigned comparisons in which the second operand is constant.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
5 ; Check a value near the low end of the range. We use signed forms for
6 ; comparisons with zero, or things that are equivalent to them.
7 define double @f1(double %a, double %b, i64 %i1) {
12 %cond = icmp ugt i64 %i1, 1
13 %res = select i1 %cond, double %a, double %b
17 ; Check the top of the CLGIJ range.
18 define double @f2(double %a, double %b, i64 %i1) {
20 ; CHECK: clgijl %r2, 255
23 %cond = icmp ult i64 %i1, 255
24 %res = select i1 %cond, double %a, double %b
28 ; Check the next value up, which needs a separate comparison.
29 define double @f3(double %a, double %b, i64 %i1) {
31 ; CHECK: clgfi %r2, 256
35 %cond = icmp ult i64 %i1, 256
36 %res = select i1 %cond, double %a, double %b
40 ; Check the high end of the CLGFI range.
41 define double @f4(double %a, double %b, i64 %i1) {
43 ; CHECK: clgfi %r2, 4294967295
47 %cond = icmp ult i64 %i1, 4294967295
48 %res = select i1 %cond, double %a, double %b
52 ; Check the next value up, which must use a register comparison.
53 define double @f5(double %a, double %b, i64 %i1) {
58 %cond = icmp ult i64 %i1, 4294967296
59 %res = select i1 %cond, double %a, double %b