1 ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-darwin | FileCheck %s --check-prefix=ARM
2 ; RUN: llc < %s -O0 -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-darwin | FileCheck %s --check-prefix=THUMB
4 define void @t1a(float %a) uwtable ssp {
8 %cmp = fcmp oeq float %a, 0.000000e+00
9 ; ARM: vcmpe.f32 s{{[0-9]+}}, #0
10 ; THUMB: vcmpe.f32 s{{[0-9]+}}, #0
11 br i1 %cmp, label %if.then, label %if.end
13 if.then: ; preds = %entry
17 if.end: ; preds = %if.then, %entry
23 ; Shouldn't be able to encode -0.0 imm.
24 define void @t1b(float %a) uwtable ssp {
28 %cmp = fcmp oeq float %a, -0.000000e+00
30 ; ARM: vcmpe.f32 s{{[0-9]+}}, s{{[0-9]+}}
32 ; THUMB: vcmpe.f32 s{{[0-9]+}}, s{{[0-9]+}}
33 br i1 %cmp, label %if.then, label %if.end
35 if.then: ; preds = %entry
39 if.end: ; preds = %if.then, %entry
43 define void @t2a(double %a) uwtable ssp {
47 %cmp = fcmp oeq double %a, 0.000000e+00
48 ; ARM: vcmpe.f64 d{{[0-9]+}}, #0
49 ; THUMB: vcmpe.f64 d{{[0-9]+}}, #0
50 br i1 %cmp, label %if.then, label %if.end
52 if.then: ; preds = %entry
56 if.end: ; preds = %if.then, %entry
60 ; Shouldn't be able to encode -0.0 imm.
61 define void @t2b(double %a) uwtable ssp {
65 %cmp = fcmp oeq double %a, -0.000000e+00
67 ; ARM: vcmpe.f64 d{{[0-9]+}}, d{{[0-9]+}}
69 ; THUMB: vcmpe.f64 d{{[0-9]+}}, d{{[0-9]+}}
70 br i1 %cmp, label %if.then, label %if.end
72 if.then: ; preds = %entry
76 if.end: ; preds = %if.then, %entry
80 define void @t4(i8 signext %a) uwtable ssp {
84 %cmp = icmp eq i8 %a, -1
85 ; ARM: cmn r{{[0-9]}}, #1
86 ; THUMB: cmn.w r{{[0-9]}}, #1
87 br i1 %cmp, label %if.then, label %if.end
89 if.then: ; preds = %entry
93 if.end: ; preds = %if.then, %entry
97 define void @t5(i8 zeroext %a) uwtable ssp {
101 %cmp = icmp eq i8 %a, 1
102 ; ARM: cmp r{{[0-9]}}, #1
103 ; THUMB: cmp r{{[0-9]}}, #1
104 br i1 %cmp, label %if.then, label %if.end
106 if.then: ; preds = %entry
107 tail call void @foo()
110 if.end: ; preds = %if.then, %entry
114 define void @t6(i16 signext %a) uwtable ssp {
118 %cmp = icmp eq i16 %a, -1
119 ; ARM: cmn r{{[0-9]}}, #1
120 ; THUMB: cmn.w r{{[0-9]}}, #1
121 br i1 %cmp, label %if.then, label %if.end
123 if.then: ; preds = %entry
124 tail call void @foo()
127 if.end: ; preds = %if.then, %entry
131 define void @t7(i16 zeroext %a) uwtable ssp {
135 %cmp = icmp eq i16 %a, 1
136 ; ARM: cmp r{{[0-9]}}, #1
137 ; THUMB: cmp r{{[0-9]}}, #1
138 br i1 %cmp, label %if.then, label %if.end
140 if.then: ; preds = %entry
141 tail call void @foo()
144 if.end: ; preds = %if.then, %entry
148 define void @t8(i32 %a) uwtable ssp {
152 %cmp = icmp eq i32 %a, -1
153 ; ARM: cmn r{{[0-9]}}, #1
154 ; THUMB: cmn.w r{{[0-9]}}, #1
155 br i1 %cmp, label %if.then, label %if.end
157 if.then: ; preds = %entry
158 tail call void @foo()
161 if.end: ; preds = %if.then, %entry
165 define void @t9(i32 %a) uwtable ssp {
169 %cmp = icmp eq i32 %a, 1
170 ; ARM: cmp r{{[0-9]}}, #1
171 ; THUMB: cmp r{{[0-9]}}, #1
172 br i1 %cmp, label %if.then, label %if.end
174 if.then: ; preds = %entry
175 tail call void @foo()
178 if.end: ; preds = %if.then, %entry
182 define void @t10(i32 %a) uwtable ssp {
186 %cmp = icmp eq i32 %a, 384
187 ; ARM: cmp r{{[0-9]}}, #384
188 ; THUMB: cmp.w r{{[0-9]}}, #384
189 br i1 %cmp, label %if.then, label %if.end
191 if.then: ; preds = %entry
192 tail call void @foo()
195 if.end: ; preds = %if.then, %entry
199 define void @t11(i32 %a) uwtable ssp {
203 %cmp = icmp eq i32 %a, 4096
204 ; ARM: cmp r{{[0-9]}}, #4096
205 ; THUMB: cmp.w r{{[0-9]}}, #4096
206 br i1 %cmp, label %if.then, label %if.end
208 if.then: ; preds = %entry
209 tail call void @foo()
212 if.end: ; preds = %if.then, %entry
216 define void @t12(i8 %a) uwtable ssp {
220 %cmp = icmp ugt i8 %a, -113
221 ; ARM: cmp r{{[0-9]}}, #143
222 ; THUMB: cmp r{{[0-9]}}, #143
223 br i1 %cmp, label %if.then, label %if.end
225 if.then: ; preds = %entry
226 tail call void @foo()
229 if.end: ; preds = %if.then, %entry