1 ; Test 32-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, i32 %i1) {
12 %cond = icmp ugt i32 %i1, 1
13 %tmp = select i1 %cond, double %a, double %b
14 %res = fadd double %tmp, 1.0
18 ; Check the top of the CLIJ range.
19 define double @f2(double %a, double %b, i32 %i1) {
21 ; CHECK: clijl %r2, 255
24 %cond = icmp ult i32 %i1, 255
25 %tmp = select i1 %cond, double %a, double %b
26 %res = fadd double %tmp, 1.0
30 ; Check the next value up, which needs a separate comparison.
31 define double @f3(double %a, double %b, i32 %i1) {
33 ; CHECK: clfi %r2, 256
37 %cond = icmp ult i32 %i1, 256
38 %tmp = select i1 %cond, double %a, double %b
39 %res = fadd double %tmp, 1.0
43 ; Check a value near the high end of the range.
44 define double @f4(double %a, double %b, i32 %i1) {
46 ; CHECK: clfi %r2, 4294967280
50 %cond = icmp ult i32 %i1, 4294967280
51 %tmp = select i1 %cond, double %a, double %b
52 %res = fadd double %tmp, 1.0