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