1; Test all condition-code masks that are relevant for CLRJ. 2; 3; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s 4 5declare i32 @foo() 6@g1 = global i16 0 7 8define void @f1(i32 %target) { 9; CHECK-LABEL: f1: 10; CHECK: .cfi_def_cfa_offset 11; CHECK: .L[[LABEL:.*]]: 12; CHECK: clrjle %r2, {{%r[0-9]+}}, .L[[LABEL]] 13 br label %loop 14loop: 15 %val = call i32 @foo() 16 %cond = icmp ule i32 %val, %target 17 br i1 %cond, label %loop, label %exit 18exit: 19 ret void 20} 21 22define void @f2(i32 %target) { 23; CHECK-LABEL: f2: 24; CHECK: .cfi_def_cfa_offset 25; CHECK: .L[[LABEL:.*]]: 26; CHECK: clrjl %r2, {{%r[0-9]+}}, .L[[LABEL]] 27 br label %loop 28loop: 29 %val = call i32 @foo() 30 %cond = icmp ult i32 %val, %target 31 br i1 %cond, label %loop, label %exit 32exit: 33 ret void 34} 35 36define void @f3(i32 %target) { 37; CHECK-LABEL: f3: 38; CHECK: .cfi_def_cfa_offset 39; CHECK: .L[[LABEL:.*]]: 40; CHECK: clrjh %r2, {{%r[0-9]+}}, .L[[LABEL]] 41 br label %loop 42loop: 43 %val = call i32 @foo() 44 %cond = icmp ugt i32 %val, %target 45 br i1 %cond, label %loop, label %exit 46exit: 47 ret void 48} 49 50define void @f4(i32 %target) { 51; CHECK-LABEL: f4: 52; CHECK: .cfi_def_cfa_offset 53; CHECK: .L[[LABEL:.*]]: 54; CHECK: clrjhe %r2, {{%r[0-9]+}}, .L[[LABEL]] 55 br label %loop 56loop: 57 %val = call i32 @foo() 58 %cond = icmp uge i32 %val, %target 59 br i1 %cond, label %loop, label %exit 60exit: 61 ret void 62} 63