xref: /aosp_15_r20/external/llvm/test/CodeGen/Thumb2/cbnz.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple thumbv7-unknown-linux -o - %s | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Workerdeclare void @x()
4*9880d681SAndroid Build Coastguard Workerdeclare void @y()
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Workerdefine void @f(i32 %x, i32 %y) {
7*9880d681SAndroid Build Coastguard Worker  ; CHECK-LABEL: f:
8*9880d681SAndroid Build Coastguard Worker  ; CHECK: cbnz
9*9880d681SAndroid Build Coastguard Worker  %p = icmp eq i32 %x, 0
10*9880d681SAndroid Build Coastguard Worker  br i1 %p, label %t, label %f
11*9880d681SAndroid Build Coastguard Worker
12*9880d681SAndroid Build Coastguard Workert:
13*9880d681SAndroid Build Coastguard Worker  call void @x()
14*9880d681SAndroid Build Coastguard Worker  call void @x()
15*9880d681SAndroid Build Coastguard Worker  call void @x()
16*9880d681SAndroid Build Coastguard Worker  call void @x()
17*9880d681SAndroid Build Coastguard Worker  call void @x()
18*9880d681SAndroid Build Coastguard Worker  call void @x()
19*9880d681SAndroid Build Coastguard Worker  call void @x()
20*9880d681SAndroid Build Coastguard Worker  call void @x()
21*9880d681SAndroid Build Coastguard Worker  call void @x()
22*9880d681SAndroid Build Coastguard Worker  call void @x()
23*9880d681SAndroid Build Coastguard Worker  call void @x()
24*9880d681SAndroid Build Coastguard Worker  call void @x()
25*9880d681SAndroid Build Coastguard Worker  call void @x()
26*9880d681SAndroid Build Coastguard Worker  call void @x()
27*9880d681SAndroid Build Coastguard Worker  call void @x()
28*9880d681SAndroid Build Coastguard Worker  call void @x()
29*9880d681SAndroid Build Coastguard Worker  ; CHECK: cbnz
30*9880d681SAndroid Build Coastguard Worker  %q = icmp eq i32 %y, 0
31*9880d681SAndroid Build Coastguard Worker  br i1 %q, label %t2, label %f
32*9880d681SAndroid Build Coastguard Worker
33*9880d681SAndroid Build Coastguard Workert2:
34*9880d681SAndroid Build Coastguard Worker  call void @x()
35*9880d681SAndroid Build Coastguard Worker  call void @x()
36*9880d681SAndroid Build Coastguard Worker  call void @x()
37*9880d681SAndroid Build Coastguard Worker  call void @x()
38*9880d681SAndroid Build Coastguard Worker  call void @x()
39*9880d681SAndroid Build Coastguard Worker  call void @x()
40*9880d681SAndroid Build Coastguard Worker  call void @x()
41*9880d681SAndroid Build Coastguard Worker  call void @x()
42*9880d681SAndroid Build Coastguard Worker  call void @x()
43*9880d681SAndroid Build Coastguard Worker  call void @x()
44*9880d681SAndroid Build Coastguard Worker  call void @x()
45*9880d681SAndroid Build Coastguard Worker  call void @x()
46*9880d681SAndroid Build Coastguard Worker  call void @x()
47*9880d681SAndroid Build Coastguard Worker  call void @x()
48*9880d681SAndroid Build Coastguard Worker  call void @x()
49*9880d681SAndroid Build Coastguard Worker  br label %f
50*9880d681SAndroid Build Coastguard Worker
51*9880d681SAndroid Build Coastguard Workerf:
52*9880d681SAndroid Build Coastguard Worker  call void @y()
53*9880d681SAndroid Build Coastguard Worker  ret void
54*9880d681SAndroid Build Coastguard Worker}
55