1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=thumbv6m-none-eabi | FileCheck %s --check-prefix=CHECK-T1
3 ; RUN: llc < %s -mtriple=thumbv7m-none-eabi | FileCheck %s --check-prefix=CHECK-T2 --check-prefix=CHECK-T2NODSP
4 ; RUN: llc < %s -mtriple=thumbv7em-none-eabi | FileCheck %s --check-prefix=CHECK-T2 --check-prefix=CHECK-T2DSP
5 ; RUN: llc < %s -mtriple=armv5t-none-eabi | FileCheck %s --check-prefix=CHECK-ARM --check-prefix=CHECK-ARMNODPS
6 ; RUN: llc < %s -mtriple=armv5te-none-eabi | FileCheck %s --check-prefix=CHECK-ARM --check-prefix=CHECK-ARMBASEDSP
7 ; RUN: llc < %s -mtriple=armv6-none-eabi | FileCheck %s --check-prefix=CHECK-ARM --check-prefix=CHECK-ARMDSP
9 declare i4 @llvm.ssub.sat.i4(i4, i4)
10 declare i8 @llvm.ssub.sat.i8(i8, i8)
11 declare i16 @llvm.ssub.sat.i16(i16, i16)
12 declare i32 @llvm.ssub.sat.i32(i32, i32)
13 declare i64 @llvm.ssub.sat.i64(i64, i64)
14 declare <4 x i32> @llvm.ssub.sat.v4i32(<4 x i32>, <4 x i32>)
16 define i32 @func(i32 %x, i32 %y) nounwind {
17 ; CHECK-T1-LABEL: func:
19 ; CHECK-T1-NEXT: subs r0, r0, r1
20 ; CHECK-T1-NEXT: bvc .LBB0_2
21 ; CHECK-T1-NEXT: @ %bb.1:
22 ; CHECK-T1-NEXT: asrs r1, r0, #31
23 ; CHECK-T1-NEXT: movs r0, #1
24 ; CHECK-T1-NEXT: lsls r0, r0, #31
25 ; CHECK-T1-NEXT: eors r0, r1
26 ; CHECK-T1-NEXT: .LBB0_2:
27 ; CHECK-T1-NEXT: bx lr
29 ; CHECK-T2NODSP-LABEL: func:
30 ; CHECK-T2NODSP: @ %bb.0:
31 ; CHECK-T2NODSP-NEXT: subs r0, r0, r1
32 ; CHECK-T2NODSP-NEXT: mov.w r1, #-2147483648
33 ; CHECK-T2NODSP-NEXT: it vs
34 ; CHECK-T2NODSP-NEXT: eorvs.w r0, r1, r0, asr #31
35 ; CHECK-T2NODSP-NEXT: bx lr
37 ; CHECK-T2DSP-LABEL: func:
38 ; CHECK-T2DSP: @ %bb.0:
39 ; CHECK-T2DSP-NEXT: qsub r0, r0, r1
40 ; CHECK-T2DSP-NEXT: bx lr
42 ; CHECK-ARMNODPS-LABEL: func:
43 ; CHECK-ARMNODPS: @ %bb.0:
44 ; CHECK-ARMNODPS-NEXT: subs r0, r0, r1
45 ; CHECK-ARMNODPS-NEXT: mov r1, #-2147483648
46 ; CHECK-ARMNODPS-NEXT: eorvs r0, r1, r0, asr #31
47 ; CHECK-ARMNODPS-NEXT: bx lr
49 ; CHECK-ARMBASEDSP-LABEL: func:
50 ; CHECK-ARMBASEDSP: @ %bb.0:
51 ; CHECK-ARMBASEDSP-NEXT: qsub r0, r0, r1
52 ; CHECK-ARMBASEDSP-NEXT: bx lr
54 ; CHECK-ARMDSP-LABEL: func:
55 ; CHECK-ARMDSP: @ %bb.0:
56 ; CHECK-ARMDSP-NEXT: qsub r0, r0, r1
57 ; CHECK-ARMDSP-NEXT: bx lr
58 %tmp = call i32 @llvm.ssub.sat.i32(i32 %x, i32 %y)
62 define i64 @func2(i64 %x, i64 %y) nounwind {
63 ; CHECK-T1-LABEL: func2:
65 ; CHECK-T1-NEXT: .save {r4, r5, r7, lr}
66 ; CHECK-T1-NEXT: push {r4, r5, r7, lr}
67 ; CHECK-T1-NEXT: mov r4, r1
68 ; CHECK-T1-NEXT: eors r1, r3
69 ; CHECK-T1-NEXT: subs r5, r0, r2
70 ; CHECK-T1-NEXT: mov r2, r4
71 ; CHECK-T1-NEXT: sbcs r2, r3
72 ; CHECK-T1-NEXT: eors r4, r2
73 ; CHECK-T1-NEXT: ands r4, r1
74 ; CHECK-T1-NEXT: asrs r1, r2, #31
75 ; CHECK-T1-NEXT: cmp r4, #0
76 ; CHECK-T1-NEXT: mov r0, r1
77 ; CHECK-T1-NEXT: bmi .LBB1_2
78 ; CHECK-T1-NEXT: @ %bb.1:
79 ; CHECK-T1-NEXT: mov r0, r5
80 ; CHECK-T1-NEXT: .LBB1_2:
81 ; CHECK-T1-NEXT: cmp r4, #0
82 ; CHECK-T1-NEXT: bmi .LBB1_4
83 ; CHECK-T1-NEXT: @ %bb.3:
84 ; CHECK-T1-NEXT: mov r1, r2
85 ; CHECK-T1-NEXT: pop {r4, r5, r7, pc}
86 ; CHECK-T1-NEXT: .LBB1_4:
87 ; CHECK-T1-NEXT: movs r2, #1
88 ; CHECK-T1-NEXT: lsls r2, r2, #31
89 ; CHECK-T1-NEXT: eors r1, r2
90 ; CHECK-T1-NEXT: pop {r4, r5, r7, pc}
92 ; CHECK-T2-LABEL: func2:
94 ; CHECK-T2-NEXT: subs r0, r0, r2
95 ; CHECK-T2-NEXT: eor.w r12, r1, r3
96 ; CHECK-T2-NEXT: sbc.w r2, r1, r3
97 ; CHECK-T2-NEXT: eors r1, r2
98 ; CHECK-T2-NEXT: ands.w r1, r1, r12
99 ; CHECK-T2-NEXT: it mi
100 ; CHECK-T2-NEXT: asrmi r0, r2, #31
101 ; CHECK-T2-NEXT: mov.w r1, #-2147483648
102 ; CHECK-T2-NEXT: it mi
103 ; CHECK-T2-NEXT: eormi.w r2, r1, r2, asr #31
104 ; CHECK-T2-NEXT: mov r1, r2
105 ; CHECK-T2-NEXT: bx lr
107 ; CHECK-ARM-LABEL: func2:
108 ; CHECK-ARM: @ %bb.0:
109 ; CHECK-ARM-NEXT: subs r0, r0, r2
110 ; CHECK-ARM-NEXT: eor r12, r1, r3
111 ; CHECK-ARM-NEXT: sbc r2, r1, r3
112 ; CHECK-ARM-NEXT: eor r1, r1, r2
113 ; CHECK-ARM-NEXT: ands r1, r12, r1
114 ; CHECK-ARM-NEXT: asrmi r0, r2, #31
115 ; CHECK-ARM-NEXT: mov r1, #-2147483648
116 ; CHECK-ARM-NEXT: eormi r2, r1, r2, asr #31
117 ; CHECK-ARM-NEXT: mov r1, r2
118 ; CHECK-ARM-NEXT: bx lr
119 %tmp = call i64 @llvm.ssub.sat.i64(i64 %x, i64 %y)
123 define signext i16 @func16(i16 signext %x, i16 signext %y) nounwind {
124 ; CHECK-T1-LABEL: func16:
126 ; CHECK-T1-NEXT: subs r0, r0, r1
127 ; CHECK-T1-NEXT: ldr r1, .LCPI2_0
128 ; CHECK-T1-NEXT: cmp r0, r1
129 ; CHECK-T1-NEXT: blt .LBB2_2
130 ; CHECK-T1-NEXT: @ %bb.1:
131 ; CHECK-T1-NEXT: mov r0, r1
132 ; CHECK-T1-NEXT: .LBB2_2:
133 ; CHECK-T1-NEXT: ldr r1, .LCPI2_1
134 ; CHECK-T1-NEXT: cmp r0, r1
135 ; CHECK-T1-NEXT: bgt .LBB2_4
136 ; CHECK-T1-NEXT: @ %bb.3:
137 ; CHECK-T1-NEXT: mov r0, r1
138 ; CHECK-T1-NEXT: .LBB2_4:
139 ; CHECK-T1-NEXT: bx lr
140 ; CHECK-T1-NEXT: .p2align 2
141 ; CHECK-T1-NEXT: @ %bb.5:
142 ; CHECK-T1-NEXT: .LCPI2_0:
143 ; CHECK-T1-NEXT: .long 32767 @ 0x7fff
144 ; CHECK-T1-NEXT: .LCPI2_1:
145 ; CHECK-T1-NEXT: .long 4294934528 @ 0xffff8000
147 ; CHECK-T2NODSP-LABEL: func16:
148 ; CHECK-T2NODSP: @ %bb.0:
149 ; CHECK-T2NODSP-NEXT: subs r0, r0, r1
150 ; CHECK-T2NODSP-NEXT: ssat r0, #16, r0
151 ; CHECK-T2NODSP-NEXT: bx lr
153 ; CHECK-T2DSP-LABEL: func16:
154 ; CHECK-T2DSP: @ %bb.0:
155 ; CHECK-T2DSP-NEXT: qsub16 r0, r0, r1
156 ; CHECK-T2DSP-NEXT: sxth r0, r0
157 ; CHECK-T2DSP-NEXT: bx lr
159 ; CHECK-ARMNODPS-LABEL: func16:
160 ; CHECK-ARMNODPS: @ %bb.0:
161 ; CHECK-ARMNODPS-NEXT: sub r0, r0, r1
162 ; CHECK-ARMNODPS-NEXT: mov r1, #255
163 ; CHECK-ARMNODPS-NEXT: orr r1, r1, #32512
164 ; CHECK-ARMNODPS-NEXT: cmp r0, r1
165 ; CHECK-ARMNODPS-NEXT: movlt r1, r0
166 ; CHECK-ARMNODPS-NEXT: ldr r0, .LCPI2_0
167 ; CHECK-ARMNODPS-NEXT: cmn r1, #32768
168 ; CHECK-ARMNODPS-NEXT: movgt r0, r1
169 ; CHECK-ARMNODPS-NEXT: bx lr
170 ; CHECK-ARMNODPS-NEXT: .p2align 2
171 ; CHECK-ARMNODPS-NEXT: @ %bb.1:
172 ; CHECK-ARMNODPS-NEXT: .LCPI2_0:
173 ; CHECK-ARMNODPS-NEXT: .long 4294934528 @ 0xffff8000
175 ; CHECK-ARMBASEDSP-LABEL: func16:
176 ; CHECK-ARMBASEDSP: @ %bb.0:
177 ; CHECK-ARMBASEDSP-NEXT: lsl r0, r0, #16
178 ; CHECK-ARMBASEDSP-NEXT: lsl r1, r1, #16
179 ; CHECK-ARMBASEDSP-NEXT: qsub r0, r0, r1
180 ; CHECK-ARMBASEDSP-NEXT: asr r0, r0, #16
181 ; CHECK-ARMBASEDSP-NEXT: bx lr
183 ; CHECK-ARMDSP-LABEL: func16:
184 ; CHECK-ARMDSP: @ %bb.0:
185 ; CHECK-ARMDSP-NEXT: qsub16 r0, r0, r1
186 ; CHECK-ARMDSP-NEXT: sxth r0, r0
187 ; CHECK-ARMDSP-NEXT: bx lr
188 %tmp = call i16 @llvm.ssub.sat.i16(i16 %x, i16 %y)
192 define signext i8 @func8(i8 signext %x, i8 signext %y) nounwind {
193 ; CHECK-T1-LABEL: func8:
195 ; CHECK-T1-NEXT: subs r0, r0, r1
196 ; CHECK-T1-NEXT: movs r1, #127
197 ; CHECK-T1-NEXT: cmp r0, #127
198 ; CHECK-T1-NEXT: blt .LBB3_2
199 ; CHECK-T1-NEXT: @ %bb.1:
200 ; CHECK-T1-NEXT: mov r0, r1
201 ; CHECK-T1-NEXT: .LBB3_2:
202 ; CHECK-T1-NEXT: mvns r1, r1
203 ; CHECK-T1-NEXT: cmp r0, r1
204 ; CHECK-T1-NEXT: bgt .LBB3_4
205 ; CHECK-T1-NEXT: @ %bb.3:
206 ; CHECK-T1-NEXT: mov r0, r1
207 ; CHECK-T1-NEXT: .LBB3_4:
208 ; CHECK-T1-NEXT: bx lr
210 ; CHECK-T2NODSP-LABEL: func8:
211 ; CHECK-T2NODSP: @ %bb.0:
212 ; CHECK-T2NODSP-NEXT: subs r0, r0, r1
213 ; CHECK-T2NODSP-NEXT: ssat r0, #8, r0
214 ; CHECK-T2NODSP-NEXT: bx lr
216 ; CHECK-T2DSP-LABEL: func8:
217 ; CHECK-T2DSP: @ %bb.0:
218 ; CHECK-T2DSP-NEXT: qsub8 r0, r0, r1
219 ; CHECK-T2DSP-NEXT: sxtb r0, r0
220 ; CHECK-T2DSP-NEXT: bx lr
222 ; CHECK-ARMNODPS-LABEL: func8:
223 ; CHECK-ARMNODPS: @ %bb.0:
224 ; CHECK-ARMNODPS-NEXT: sub r0, r0, r1
225 ; CHECK-ARMNODPS-NEXT: cmp r0, #127
226 ; CHECK-ARMNODPS-NEXT: movge r0, #127
227 ; CHECK-ARMNODPS-NEXT: cmn r0, #128
228 ; CHECK-ARMNODPS-NEXT: mvnle r0, #127
229 ; CHECK-ARMNODPS-NEXT: bx lr
231 ; CHECK-ARMBASEDSP-LABEL: func8:
232 ; CHECK-ARMBASEDSP: @ %bb.0:
233 ; CHECK-ARMBASEDSP-NEXT: lsl r0, r0, #24
234 ; CHECK-ARMBASEDSP-NEXT: lsl r1, r1, #24
235 ; CHECK-ARMBASEDSP-NEXT: qsub r0, r0, r1
236 ; CHECK-ARMBASEDSP-NEXT: asr r0, r0, #24
237 ; CHECK-ARMBASEDSP-NEXT: bx lr
239 ; CHECK-ARMDSP-LABEL: func8:
240 ; CHECK-ARMDSP: @ %bb.0:
241 ; CHECK-ARMDSP-NEXT: qsub8 r0, r0, r1
242 ; CHECK-ARMDSP-NEXT: sxtb r0, r0
243 ; CHECK-ARMDSP-NEXT: bx lr
244 %tmp = call i8 @llvm.ssub.sat.i8(i8 %x, i8 %y)
248 define signext i4 @func3(i4 signext %x, i4 signext %y) nounwind {
249 ; CHECK-T1-LABEL: func3:
251 ; CHECK-T1-NEXT: subs r0, r0, r1
252 ; CHECK-T1-NEXT: movs r1, #7
253 ; CHECK-T1-NEXT: cmp r0, #7
254 ; CHECK-T1-NEXT: blt .LBB4_2
255 ; CHECK-T1-NEXT: @ %bb.1:
256 ; CHECK-T1-NEXT: mov r0, r1
257 ; CHECK-T1-NEXT: .LBB4_2:
258 ; CHECK-T1-NEXT: mvns r1, r1
259 ; CHECK-T1-NEXT: cmp r0, r1
260 ; CHECK-T1-NEXT: bgt .LBB4_4
261 ; CHECK-T1-NEXT: @ %bb.3:
262 ; CHECK-T1-NEXT: mov r0, r1
263 ; CHECK-T1-NEXT: .LBB4_4:
264 ; CHECK-T1-NEXT: bx lr
266 ; CHECK-T2NODSP-LABEL: func3:
267 ; CHECK-T2NODSP: @ %bb.0:
268 ; CHECK-T2NODSP-NEXT: subs r0, r0, r1
269 ; CHECK-T2NODSP-NEXT: ssat r0, #4, r0
270 ; CHECK-T2NODSP-NEXT: bx lr
272 ; CHECK-T2DSP-LABEL: func3:
273 ; CHECK-T2DSP: @ %bb.0:
274 ; CHECK-T2DSP-NEXT: lsls r1, r1, #28
275 ; CHECK-T2DSP-NEXT: lsls r0, r0, #28
276 ; CHECK-T2DSP-NEXT: qsub r0, r0, r1
277 ; CHECK-T2DSP-NEXT: asrs r0, r0, #28
278 ; CHECK-T2DSP-NEXT: bx lr
280 ; CHECK-ARMNODPS-LABEL: func3:
281 ; CHECK-ARMNODPS: @ %bb.0:
282 ; CHECK-ARMNODPS-NEXT: sub r0, r0, r1
283 ; CHECK-ARMNODPS-NEXT: cmp r0, #7
284 ; CHECK-ARMNODPS-NEXT: movge r0, #7
285 ; CHECK-ARMNODPS-NEXT: cmn r0, #8
286 ; CHECK-ARMNODPS-NEXT: mvnle r0, #7
287 ; CHECK-ARMNODPS-NEXT: bx lr
289 ; CHECK-ARMBASEDSP-LABEL: func3:
290 ; CHECK-ARMBASEDSP: @ %bb.0:
291 ; CHECK-ARMBASEDSP-NEXT: lsl r0, r0, #28
292 ; CHECK-ARMBASEDSP-NEXT: lsl r1, r1, #28
293 ; CHECK-ARMBASEDSP-NEXT: qsub r0, r0, r1
294 ; CHECK-ARMBASEDSP-NEXT: asr r0, r0, #28
295 ; CHECK-ARMBASEDSP-NEXT: bx lr
297 ; CHECK-ARMDSP-LABEL: func3:
298 ; CHECK-ARMDSP: @ %bb.0:
299 ; CHECK-ARMDSP-NEXT: lsl r0, r0, #28
300 ; CHECK-ARMDSP-NEXT: lsl r1, r1, #28
301 ; CHECK-ARMDSP-NEXT: qsub r0, r0, r1
302 ; CHECK-ARMDSP-NEXT: asr r0, r0, #28
303 ; CHECK-ARMDSP-NEXT: bx lr
304 %tmp = call i4 @llvm.ssub.sat.i4(i4 %x, i4 %y)
308 define <4 x i32> @vec(<4 x i32> %x, <4 x i32> %y) nounwind {
309 ; CHECK-T1-LABEL: vec:
311 ; CHECK-T1-NEXT: .save {r4, r5, r6, lr}
312 ; CHECK-T1-NEXT: push {r4, r5, r6, lr}
313 ; CHECK-T1-NEXT: mov r4, r0
314 ; CHECK-T1-NEXT: ldr r6, [sp, #16]
315 ; CHECK-T1-NEXT: subs r0, r0, r6
316 ; CHECK-T1-NEXT: movs r5, #1
317 ; CHECK-T1-NEXT: lsls r5, r5, #31
318 ; CHECK-T1-NEXT: cmp r4, r6
319 ; CHECK-T1-NEXT: bvc .LBB5_2
320 ; CHECK-T1-NEXT: @ %bb.1:
321 ; CHECK-T1-NEXT: asrs r0, r0, #31
322 ; CHECK-T1-NEXT: eors r0, r5
323 ; CHECK-T1-NEXT: .LBB5_2:
324 ; CHECK-T1-NEXT: ldr r4, [sp, #20]
325 ; CHECK-T1-NEXT: subs r1, r1, r4
326 ; CHECK-T1-NEXT: bvc .LBB5_4
327 ; CHECK-T1-NEXT: @ %bb.3:
328 ; CHECK-T1-NEXT: asrs r1, r1, #31
329 ; CHECK-T1-NEXT: eors r1, r5
330 ; CHECK-T1-NEXT: .LBB5_4:
331 ; CHECK-T1-NEXT: ldr r4, [sp, #24]
332 ; CHECK-T1-NEXT: subs r2, r2, r4
333 ; CHECK-T1-NEXT: bvc .LBB5_6
334 ; CHECK-T1-NEXT: @ %bb.5:
335 ; CHECK-T1-NEXT: asrs r2, r2, #31
336 ; CHECK-T1-NEXT: eors r2, r5
337 ; CHECK-T1-NEXT: .LBB5_6:
338 ; CHECK-T1-NEXT: ldr r4, [sp, #28]
339 ; CHECK-T1-NEXT: subs r3, r3, r4
340 ; CHECK-T1-NEXT: bvc .LBB5_8
341 ; CHECK-T1-NEXT: @ %bb.7:
342 ; CHECK-T1-NEXT: asrs r3, r3, #31
343 ; CHECK-T1-NEXT: eors r3, r5
344 ; CHECK-T1-NEXT: .LBB5_8:
345 ; CHECK-T1-NEXT: pop {r4, r5, r6, pc}
347 ; CHECK-T2NODSP-LABEL: vec:
348 ; CHECK-T2NODSP: @ %bb.0:
349 ; CHECK-T2NODSP-NEXT: .save {r7, lr}
350 ; CHECK-T2NODSP-NEXT: push {r7, lr}
351 ; CHECK-T2NODSP-NEXT: ldr.w r12, [sp, #8]
352 ; CHECK-T2NODSP-NEXT: ldr.w lr, [sp, #12]
353 ; CHECK-T2NODSP-NEXT: subs.w r0, r0, r12
354 ; CHECK-T2NODSP-NEXT: mov.w r12, #-2147483648
355 ; CHECK-T2NODSP-NEXT: it vs
356 ; CHECK-T2NODSP-NEXT: eorvs.w r0, r12, r0, asr #31
357 ; CHECK-T2NODSP-NEXT: subs.w r1, r1, lr
358 ; CHECK-T2NODSP-NEXT: ldr.w lr, [sp, #16]
359 ; CHECK-T2NODSP-NEXT: it vs
360 ; CHECK-T2NODSP-NEXT: eorvs.w r1, r12, r1, asr #31
361 ; CHECK-T2NODSP-NEXT: subs.w r2, r2, lr
362 ; CHECK-T2NODSP-NEXT: ldr.w lr, [sp, #20]
363 ; CHECK-T2NODSP-NEXT: it vs
364 ; CHECK-T2NODSP-NEXT: eorvs.w r2, r12, r2, asr #31
365 ; CHECK-T2NODSP-NEXT: subs.w r3, r3, lr
366 ; CHECK-T2NODSP-NEXT: it vs
367 ; CHECK-T2NODSP-NEXT: eorvs.w r3, r12, r3, asr #31
368 ; CHECK-T2NODSP-NEXT: pop {r7, pc}
370 ; CHECK-T2DSP-LABEL: vec:
371 ; CHECK-T2DSP: @ %bb.0:
372 ; CHECK-T2DSP-NEXT: ldr.w r12, [sp]
373 ; CHECK-T2DSP-NEXT: qsub r0, r0, r12
374 ; CHECK-T2DSP-NEXT: ldr.w r12, [sp, #4]
375 ; CHECK-T2DSP-NEXT: qsub r1, r1, r12
376 ; CHECK-T2DSP-NEXT: ldr.w r12, [sp, #8]
377 ; CHECK-T2DSP-NEXT: qsub r2, r2, r12
378 ; CHECK-T2DSP-NEXT: ldr.w r12, [sp, #12]
379 ; CHECK-T2DSP-NEXT: qsub r3, r3, r12
380 ; CHECK-T2DSP-NEXT: bx lr
382 ; CHECK-ARMNODPS-LABEL: vec:
383 ; CHECK-ARMNODPS: @ %bb.0:
384 ; CHECK-ARMNODPS-NEXT: .save {r11, lr}
385 ; CHECK-ARMNODPS-NEXT: push {r11, lr}
386 ; CHECK-ARMNODPS-NEXT: ldr r12, [sp, #8]
387 ; CHECK-ARMNODPS-NEXT: ldr lr, [sp, #12]
388 ; CHECK-ARMNODPS-NEXT: subs r0, r0, r12
389 ; CHECK-ARMNODPS-NEXT: mov r12, #-2147483648
390 ; CHECK-ARMNODPS-NEXT: eorvs r0, r12, r0, asr #31
391 ; CHECK-ARMNODPS-NEXT: subs r1, r1, lr
392 ; CHECK-ARMNODPS-NEXT: ldr lr, [sp, #16]
393 ; CHECK-ARMNODPS-NEXT: eorvs r1, r12, r1, asr #31
394 ; CHECK-ARMNODPS-NEXT: subs r2, r2, lr
395 ; CHECK-ARMNODPS-NEXT: ldr lr, [sp, #20]
396 ; CHECK-ARMNODPS-NEXT: eorvs r2, r12, r2, asr #31
397 ; CHECK-ARMNODPS-NEXT: subs r3, r3, lr
398 ; CHECK-ARMNODPS-NEXT: eorvs r3, r12, r3, asr #31
399 ; CHECK-ARMNODPS-NEXT: pop {r11, pc}
401 ; CHECK-ARMBASEDSP-LABEL: vec:
402 ; CHECK-ARMBASEDSP: @ %bb.0:
403 ; CHECK-ARMBASEDSP-NEXT: ldr r12, [sp]
404 ; CHECK-ARMBASEDSP-NEXT: qsub r0, r0, r12
405 ; CHECK-ARMBASEDSP-NEXT: ldr r12, [sp, #4]
406 ; CHECK-ARMBASEDSP-NEXT: qsub r1, r1, r12
407 ; CHECK-ARMBASEDSP-NEXT: ldr r12, [sp, #8]
408 ; CHECK-ARMBASEDSP-NEXT: qsub r2, r2, r12
409 ; CHECK-ARMBASEDSP-NEXT: ldr r12, [sp, #12]
410 ; CHECK-ARMBASEDSP-NEXT: qsub r3, r3, r12
411 ; CHECK-ARMBASEDSP-NEXT: bx lr
413 ; CHECK-ARMDSP-LABEL: vec:
414 ; CHECK-ARMDSP: @ %bb.0:
415 ; CHECK-ARMDSP-NEXT: ldr r12, [sp]
416 ; CHECK-ARMDSP-NEXT: qsub r0, r0, r12
417 ; CHECK-ARMDSP-NEXT: ldr r12, [sp, #4]
418 ; CHECK-ARMDSP-NEXT: qsub r1, r1, r12
419 ; CHECK-ARMDSP-NEXT: ldr r12, [sp, #8]
420 ; CHECK-ARMDSP-NEXT: qsub r2, r2, r12
421 ; CHECK-ARMDSP-NEXT: ldr r12, [sp, #12]
422 ; CHECK-ARMDSP-NEXT: qsub r3, r3, r12
423 ; CHECK-ARMDSP-NEXT: bx lr
424 %tmp = call <4 x i32> @llvm.ssub.sat.v4i32(<4 x i32> %x, <4 x i32> %y)