- Add a hook for target to determine whether an instruction def is
[oota-llvm.git] / test / CodeGen / Thumb2 / thumb2-bcc.ll
1 ; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s
2 ; RUN: llc < %s -march=thumb -mattr=+thumb2 | not grep it
3
4 define i32 @t1(i32 %a, i32 %b, i32 %c) {
5 ; CHECK: t1:
6 ; CHECK: cbz
7         %tmp2 = icmp eq i32 %a, 0
8         br i1 %tmp2, label %cond_false, label %cond_true
9
10 cond_true:
11         %tmp5 = add i32 %b, 1
12         %tmp6 = and i32 %tmp5, %c
13         ret i32 %tmp6
14
15 cond_false:
16         %tmp7 = add i32 %b, -1
17         %tmp8 = xor i32 %tmp7, %c
18         ret i32 %tmp8
19 }