1 ; Test all condition-code masks that are relevant for CLGRJ.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
8 define void @f1(i64 %target) {
10 ; CHECK: .cfi_def_cfa_offset
11 ; CHECK: .L[[LABEL:.*]]:
12 ; CHECK: clgrjle %r2, {{%r[0-9]+}}, .L[[LABEL]]
15 %val = call i64 @foo()
16 %cond = icmp ule i64 %val, %target
17 br i1 %cond, label %loop, label %exit
22 define void @f2(i64 %target) {
24 ; CHECK: .cfi_def_cfa_offset
25 ; CHECK: .L[[LABEL:.*]]:
26 ; CHECK: clgrjl %r2, {{%r[0-9]+}}, .L[[LABEL]]
29 %val = call i64 @foo()
30 %cond = icmp ult i64 %val, %target
31 br i1 %cond, label %loop, label %exit
36 define void @f3(i64 %target) {
38 ; CHECK: .cfi_def_cfa_offset
39 ; CHECK: .L[[LABEL:.*]]:
40 ; CHECK: clgrjh %r2, {{%r[0-9]+}}, .L[[LABEL]]
43 %val = call i64 @foo()
44 %cond = icmp ugt i64 %val, %target
45 br i1 %cond, label %loop, label %exit
50 define void @f4(i64 %target) {
52 ; CHECK: .cfi_def_cfa_offset
53 ; CHECK: .L[[LABEL:.*]]:
54 ; CHECK: clgrjhe %r2, {{%r[0-9]+}}, .L[[LABEL]]
57 %val = call i64 @foo()
58 %cond = icmp uge i64 %val, %target
59 br i1 %cond, label %loop, label %exit