Enable generating legacy IT block for AArch32
[oota-llvm.git] / test / CodeGen / Thumb2 / v8_IT_5.ll
1 ; RUN: llc < %s -mtriple=thumbv8 | FileCheck %s
2 ; RUN: llc < %s -mtriple=thumbv7 -arm-restrict-it | FileCheck %s
3 ; CHECK: it     ne
4 ; CHECK-NEXT: cmpne
5 ; CHECK-NEXT: beq
6 ; CHECK: cmp
7 ; CHECK-NEXT: beq
8 ; CHECK-NEXT: %if.else163
9 ; CHECK-NEXT: mov.w
10 ; CHECK-NEXT: b
11 ; CHECK-NEXT: %if.else145
12 ; CHECK-NEXT: mov.w
13
14 %struct.hc = type { i32, i32, i32, i32 }
15
16 define i32 @t(i32 %type) optsize {
17 entry:
18   br i1 undef, label %if.then, label %if.else
19
20 if.then:
21   unreachable
22
23 if.else:
24   br i1 undef, label %if.then15, label %if.else18
25
26 if.then15:
27   unreachable
28
29 if.else18:
30   switch i32 %type, label %if.else173 [
31     i32 3, label %if.then115
32     i32 1, label %if.then102
33   ]
34
35 if.then102:
36   br i1 undef, label %cond.true10.i, label %t.exit
37
38 cond.true10.i:
39   br label %t.exit
40
41 t.exit:
42   unreachable
43
44 if.then115:
45   br i1 undef, label %if.else163, label %if.else145
46
47 if.else145:
48   %call150 = call fastcc %struct.hc* @foo(%struct.hc* undef, i32 34865152) optsize
49   br label %while.body172
50
51 if.else163:
52   %call168 = call fastcc %struct.hc* @foo(%struct.hc* undef, i32 34078720) optsize
53   br label %while.body172
54
55 while.body172:
56   br label %while.body172
57
58 if.else173:
59   ret i32 -1
60 }
61
62 declare hidden fastcc %struct.hc* @foo(%struct.hc* nocapture, i32) nounwind optsize
63