• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -mtriple=thumbv7-unknown-linux %s -o - | FileCheck %s
2
3declare void @x()
4
5define void @f0(i32 %x) optsize {
6  ; CHECK-LABEL: f0:
7  ; CHECK: cbnz
8  %p = icmp eq i32 %x, 0
9  br i1 %p, label %t, label %f
10
11t:
12  call void @x()
13  br label %f
14
15f:
16  ret void
17}
18
19define void @f1(i32 %x) optsize {
20  ; CHECK-LABEL: f1:
21  ; CHECK: cmp r0, #1
22  ; CHECK: it ne
23  ; CHECK-NEXT: bxne lr
24  %p = icmp eq i32 %x, 1
25  br i1 %p, label %t, label %f
26
27t:
28  call void @x()
29  br label %f
30
31f:
32  ret void
33}
34
35define void @f2(i32 %x) {
36  ; CHECK-LABEL: f2:
37  ; CHECK: cmp r0, #0
38  ; CHECK: it ne
39  ; CHECK-NEXT: bxne lr
40  %p = icmp eq i32 %x, 0
41  br i1 %p, label %t, label %f
42
43t:
44  call void @x()
45  br label %f
46
47f:
48  ret void
49}
50