1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=thumbv8.1m.main-arm-none-eabi -mattr=+mve -verify-machineinstrs %s -o - | FileCheck %s
4 define arm_aapcs_vfpcc <16 x i8> @sadd_int8_t(<16 x i8> %src1, <16 x i8> %src2) {
5 ; CHECK-LABEL: sadd_int8_t:
6 ; CHECK: @ %bb.0: @ %entry
7 ; CHECK-NEXT: .vsave {d8, d9}
8 ; CHECK-NEXT: vpush {d8, d9}
9 ; CHECK-NEXT: vadd.i8 q2, q0, q1
10 ; CHECK-NEXT: vmov.i8 q3, #0x80
11 ; CHECK-NEXT: vcmp.s8 lt, q2, zr
12 ; CHECK-NEXT: vmov.i8 q4, #0x7f
13 ; CHECK-NEXT: vpsel q3, q4, q3
14 ; CHECK-NEXT: vcmp.s8 gt, q0, q2
15 ; CHECK-NEXT: vmrs r0, p0
16 ; CHECK-NEXT: vcmp.s8 lt, q1, zr
17 ; CHECK-NEXT: vmrs r1, p0
18 ; CHECK-NEXT: eors r0, r1
19 ; CHECK-NEXT: vmsr p0, r0
20 ; CHECK-NEXT: vpsel q0, q3, q2
21 ; CHECK-NEXT: vpop {d8, d9}
24 %0 = call <16 x i8> @llvm.sadd.sat.v16i8(<16 x i8> %src1, <16 x i8> %src2)
28 define arm_aapcs_vfpcc <8 x i16> @sadd_int16_t(<8 x i16> %src1, <8 x i16> %src2) {
29 ; CHECK-LABEL: sadd_int16_t:
30 ; CHECK: @ %bb.0: @ %entry
31 ; CHECK-NEXT: .vsave {d8, d9}
32 ; CHECK-NEXT: vpush {d8, d9}
33 ; CHECK-NEXT: vadd.i16 q2, q0, q1
34 ; CHECK-NEXT: vmov.i16 q3, #0x8000
35 ; CHECK-NEXT: vcmp.s16 lt, q2, zr
36 ; CHECK-NEXT: vmvn.i16 q4, #0x8000
37 ; CHECK-NEXT: vpsel q3, q4, q3
38 ; CHECK-NEXT: vcmp.s16 gt, q0, q2
39 ; CHECK-NEXT: vmrs r0, p0
40 ; CHECK-NEXT: vcmp.s16 lt, q1, zr
41 ; CHECK-NEXT: vmrs r1, p0
42 ; CHECK-NEXT: eors r0, r1
43 ; CHECK-NEXT: vmsr p0, r0
44 ; CHECK-NEXT: vpsel q0, q3, q2
45 ; CHECK-NEXT: vpop {d8, d9}
48 %0 = call <8 x i16> @llvm.sadd.sat.v8i16(<8 x i16> %src1, <8 x i16> %src2)
52 define arm_aapcs_vfpcc <4 x i32> @sadd_int32_t(<4 x i32> %src1, <4 x i32> %src2) {
53 ; CHECK-LABEL: sadd_int32_t:
54 ; CHECK: @ %bb.0: @ %entry
55 ; CHECK-NEXT: .vsave {d8, d9}
56 ; CHECK-NEXT: vpush {d8, d9}
57 ; CHECK-NEXT: vadd.i32 q2, q0, q1
58 ; CHECK-NEXT: vmov.i32 q3, #0x80000000
59 ; CHECK-NEXT: vcmp.s32 lt, q2, zr
60 ; CHECK-NEXT: vmvn.i32 q4, #0x80000000
61 ; CHECK-NEXT: vpsel q3, q4, q3
62 ; CHECK-NEXT: vcmp.s32 gt, q0, q2
63 ; CHECK-NEXT: vmrs r0, p0
64 ; CHECK-NEXT: vcmp.s32 lt, q1, zr
65 ; CHECK-NEXT: vmrs r1, p0
66 ; CHECK-NEXT: eors r0, r1
67 ; CHECK-NEXT: vmsr p0, r0
68 ; CHECK-NEXT: vpsel q0, q3, q2
69 ; CHECK-NEXT: vpop {d8, d9}
72 %0 = call <4 x i32> @llvm.sadd.sat.v4i32(<4 x i32> %src1, <4 x i32> %src2)
76 define arm_aapcs_vfpcc <2 x i64> @sadd_int64_t(<2 x i64> %src1, <2 x i64> %src2) {
77 ; CHECK-LABEL: sadd_int64_t:
78 ; CHECK: @ %bb.0: @ %entry
79 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, lr}
80 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, lr}
81 ; CHECK-NEXT: vmov r0, s4
82 ; CHECK-NEXT: vmov r5, s0
83 ; CHECK-NEXT: vmov r8, s5
84 ; CHECK-NEXT: vmov r4, s1
85 ; CHECK-NEXT: vmov r7, s2
86 ; CHECK-NEXT: vmov r3, s7
87 ; CHECK-NEXT: vmov r6, s3
88 ; CHECK-NEXT: adds.w r12, r5, r0
89 ; CHECK-NEXT: adc.w r0, r4, r8
90 ; CHECK-NEXT: asrs r2, r0, #31
91 ; CHECK-NEXT: vmov.32 q2[0], r2
92 ; CHECK-NEXT: vmov.32 q2[1], r2
93 ; CHECK-NEXT: vmov r2, s6
94 ; CHECK-NEXT: adds.w lr, r7, r2
95 ; CHECK-NEXT: adc.w r2, r6, r3
96 ; CHECK-NEXT: subs.w r5, r12, r5
97 ; CHECK-NEXT: sbcs.w r4, r0, r4
98 ; CHECK-NEXT: asr.w r1, r2, #31
99 ; CHECK-NEXT: mov.w r4, #0
100 ; CHECK-NEXT: vmov.32 q2[2], r1
102 ; CHECK-NEXT: movlt r4, #1
103 ; CHECK-NEXT: vmov.32 q2[3], r1
104 ; CHECK-NEXT: adr r1, .LCPI3_0
105 ; CHECK-NEXT: vldrw.u32 q0, [r1]
106 ; CHECK-NEXT: adr r1, .LCPI3_1
107 ; CHECK-NEXT: vldrw.u32 q1, [r1]
108 ; CHECK-NEXT: cmp r4, #0
109 ; CHECK-NEXT: vbic q0, q0, q2
110 ; CHECK-NEXT: csetm r4, ne
111 ; CHECK-NEXT: vand q1, q1, q2
112 ; CHECK-NEXT: movs r1, #0
113 ; CHECK-NEXT: vorr q0, q1, q0
114 ; CHECK-NEXT: vmov.32 q1[0], r4
115 ; CHECK-NEXT: vmov.32 q1[1], r4
116 ; CHECK-NEXT: subs.w r4, lr, r7
117 ; CHECK-NEXT: sbcs.w r4, r2, r6
119 ; CHECK-NEXT: movlt r1, #1
120 ; CHECK-NEXT: cmp r1, #0
121 ; CHECK-NEXT: csetm r1, ne
122 ; CHECK-NEXT: vmov.32 q1[2], r1
123 ; CHECK-NEXT: vmov.32 q1[3], r1
124 ; CHECK-NEXT: asr.w r1, r8, #31
125 ; CHECK-NEXT: vmov.32 q2[0], r1
126 ; CHECK-NEXT: vmov.32 q2[1], r1
127 ; CHECK-NEXT: asrs r1, r3, #31
128 ; CHECK-NEXT: vmov.32 q2[2], r1
129 ; CHECK-NEXT: vmov.32 q2[3], r1
130 ; CHECK-NEXT: veor q1, q2, q1
131 ; CHECK-NEXT: vmov.32 q2[0], r12
132 ; CHECK-NEXT: vmov.32 q2[1], r0
133 ; CHECK-NEXT: vand q0, q0, q1
134 ; CHECK-NEXT: vmov.32 q2[2], lr
135 ; CHECK-NEXT: vmov.32 q2[3], r2
136 ; CHECK-NEXT: vbic q1, q2, q1
137 ; CHECK-NEXT: vorr q0, q0, q1
138 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, pc}
139 ; CHECK-NEXT: .p2align 4
140 ; CHECK-NEXT: @ %bb.1:
141 ; CHECK-NEXT: .LCPI3_0:
142 ; CHECK-NEXT: .long 0 @ 0x0
143 ; CHECK-NEXT: .long 2147483648 @ 0x80000000
144 ; CHECK-NEXT: .long 0 @ 0x0
145 ; CHECK-NEXT: .long 2147483648 @ 0x80000000
146 ; CHECK-NEXT: .LCPI3_1:
147 ; CHECK-NEXT: .long 4294967295 @ 0xffffffff
148 ; CHECK-NEXT: .long 2147483647 @ 0x7fffffff
149 ; CHECK-NEXT: .long 4294967295 @ 0xffffffff
150 ; CHECK-NEXT: .long 2147483647 @ 0x7fffffff
152 %0 = call <2 x i64> @llvm.sadd.sat.v2i64(<2 x i64> %src1, <2 x i64> %src2)
156 define arm_aapcs_vfpcc <16 x i8> @uadd_int8_t(<16 x i8> %src1, <16 x i8> %src2) {
157 ; CHECK-LABEL: uadd_int8_t:
158 ; CHECK: @ %bb.0: @ %entry
159 ; CHECK-NEXT: vmvn q2, q1
160 ; CHECK-NEXT: vmin.u8 q0, q0, q2
161 ; CHECK-NEXT: vadd.i8 q0, q0, q1
164 %0 = call <16 x i8> @llvm.uadd.sat.v16i8(<16 x i8> %src1, <16 x i8> %src2)
168 define arm_aapcs_vfpcc <8 x i16> @uadd_int16_t(<8 x i16> %src1, <8 x i16> %src2) {
169 ; CHECK-LABEL: uadd_int16_t:
170 ; CHECK: @ %bb.0: @ %entry
171 ; CHECK-NEXT: vmvn q2, q1
172 ; CHECK-NEXT: vmin.u16 q0, q0, q2
173 ; CHECK-NEXT: vadd.i16 q0, q0, q1
176 %0 = call <8 x i16> @llvm.uadd.sat.v8i16(<8 x i16> %src1, <8 x i16> %src2)
180 define arm_aapcs_vfpcc <4 x i32> @uadd_int32_t(<4 x i32> %src1, <4 x i32> %src2) {
181 ; CHECK-LABEL: uadd_int32_t:
182 ; CHECK: @ %bb.0: @ %entry
183 ; CHECK-NEXT: vmvn q2, q1
184 ; CHECK-NEXT: vmin.u32 q0, q0, q2
185 ; CHECK-NEXT: vadd.i32 q0, q0, q1
188 %0 = call <4 x i32> @llvm.uadd.sat.v4i32(<4 x i32> %src1, <4 x i32> %src2)
192 define arm_aapcs_vfpcc <2 x i64> @uadd_int64_t(<2 x i64> %src1, <2 x i64> %src2) {
193 ; CHECK-LABEL: uadd_int64_t:
194 ; CHECK: @ %bb.0: @ %entry
195 ; CHECK-NEXT: .save {r4, lr}
196 ; CHECK-NEXT: push {r4, lr}
197 ; CHECK-NEXT: vmov r2, s4
198 ; CHECK-NEXT: vmov r3, s0
199 ; CHECK-NEXT: vmov r0, s5
200 ; CHECK-NEXT: vmov r1, s1
201 ; CHECK-NEXT: vmov r4, s2
202 ; CHECK-NEXT: adds.w lr, r3, r2
203 ; CHECK-NEXT: vmov r2, s6
204 ; CHECK-NEXT: adc.w r12, r1, r0
205 ; CHECK-NEXT: subs.w r3, lr, r3
206 ; CHECK-NEXT: sbcs.w r1, r12, r1
207 ; CHECK-NEXT: vmov r3, s3
208 ; CHECK-NEXT: mov.w r1, #0
209 ; CHECK-NEXT: mov.w r0, #0
211 ; CHECK-NEXT: movlo r1, #1
212 ; CHECK-NEXT: cmp r1, #0
213 ; CHECK-NEXT: csetm r1, ne
214 ; CHECK-NEXT: vmov.32 q0[0], lr
215 ; CHECK-NEXT: vmov.32 q2[0], r1
216 ; CHECK-NEXT: vmov.32 q0[1], r12
217 ; CHECK-NEXT: vmov.32 q2[1], r1
218 ; CHECK-NEXT: vmov r1, s7
219 ; CHECK-NEXT: adds r2, r2, r4
220 ; CHECK-NEXT: vmov.32 q0[2], r2
221 ; CHECK-NEXT: adcs r1, r3
222 ; CHECK-NEXT: subs r4, r2, r4
223 ; CHECK-NEXT: sbcs.w r3, r1, r3
225 ; CHECK-NEXT: movlo r0, #1
226 ; CHECK-NEXT: cmp r0, #0
227 ; CHECK-NEXT: vmov.32 q0[3], r1
228 ; CHECK-NEXT: csetm r0, ne
229 ; CHECK-NEXT: vmov.32 q2[2], r0
230 ; CHECK-NEXT: vmov.32 q2[3], r0
231 ; CHECK-NEXT: vorr q0, q0, q2
232 ; CHECK-NEXT: pop {r4, pc}
234 %0 = call <2 x i64> @llvm.uadd.sat.v2i64(<2 x i64> %src1, <2 x i64> %src2)
239 define arm_aapcs_vfpcc <16 x i8> @ssub_int8_t(<16 x i8> %src1, <16 x i8> %src2) {
240 ; CHECK-LABEL: ssub_int8_t:
241 ; CHECK: @ %bb.0: @ %entry
242 ; CHECK-NEXT: .vsave {d8, d9}
243 ; CHECK-NEXT: vpush {d8, d9}
244 ; CHECK-NEXT: vsub.i8 q2, q0, q1
245 ; CHECK-NEXT: vmov.i8 q3, #0x80
246 ; CHECK-NEXT: vcmp.s8 lt, q2, zr
247 ; CHECK-NEXT: vmov.i8 q4, #0x7f
248 ; CHECK-NEXT: vpsel q3, q4, q3
249 ; CHECK-NEXT: vcmp.s8 gt, q0, q2
250 ; CHECK-NEXT: vmrs r0, p0
251 ; CHECK-NEXT: vcmp.s8 gt, q1, zr
252 ; CHECK-NEXT: vmrs r1, p0
253 ; CHECK-NEXT: eors r0, r1
254 ; CHECK-NEXT: vmsr p0, r0
255 ; CHECK-NEXT: vpsel q0, q3, q2
256 ; CHECK-NEXT: vpop {d8, d9}
259 %0 = call <16 x i8> @llvm.ssub.sat.v16i8(<16 x i8> %src1, <16 x i8> %src2)
263 define arm_aapcs_vfpcc <8 x i16> @ssub_int16_t(<8 x i16> %src1, <8 x i16> %src2) {
264 ; CHECK-LABEL: ssub_int16_t:
265 ; CHECK: @ %bb.0: @ %entry
266 ; CHECK-NEXT: .vsave {d8, d9}
267 ; CHECK-NEXT: vpush {d8, d9}
268 ; CHECK-NEXT: vsub.i16 q2, q0, q1
269 ; CHECK-NEXT: vmov.i16 q3, #0x8000
270 ; CHECK-NEXT: vcmp.s16 lt, q2, zr
271 ; CHECK-NEXT: vmvn.i16 q4, #0x8000
272 ; CHECK-NEXT: vpsel q3, q4, q3
273 ; CHECK-NEXT: vcmp.s16 gt, q0, q2
274 ; CHECK-NEXT: vmrs r0, p0
275 ; CHECK-NEXT: vcmp.s16 gt, q1, zr
276 ; CHECK-NEXT: vmrs r1, p0
277 ; CHECK-NEXT: eors r0, r1
278 ; CHECK-NEXT: vmsr p0, r0
279 ; CHECK-NEXT: vpsel q0, q3, q2
280 ; CHECK-NEXT: vpop {d8, d9}
283 %0 = call <8 x i16> @llvm.ssub.sat.v8i16(<8 x i16> %src1, <8 x i16> %src2)
287 define arm_aapcs_vfpcc <4 x i32> @ssub_int32_t(<4 x i32> %src1, <4 x i32> %src2) {
288 ; CHECK-LABEL: ssub_int32_t:
289 ; CHECK: @ %bb.0: @ %entry
290 ; CHECK-NEXT: .vsave {d8, d9}
291 ; CHECK-NEXT: vpush {d8, d9}
292 ; CHECK-NEXT: vsub.i32 q2, q0, q1
293 ; CHECK-NEXT: vmov.i32 q3, #0x80000000
294 ; CHECK-NEXT: vcmp.s32 lt, q2, zr
295 ; CHECK-NEXT: vmvn.i32 q4, #0x80000000
296 ; CHECK-NEXT: vpsel q3, q4, q3
297 ; CHECK-NEXT: vcmp.s32 gt, q0, q2
298 ; CHECK-NEXT: vmrs r0, p0
299 ; CHECK-NEXT: vcmp.s32 gt, q1, zr
300 ; CHECK-NEXT: vmrs r1, p0
301 ; CHECK-NEXT: eors r0, r1
302 ; CHECK-NEXT: vmsr p0, r0
303 ; CHECK-NEXT: vpsel q0, q3, q2
304 ; CHECK-NEXT: vpop {d8, d9}
307 %0 = call <4 x i32> @llvm.ssub.sat.v4i32(<4 x i32> %src1, <4 x i32> %src2)
311 define arm_aapcs_vfpcc <2 x i64> @ssub_int64_t(<2 x i64> %src1, <2 x i64> %src2) {
312 ; CHECK-LABEL: ssub_int64_t:
313 ; CHECK: @ %bb.0: @ %entry
314 ; CHECK-NEXT: .save {r4, r5, r6, lr}
315 ; CHECK-NEXT: push {r4, r5, r6, lr}
316 ; CHECK-NEXT: .vsave {d8, d9}
317 ; CHECK-NEXT: vpush {d8, d9}
318 ; CHECK-NEXT: vmov r2, s4
319 ; CHECK-NEXT: movs r0, #0
320 ; CHECK-NEXT: vmov lr, s5
321 ; CHECK-NEXT: vmov r12, s7
322 ; CHECK-NEXT: vmov r5, s0
323 ; CHECK-NEXT: vmov r4, s1
324 ; CHECK-NEXT: rsbs r3, r2, #0
325 ; CHECK-NEXT: sbcs.w r3, r0, lr
326 ; CHECK-NEXT: mov.w r3, #0
328 ; CHECK-NEXT: movlt r3, #1
329 ; CHECK-NEXT: cmp r3, #0
330 ; CHECK-NEXT: csetm r3, ne
331 ; CHECK-NEXT: vmov.32 q2[0], r3
332 ; CHECK-NEXT: vmov.32 q2[1], r3
333 ; CHECK-NEXT: vmov r3, s6
334 ; CHECK-NEXT: rsbs r1, r3, #0
335 ; CHECK-NEXT: sbcs.w r1, r0, r12
336 ; CHECK-NEXT: mov.w r1, #0
338 ; CHECK-NEXT: movlt r1, #1
339 ; CHECK-NEXT: cmp r1, #0
340 ; CHECK-NEXT: csetm r1, ne
341 ; CHECK-NEXT: subs r6, r5, r2
342 ; CHECK-NEXT: vmov.32 q2[2], r1
343 ; CHECK-NEXT: vmov.32 q2[3], r1
344 ; CHECK-NEXT: sbc.w r1, r4, lr
345 ; CHECK-NEXT: subs r5, r6, r5
346 ; CHECK-NEXT: sbcs.w r5, r1, r4
347 ; CHECK-NEXT: vmov r4, s2
348 ; CHECK-NEXT: mov.w r5, #0
350 ; CHECK-NEXT: movlt r5, #1
351 ; CHECK-NEXT: cmp r5, #0
352 ; CHECK-NEXT: csetm r5, ne
353 ; CHECK-NEXT: vmov.32 q1[0], r5
354 ; CHECK-NEXT: vmov.32 q1[1], r5
355 ; CHECK-NEXT: vmov r5, s3
356 ; CHECK-NEXT: subs r3, r4, r3
357 ; CHECK-NEXT: sbc.w r2, r5, r12
358 ; CHECK-NEXT: subs r4, r3, r4
359 ; CHECK-NEXT: sbcs.w r5, r2, r5
361 ; CHECK-NEXT: movlt r0, #1
362 ; CHECK-NEXT: cmp r0, #0
363 ; CHECK-NEXT: csetm r0, ne
364 ; CHECK-NEXT: vmov.32 q1[2], r0
365 ; CHECK-NEXT: vmov.32 q1[3], r0
366 ; CHECK-NEXT: asrs r0, r1, #31
367 ; CHECK-NEXT: veor q0, q2, q1
368 ; CHECK-NEXT: vmov.32 q2[0], r0
369 ; CHECK-NEXT: vmov.32 q2[1], r0
370 ; CHECK-NEXT: asrs r0, r2, #31
371 ; CHECK-NEXT: vmov.32 q2[2], r0
372 ; CHECK-NEXT: vmov.32 q1[0], r6
373 ; CHECK-NEXT: vmov.32 q2[3], r0
374 ; CHECK-NEXT: adr r0, .LCPI11_0
375 ; CHECK-NEXT: vldrw.u32 q3, [r0]
376 ; CHECK-NEXT: adr r0, .LCPI11_1
377 ; CHECK-NEXT: vldrw.u32 q4, [r0]
378 ; CHECK-NEXT: vmov.32 q1[1], r1
379 ; CHECK-NEXT: vmov.32 q1[2], r3
380 ; CHECK-NEXT: vbic q3, q3, q2
381 ; CHECK-NEXT: vand q2, q4, q2
382 ; CHECK-NEXT: vmov.32 q1[3], r2
383 ; CHECK-NEXT: vorr q2, q2, q3
384 ; CHECK-NEXT: vbic q1, q1, q0
385 ; CHECK-NEXT: vand q0, q2, q0
386 ; CHECK-NEXT: vorr q0, q0, q1
387 ; CHECK-NEXT: vpop {d8, d9}
388 ; CHECK-NEXT: pop {r4, r5, r6, pc}
389 ; CHECK-NEXT: .p2align 4
390 ; CHECK-NEXT: @ %bb.1:
391 ; CHECK-NEXT: .LCPI11_0:
392 ; CHECK-NEXT: .long 0 @ 0x0
393 ; CHECK-NEXT: .long 2147483648 @ 0x80000000
394 ; CHECK-NEXT: .long 0 @ 0x0
395 ; CHECK-NEXT: .long 2147483648 @ 0x80000000
396 ; CHECK-NEXT: .LCPI11_1:
397 ; CHECK-NEXT: .long 4294967295 @ 0xffffffff
398 ; CHECK-NEXT: .long 2147483647 @ 0x7fffffff
399 ; CHECK-NEXT: .long 4294967295 @ 0xffffffff
400 ; CHECK-NEXT: .long 2147483647 @ 0x7fffffff
402 %0 = call <2 x i64> @llvm.ssub.sat.v2i64(<2 x i64> %src1, <2 x i64> %src2)
406 define arm_aapcs_vfpcc <16 x i8> @usub_int8_t(<16 x i8> %src1, <16 x i8> %src2) {
407 ; CHECK-LABEL: usub_int8_t:
408 ; CHECK: @ %bb.0: @ %entry
409 ; CHECK-NEXT: vmax.u8 q0, q0, q1
410 ; CHECK-NEXT: vsub.i8 q0, q0, q1
413 %0 = call <16 x i8> @llvm.usub.sat.v16i8(<16 x i8> %src1, <16 x i8> %src2)
417 define arm_aapcs_vfpcc <8 x i16> @usub_int16_t(<8 x i16> %src1, <8 x i16> %src2) {
418 ; CHECK-LABEL: usub_int16_t:
419 ; CHECK: @ %bb.0: @ %entry
420 ; CHECK-NEXT: vmax.u16 q0, q0, q1
421 ; CHECK-NEXT: vsub.i16 q0, q0, q1
424 %0 = call <8 x i16> @llvm.usub.sat.v8i16(<8 x i16> %src1, <8 x i16> %src2)
428 define arm_aapcs_vfpcc <4 x i32> @usub_int32_t(<4 x i32> %src1, <4 x i32> %src2) {
429 ; CHECK-LABEL: usub_int32_t:
430 ; CHECK: @ %bb.0: @ %entry
431 ; CHECK-NEXT: vmax.u32 q0, q0, q1
432 ; CHECK-NEXT: vsub.i32 q0, q0, q1
435 %0 = call <4 x i32> @llvm.usub.sat.v4i32(<4 x i32> %src1, <4 x i32> %src2)
439 define arm_aapcs_vfpcc <2 x i64> @usub_int64_t(<2 x i64> %src1, <2 x i64> %src2) {
440 ; CHECK-LABEL: usub_int64_t:
441 ; CHECK: @ %bb.0: @ %entry
442 ; CHECK-NEXT: .save {r4, lr}
443 ; CHECK-NEXT: push {r4, lr}
444 ; CHECK-NEXT: vmov r2, s4
445 ; CHECK-NEXT: vmov r3, s0
446 ; CHECK-NEXT: vmov r0, s5
447 ; CHECK-NEXT: vmov r1, s1
448 ; CHECK-NEXT: vmov r4, s2
449 ; CHECK-NEXT: subs.w lr, r3, r2
450 ; CHECK-NEXT: vmov r2, s6
451 ; CHECK-NEXT: sbc.w r12, r1, r0
452 ; CHECK-NEXT: subs.w r3, r3, lr
453 ; CHECK-NEXT: sbcs.w r1, r1, r12
454 ; CHECK-NEXT: vmov r3, s3
455 ; CHECK-NEXT: mov.w r1, #0
456 ; CHECK-NEXT: mov.w r0, #0
458 ; CHECK-NEXT: movlo r1, #1
459 ; CHECK-NEXT: cmp r1, #0
460 ; CHECK-NEXT: csetm r1, ne
461 ; CHECK-NEXT: vmov.32 q0[0], lr
462 ; CHECK-NEXT: vmov.32 q2[0], r1
463 ; CHECK-NEXT: vmov.32 q0[1], r12
464 ; CHECK-NEXT: vmov.32 q2[1], r1
465 ; CHECK-NEXT: vmov r1, s7
466 ; CHECK-NEXT: subs r2, r4, r2
467 ; CHECK-NEXT: vmov.32 q0[2], r2
468 ; CHECK-NEXT: sbc.w r1, r3, r1
469 ; CHECK-NEXT: subs r4, r4, r2
470 ; CHECK-NEXT: sbcs r3, r1
472 ; CHECK-NEXT: movlo r0, #1
473 ; CHECK-NEXT: cmp r0, #0
474 ; CHECK-NEXT: vmov.32 q0[3], r1
475 ; CHECK-NEXT: csetm r0, ne
476 ; CHECK-NEXT: vmov.32 q2[2], r0
477 ; CHECK-NEXT: vmov.32 q2[3], r0
478 ; CHECK-NEXT: vbic q0, q0, q2
479 ; CHECK-NEXT: pop {r4, pc}
481 %0 = call <2 x i64> @llvm.usub.sat.v2i64(<2 x i64> %src1, <2 x i64> %src2)
486 declare <16 x i8> @llvm.sadd.sat.v16i8(<16 x i8> %src1, <16 x i8> %src2)
487 declare <8 x i16> @llvm.sadd.sat.v8i16(<8 x i16> %src1, <8 x i16> %src2)
488 declare <4 x i32> @llvm.sadd.sat.v4i32(<4 x i32> %src1, <4 x i32> %src2)
489 declare <2 x i64> @llvm.sadd.sat.v2i64(<2 x i64> %src1, <2 x i64> %src2)
490 declare <16 x i8> @llvm.uadd.sat.v16i8(<16 x i8> %src1, <16 x i8> %src2)
491 declare <8 x i16> @llvm.uadd.sat.v8i16(<8 x i16> %src1, <8 x i16> %src2)
492 declare <4 x i32> @llvm.uadd.sat.v4i32(<4 x i32> %src1, <4 x i32> %src2)
493 declare <2 x i64> @llvm.uadd.sat.v2i64(<2 x i64> %src1, <2 x i64> %src2)
494 declare <16 x i8> @llvm.ssub.sat.v16i8(<16 x i8> %src1, <16 x i8> %src2)
495 declare <8 x i16> @llvm.ssub.sat.v8i16(<8 x i16> %src1, <8 x i16> %src2)
496 declare <4 x i32> @llvm.ssub.sat.v4i32(<4 x i32> %src1, <4 x i32> %src2)
497 declare <2 x i64> @llvm.ssub.sat.v2i64(<2 x i64> %src1, <2 x i64> %src2)
498 declare <16 x i8> @llvm.usub.sat.v16i8(<16 x i8> %src1, <16 x i8> %src2)
499 declare <8 x i16> @llvm.usub.sat.v8i16(<8 x i16> %src1, <8 x i16> %src2)
500 declare <4 x i32> @llvm.usub.sat.v4i32(<4 x i32> %src1, <4 x i32> %src2)
501 declare <2 x i64> @llvm.usub.sat.v2i64(<2 x i64> %src1, <2 x i64> %src2)