1 ; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mattr=mips16 -mattr=+soft-float -mips16-hard-float -relocation-model=static < %s | FileCheck %s -check-prefix=ci
3 @i = global i32 0, align 4
4 @j = common global i32 0, align 4
5 @k = common global i32 0, align 4
7 ; Function Attrs: nounwind optsize
10 %0 = load i32, i32* @i, align 4, !tbaa !1
11 %cmp = icmp eq i32 %0, 0
12 br i1 %cmp, label %if.then, label %if.else
14 if.then: ; preds = %entry
15 tail call void asm sideeffect ".space 1000", ""() #1, !srcloc !5
18 if.else: ; preds = %entry
19 tail call void asm sideeffect ".space 1004", ""() #1, !srcloc !6
22 if.end: ; preds = %if.else, %if.then
23 %storemerge = phi i32 [ 1, %if.else ], [ 0, %if.then ]
24 store i32 %storemerge, i32* @i, align 4, !tbaa !1
33 ; Function Attrs: nounwind optsize
36 %0 = load i32, i32* @i, align 4, !tbaa !1
37 %cmp = icmp eq i32 %0, 0
38 br i1 %cmp, label %if.then, label %if.else
40 if.then: ; preds = %entry
41 tail call void asm sideeffect ".space 1000000", ""() #1, !srcloc !7
44 if.else: ; preds = %entry
45 tail call void asm sideeffect ".space 1000004", ""() #1, !srcloc !8
48 if.end: ; preds = %if.else, %if.then
49 %storemerge = phi i32 [ 1, %if.else ], [ 0, %if.then ]
50 store i32 %storemerge, i32* @i, align 4, !tbaa !1
55 ; ci: bnez $3, $BB1_1 # 16 bit inst
56 ; ci: jal $BB1_2 # branch
61 ; Function Attrs: nounwind optsize
64 %0 = load i32, i32* @i, align 4, !tbaa !1
65 %cmp = icmp eq i32 %0, 0
66 br i1 %cmp, label %if.then, label %if.else
68 if.then: ; preds = %entry
69 store i32 10, i32* @j, align 4, !tbaa !1
70 tail call void asm sideeffect ".space 1000", ""() #1, !srcloc !9
73 if.else: ; preds = %entry
74 store i32 55, i32* @j, align 4, !tbaa !1
75 tail call void asm sideeffect ".space 1004", ""() #1, !srcloc !10
78 if.end: ; preds = %if.else, %if.then
86 ; Function Attrs: nounwind optsize
89 %0 = load i32, i32* @i, align 4, !tbaa !1
90 %cmp = icmp eq i32 %0, 0
91 br i1 %cmp, label %if.then, label %if.else
93 if.then: ; preds = %entry
94 store i32 10, i32* @j, align 4, !tbaa !1
95 tail call void asm sideeffect ".space 1000000", ""() #1, !srcloc !11
98 if.else: ; preds = %entry
99 store i32 55, i32* @j, align 4, !tbaa !1
100 tail call void asm sideeffect ".space 1000004", ""() #1, !srcloc !12
103 if.end: ; preds = %if.else, %if.then
108 ; ci: bnez $2, $BB3_1 # 16 bit inst
109 ; ci: jal $BB3_2 # branch
114 ; Function Attrs: nounwind optsize
115 define void @z0() #0 {
117 %0 = load i32, i32* @i, align 4, !tbaa !1
118 %1 = load i32, i32* @j, align 4, !tbaa !1
119 %cmp = icmp eq i32 %0, %1
120 br i1 %cmp, label %if.then, label %if.else
122 if.then: ; preds = %entry
123 store i32 1, i32* @k, align 4, !tbaa !1
124 tail call void asm sideeffect ".space 10000", ""() #1, !srcloc !13
127 if.else: ; preds = %entry
128 tail call void asm sideeffect ".space 10004", ""() #1, !srcloc !14
129 store i32 2, i32* @k, align 4, !tbaa !1
132 if.end: ; preds = %if.else, %if.then
140 ; Function Attrs: nounwind optsize
141 define void @z1() #0 {
143 %0 = load i32, i32* @i, align 4, !tbaa !1
144 %1 = load i32, i32* @j, align 4, !tbaa !1
145 %cmp = icmp eq i32 %0, %1
146 br i1 %cmp, label %if.then, label %if.else
148 if.then: ; preds = %entry
149 store i32 1, i32* @k, align 4, !tbaa !1
150 tail call void asm sideeffect ".space 10000000", ""() #1, !srcloc !15
153 if.else: ; preds = %entry
154 tail call void asm sideeffect ".space 10000004", ""() #1, !srcloc !16
155 store i32 2, i32* @k, align 4, !tbaa !1
158 if.end: ; preds = %if.else, %if.then
163 ; ci: bteqz $BB5_1 # 16 bit inst
164 ; ci: jal $BB5_2 # branch
169 ; Function Attrs: nounwind optsize
170 define void @z3() #0 {
172 %0 = load i32, i32* @i, align 4, !tbaa !1
173 %1 = load i32, i32* @j, align 4, !tbaa !1
174 %cmp1 = icmp sgt i32 %0, %1
175 br i1 %cmp1, label %if.then, label %if.end
177 if.then: ; preds = %entry, %if.then
178 tail call void asm sideeffect ".space 10000", ""() #1, !srcloc !17
179 %2 = load i32, i32* @i, align 4, !tbaa !1
180 %3 = load i32, i32* @j, align 4, !tbaa !1
181 %cmp = icmp sgt i32 %2, %3
182 br i1 %cmp, label %if.then, label %if.end
184 if.end: ; preds = %if.then, %entry
192 ; Function Attrs: nounwind optsize
193 define void @z4() #0 {
195 %0 = load i32, i32* @i, align 4, !tbaa !1
196 %1 = load i32, i32* @j, align 4, !tbaa !1
197 %cmp1 = icmp sgt i32 %0, %1
198 br i1 %cmp1, label %if.then, label %if.end
200 if.then: ; preds = %entry, %if.then
201 tail call void asm sideeffect ".space 10000000", ""() #1, !srcloc !18
202 %2 = load i32, i32* @i, align 4, !tbaa !1
203 %3 = load i32, i32* @j, align 4, !tbaa !1
204 %cmp = icmp sgt i32 %2, %3
205 br i1 %cmp, label %if.then, label %if.end
207 if.end: ; preds = %if.then, %entry
212 ; ci: btnez $BB7_1 # 16 bit inst
213 ; ci: jal $BB7_2 # branch
219 attributes #0 = { nounwind optsize "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
220 attributes #1 = { nounwind }
223 !1 = !{!2, !2, i64 0}
224 !2 = !{!"int", !3, i64 0}
225 !3 = !{!"omnipotent char", !4, i64 0}
226 !4 = !{!"Simple C/C++ TBAA"}