1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=thumbv8.1m.main-none-none-eabi -mattr=+mve -verify-machineinstrs %s -o - | FileCheck %s
4 define arm_aapcs_vfpcc <4 x i32> @vqshrni32_smaxmin(<4 x i32> %so) {
5 ; CHECK-LABEL: vqshrni32_smaxmin:
6 ; CHECK: @ %bb.0: @ %entry
7 ; CHECK-NEXT: vqshrnb.s32 q0, q0, #3
8 ; CHECK-NEXT: vmovlb.s16 q0, q0
11 %s0 = ashr <4 x i32> %so, <i32 3, i32 3, i32 3, i32 3>
12 %c1 = icmp slt <4 x i32> %s0, <i32 32767, i32 32767, i32 32767, i32 32767>
13 %s1 = select <4 x i1> %c1, <4 x i32> %s0, <4 x i32> <i32 32767, i32 32767, i32 32767, i32 32767>
14 %c2 = icmp sgt <4 x i32> %s1, <i32 -32768, i32 -32768, i32 -32768, i32 -32768>
15 %s2 = select <4 x i1> %c2, <4 x i32> %s1, <4 x i32> <i32 -32768, i32 -32768, i32 -32768, i32 -32768>
19 define arm_aapcs_vfpcc <4 x i32> @vqshrni32_sminmax(<4 x i32> %so) {
20 ; CHECK-LABEL: vqshrni32_sminmax:
21 ; CHECK: @ %bb.0: @ %entry
22 ; CHECK-NEXT: vqshrnb.s32 q0, q0, #3
23 ; CHECK-NEXT: vmovlb.s16 q0, q0
26 %s0 = ashr <4 x i32> %so, <i32 3, i32 3, i32 3, i32 3>
27 %c1 = icmp sgt <4 x i32> %s0, <i32 -32768, i32 -32768, i32 -32768, i32 -32768>
28 %s1 = select <4 x i1> %c1, <4 x i32> %s0, <4 x i32> <i32 -32768, i32 -32768, i32 -32768, i32 -32768>
29 %c2 = icmp slt <4 x i32> %s1, <i32 32767, i32 32767, i32 32767, i32 32767>
30 %s2 = select <4 x i1> %c2, <4 x i32> %s1, <4 x i32> <i32 32767, i32 32767, i32 32767, i32 32767>
34 define arm_aapcs_vfpcc <4 x i32> @vqshrni32_umaxmin(<4 x i32> %so) {
35 ; CHECK-LABEL: vqshrni32_umaxmin:
36 ; CHECK: @ %bb.0: @ %entry
37 ; CHECK-NEXT: vqshrnb.u32 q0, q0, #3
38 ; CHECK-NEXT: vmovlb.u16 q0, q0
41 %s0 = lshr <4 x i32> %so, <i32 3, i32 3, i32 3, i32 3>
42 %c1 = icmp ult <4 x i32> %s0, <i32 65535, i32 65535, i32 65535, i32 65535>
43 %s1 = select <4 x i1> %c1, <4 x i32> %s0, <4 x i32> <i32 65535, i32 65535, i32 65535, i32 65535>
47 define arm_aapcs_vfpcc <4 x i32> @vqshrni32_uminmax(<4 x i32> %so) {
48 ; CHECK-LABEL: vqshrni32_uminmax:
49 ; CHECK: @ %bb.0: @ %entry
50 ; CHECK-NEXT: vqshrnb.u32 q0, q0, #3
51 ; CHECK-NEXT: vmovlb.u16 q0, q0
54 %s0 = lshr <4 x i32> %so, <i32 3, i32 3, i32 3, i32 3>
55 %c2 = icmp ult <4 x i32> %s0, <i32 65535, i32 65535, i32 65535, i32 65535>
56 %s2 = select <4 x i1> %c2, <4 x i32> %s0, <4 x i32> <i32 65535, i32 65535, i32 65535, i32 65535>
60 define arm_aapcs_vfpcc <8 x i16> @vqshrni16_smaxmin(<8 x i16> %so) {
61 ; CHECK-LABEL: vqshrni16_smaxmin:
62 ; CHECK: @ %bb.0: @ %entry
63 ; CHECK-NEXT: vqshrnb.s16 q0, q0, #3
64 ; CHECK-NEXT: vmovlb.s8 q0, q0
67 %s0 = ashr <8 x i16> %so, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
68 %c1 = icmp slt <8 x i16> %s0, <i16 127, i16 127, i16 127, i16 127, i16 127, i16 127, i16 127, i16 127>
69 %s1 = select <8 x i1> %c1, <8 x i16> %s0, <8 x i16> <i16 127, i16 127, i16 127, i16 127, i16 127, i16 127, i16 127, i16 127>
70 %c2 = icmp sgt <8 x i16> %s1, <i16 -128, i16 -128, i16 -128, i16 -128, i16 -128, i16 -128, i16 -128, i16 -128>
71 %s2 = select <8 x i1> %c2, <8 x i16> %s1, <8 x i16> <i16 -128, i16 -128, i16 -128, i16 -128, i16 -128, i16 -128, i16 -128, i16 -128>
75 define arm_aapcs_vfpcc <8 x i16> @vqshrni16_sminmax(<8 x i16> %so) {
76 ; CHECK-LABEL: vqshrni16_sminmax:
77 ; CHECK: @ %bb.0: @ %entry
78 ; CHECK-NEXT: vqshrnb.s16 q0, q0, #3
79 ; CHECK-NEXT: vmovlb.s8 q0, q0
82 %s0 = ashr <8 x i16> %so, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
83 %c1 = icmp sgt <8 x i16> %s0, <i16 -128, i16 -128, i16 -128, i16 -128, i16 -128, i16 -128, i16 -128, i16 -128>
84 %s1 = select <8 x i1> %c1, <8 x i16> %s0, <8 x i16> <i16 -128, i16 -128, i16 -128, i16 -128, i16 -128, i16 -128, i16 -128, i16 -128>
85 %c2 = icmp slt <8 x i16> %s1, <i16 127, i16 127, i16 127, i16 127, i16 127, i16 127, i16 127, i16 127>
86 %s2 = select <8 x i1> %c2, <8 x i16> %s1, <8 x i16> <i16 127, i16 127, i16 127, i16 127, i16 127, i16 127, i16 127, i16 127>
90 define arm_aapcs_vfpcc <8 x i16> @vqshrni16_umaxmin(<8 x i16> %so) {
91 ; CHECK-LABEL: vqshrni16_umaxmin:
92 ; CHECK: @ %bb.0: @ %entry
93 ; CHECK-NEXT: vqshrnb.u16 q0, q0, #3
94 ; CHECK-NEXT: vmovlb.u8 q0, q0
97 %s0 = lshr <8 x i16> %so, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
98 %c1 = icmp ult <8 x i16> %s0, <i16 255, i16 255, i16 255, i16 255, i16 255, i16 255, i16 255, i16 255>
99 %s1 = select <8 x i1> %c1, <8 x i16> %s0, <8 x i16> <i16 255, i16 255, i16 255, i16 255, i16 255, i16 255, i16 255, i16 255>
103 define arm_aapcs_vfpcc <8 x i16> @vqshrni16_uminmax(<8 x i16> %so) {
104 ; CHECK-LABEL: vqshrni16_uminmax:
105 ; CHECK: @ %bb.0: @ %entry
106 ; CHECK-NEXT: vqshrnb.u16 q0, q0, #3
107 ; CHECK-NEXT: vmovlb.u8 q0, q0
110 %s0 = lshr <8 x i16> %so, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
111 %c2 = icmp ult <8 x i16> %s0, <i16 255, i16 255, i16 255, i16 255, i16 255, i16 255, i16 255, i16 255>
112 %s2 = select <8 x i1> %c2, <8 x i16> %s0, <8 x i16> <i16 255, i16 255, i16 255, i16 255, i16 255, i16 255, i16 255, i16 255>
116 define arm_aapcs_vfpcc <16 x i8> @vqshrni8_smaxmin(<16 x i8> %so) {
117 ; CHECK-LABEL: vqshrni8_smaxmin:
118 ; CHECK: @ %bb.0: @ %entry
119 ; CHECK-NEXT: vshr.s8 q0, q0, #3
120 ; CHECK-NEXT: vmov.i8 q1, #0x7
121 ; CHECK-NEXT: vmin.s8 q0, q0, q1
122 ; CHECK-NEXT: vmov.i8 q1, #0xf8
123 ; CHECK-NEXT: vmax.s8 q0, q0, q1
126 %s0 = ashr <16 x i8> %so, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
127 %c1 = icmp slt <16 x i8> %s0, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
128 %s1 = select <16 x i1> %c1, <16 x i8> %s0, <16 x i8> <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
129 %c2 = icmp sgt <16 x i8> %s1, <i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8>
130 %s2 = select <16 x i1> %c2, <16 x i8> %s1, <16 x i8> <i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8>
134 define arm_aapcs_vfpcc <16 x i8> @vqshrni8_sminmax(<16 x i8> %so) {
135 ; CHECK-LABEL: vqshrni8_sminmax:
136 ; CHECK: @ %bb.0: @ %entry
137 ; CHECK-NEXT: vshr.s8 q0, q0, #3
138 ; CHECK-NEXT: vmov.i8 q1, #0xf8
139 ; CHECK-NEXT: vmax.s8 q0, q0, q1
140 ; CHECK-NEXT: vmov.i8 q1, #0x7
141 ; CHECK-NEXT: vmin.s8 q0, q0, q1
144 %s0 = ashr <16 x i8> %so, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
145 %c1 = icmp sgt <16 x i8> %s0, <i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8>
146 %s1 = select <16 x i1> %c1, <16 x i8> %s0, <16 x i8> <i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8, i8 -8>
147 %c2 = icmp slt <16 x i8> %s1, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
148 %s2 = select <16 x i1> %c2, <16 x i8> %s1, <16 x i8> <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
152 define arm_aapcs_vfpcc <16 x i8> @vqshrni8_umaxmin(<16 x i8> %so) {
153 ; CHECK-LABEL: vqshrni8_umaxmin:
154 ; CHECK: @ %bb.0: @ %entry
155 ; CHECK-NEXT: vshr.u8 q0, q0, #3
156 ; CHECK-NEXT: vmov.i8 q1, #0xf
157 ; CHECK-NEXT: vmin.u8 q0, q0, q1
160 %s0 = lshr <16 x i8> %so, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
161 %c1 = icmp ult <16 x i8> %s0, <i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15>
162 %s1 = select <16 x i1> %c1, <16 x i8> %s0, <16 x i8> <i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15>
166 define arm_aapcs_vfpcc <16 x i8> @vqshrni8_uminmax(<16 x i8> %so) {
167 ; CHECK-LABEL: vqshrni8_uminmax:
168 ; CHECK: @ %bb.0: @ %entry
169 ; CHECK-NEXT: vshr.u8 q0, q0, #3
170 ; CHECK-NEXT: vmov.i8 q1, #0xf
171 ; CHECK-NEXT: vmin.u8 q0, q0, q1
174 %s0 = lshr <16 x i8> %so, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
175 %c2 = icmp ult <16 x i8> %s0, <i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15>
176 %s2 = select <16 x i1> %c2, <16 x i8> %s0, <16 x i8> <i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15>
180 define arm_aapcs_vfpcc <2 x i64> @vqshrni64_smaxmin(<2 x i64> %so) {
181 ; CHECK-LABEL: vqshrni64_smaxmin:
182 ; CHECK: @ %bb.0: @ %entry
183 ; CHECK-NEXT: .save {r7, lr}
184 ; CHECK-NEXT: push {r7, lr}
185 ; CHECK-NEXT: vmov r2, r3, d1
186 ; CHECK-NEXT: mvn lr, #-2147483648
187 ; CHECK-NEXT: vmov r0, r1, d0
188 ; CHECK-NEXT: asrl r2, r3, #3
189 ; CHECK-NEXT: asrl r0, r1, #3
190 ; CHECK-NEXT: mov.w r12, #0
191 ; CHECK-NEXT: vmov q0[2], q0[0], r0, r2
192 ; CHECK-NEXT: subs.w r2, r2, lr
193 ; CHECK-NEXT: sbcs r2, r3, #0
194 ; CHECK-NEXT: vmov q0[3], q0[1], r1, r3
195 ; CHECK-NEXT: mov.w r2, #0
197 ; CHECK-NEXT: movlt r2, #1
198 ; CHECK-NEXT: cmp r2, #0
199 ; CHECK-NEXT: csetm r2, ne
200 ; CHECK-NEXT: subs.w r0, r0, lr
201 ; CHECK-NEXT: sbcs r0, r1, #0
202 ; CHECK-NEXT: mov.w r0, #0
204 ; CHECK-NEXT: movlt r0, #1
205 ; CHECK-NEXT: cmp r0, #0
206 ; CHECK-NEXT: csetm r0, ne
207 ; CHECK-NEXT: vmov q1[2], q1[0], r0, r2
208 ; CHECK-NEXT: vmov q1[3], q1[1], r0, r2
209 ; CHECK-NEXT: adr r0, .LCPI12_0
210 ; CHECK-NEXT: vldrw.u32 q2, [r0]
211 ; CHECK-NEXT: vand q0, q0, q1
212 ; CHECK-NEXT: mov.w r2, #-1
213 ; CHECK-NEXT: vbic q1, q2, q1
214 ; CHECK-NEXT: vorr q0, q0, q1
215 ; CHECK-NEXT: vmov r0, r1, d1
216 ; CHECK-NEXT: rsbs.w r0, r0, #-2147483648
217 ; CHECK-NEXT: sbcs.w r0, r2, r1
218 ; CHECK-NEXT: vmov r1, r3, d0
219 ; CHECK-NEXT: mov.w r0, #0
221 ; CHECK-NEXT: movlt r0, #1
222 ; CHECK-NEXT: cmp r0, #0
223 ; CHECK-NEXT: csetm r0, ne
224 ; CHECK-NEXT: rsbs.w r1, r1, #-2147483648
225 ; CHECK-NEXT: sbcs.w r1, r2, r3
227 ; CHECK-NEXT: movlt.w r12, #1
228 ; CHECK-NEXT: cmp.w r12, #0
229 ; CHECK-NEXT: csetm r1, ne
230 ; CHECK-NEXT: vmov q1[2], q1[0], r1, r0
231 ; CHECK-NEXT: vmov q1[3], q1[1], r1, r0
232 ; CHECK-NEXT: adr r0, .LCPI12_1
233 ; CHECK-NEXT: vldrw.u32 q2, [r0]
234 ; CHECK-NEXT: vand q0, q0, q1
235 ; CHECK-NEXT: vbic q2, q2, q1
236 ; CHECK-NEXT: vorr q0, q0, q2
237 ; CHECK-NEXT: pop {r7, pc}
238 ; CHECK-NEXT: .p2align 4
239 ; CHECK-NEXT: @ %bb.1:
240 ; CHECK-NEXT: .LCPI12_0:
241 ; CHECK-NEXT: .long 2147483647 @ 0x7fffffff
242 ; CHECK-NEXT: .long 0 @ 0x0
243 ; CHECK-NEXT: .long 2147483647 @ 0x7fffffff
244 ; CHECK-NEXT: .long 0 @ 0x0
245 ; CHECK-NEXT: .LCPI12_1:
246 ; CHECK-NEXT: .long 2147483648 @ 0x80000000
247 ; CHECK-NEXT: .long 4294967295 @ 0xffffffff
248 ; CHECK-NEXT: .long 2147483648 @ 0x80000000
249 ; CHECK-NEXT: .long 4294967295 @ 0xffffffff
251 %s0 = ashr <2 x i64> %so, <i64 3, i64 3>
252 %c1 = icmp slt <2 x i64> %s0, <i64 2147483647, i64 2147483647>
253 %s1 = select <2 x i1> %c1, <2 x i64> %s0, <2 x i64> <i64 2147483647, i64 2147483647>
254 %c2 = icmp sgt <2 x i64> %s1, <i64 -2147483648, i64 -2147483648>
255 %s2 = select <2 x i1> %c2, <2 x i64> %s1, <2 x i64> <i64 -2147483648, i64 -2147483648>
259 define arm_aapcs_vfpcc <2 x i64> @vqshrni64_sminmax(<2 x i64> %so) {
260 ; CHECK-LABEL: vqshrni64_sminmax:
261 ; CHECK: @ %bb.0: @ %entry
262 ; CHECK-NEXT: .save {r4, r5, r7, lr}
263 ; CHECK-NEXT: push {r4, r5, r7, lr}
264 ; CHECK-NEXT: vmov r2, r1, d1
265 ; CHECK-NEXT: mov.w r12, #-1
266 ; CHECK-NEXT: asrl r2, r1, #3
267 ; CHECK-NEXT: mov.w lr, #0
268 ; CHECK-NEXT: rsbs.w r3, r2, #-2147483648
269 ; CHECK-NEXT: sbcs.w r3, r12, r1
270 ; CHECK-NEXT: mov.w r3, #0
272 ; CHECK-NEXT: movlt r3, #1
273 ; CHECK-NEXT: cmp r3, #0
274 ; CHECK-NEXT: vmov r4, r3, d0
275 ; CHECK-NEXT: csetm r0, ne
276 ; CHECK-NEXT: asrl r4, r3, #3
277 ; CHECK-NEXT: rsbs.w r5, r4, #-2147483648
278 ; CHECK-NEXT: vmov q2[2], q2[0], r4, r2
279 ; CHECK-NEXT: sbcs.w r5, r12, r3
280 ; CHECK-NEXT: vmov q2[3], q2[1], r3, r1
281 ; CHECK-NEXT: mov.w r5, #0
282 ; CHECK-NEXT: mvn r2, #-2147483648
284 ; CHECK-NEXT: movlt r5, #1
285 ; CHECK-NEXT: cmp r5, #0
286 ; CHECK-NEXT: csetm r5, ne
287 ; CHECK-NEXT: vmov q0[2], q0[0], r5, r0
288 ; CHECK-NEXT: vmov q0[3], q0[1], r5, r0
289 ; CHECK-NEXT: adr r0, .LCPI13_0
290 ; CHECK-NEXT: vldrw.u32 q1, [r0]
291 ; CHECK-NEXT: vbic q1, q1, q0
292 ; CHECK-NEXT: vand q0, q2, q0
293 ; CHECK-NEXT: vorr q0, q0, q1
294 ; CHECK-NEXT: vmov r0, r1, d1
295 ; CHECK-NEXT: subs r0, r0, r2
296 ; CHECK-NEXT: sbcs r0, r1, #0
297 ; CHECK-NEXT: vmov r1, r3, d0
298 ; CHECK-NEXT: mov.w r0, #0
300 ; CHECK-NEXT: movlt r0, #1
301 ; CHECK-NEXT: cmp r0, #0
302 ; CHECK-NEXT: csetm r0, ne
303 ; CHECK-NEXT: subs r1, r1, r2
304 ; CHECK-NEXT: sbcs r1, r3, #0
306 ; CHECK-NEXT: movlt.w lr, #1
307 ; CHECK-NEXT: cmp.w lr, #0
308 ; CHECK-NEXT: csetm r1, ne
309 ; CHECK-NEXT: vmov q1[2], q1[0], r1, r0
310 ; CHECK-NEXT: vmov q1[3], q1[1], r1, r0
311 ; CHECK-NEXT: adr r0, .LCPI13_1
312 ; CHECK-NEXT: vldrw.u32 q2, [r0]
313 ; CHECK-NEXT: vand q0, q0, q1
314 ; CHECK-NEXT: vbic q2, q2, q1
315 ; CHECK-NEXT: vorr q0, q0, q2
316 ; CHECK-NEXT: pop {r4, r5, r7, pc}
317 ; CHECK-NEXT: .p2align 4
318 ; CHECK-NEXT: @ %bb.1:
319 ; CHECK-NEXT: .LCPI13_0:
320 ; CHECK-NEXT: .long 2147483648 @ 0x80000000
321 ; CHECK-NEXT: .long 4294967295 @ 0xffffffff
322 ; CHECK-NEXT: .long 2147483648 @ 0x80000000
323 ; CHECK-NEXT: .long 4294967295 @ 0xffffffff
324 ; CHECK-NEXT: .LCPI13_1:
325 ; CHECK-NEXT: .long 2147483647 @ 0x7fffffff
326 ; CHECK-NEXT: .long 0 @ 0x0
327 ; CHECK-NEXT: .long 2147483647 @ 0x7fffffff
328 ; CHECK-NEXT: .long 0 @ 0x0
330 %s0 = ashr <2 x i64> %so, <i64 3, i64 3>
331 %c1 = icmp sgt <2 x i64> %s0, <i64 -2147483648, i64 -2147483648>
332 %s1 = select <2 x i1> %c1, <2 x i64> %s0, <2 x i64> <i64 -2147483648, i64 -2147483648>
333 %c2 = icmp slt <2 x i64> %s1, <i64 2147483647, i64 2147483647>
334 %s2 = select <2 x i1> %c2, <2 x i64> %s1, <2 x i64> <i64 2147483647, i64 2147483647>
338 define arm_aapcs_vfpcc <2 x i64> @vqshrni64_umaxmin(<2 x i64> %so) {
339 ; CHECK-LABEL: vqshrni64_umaxmin:
340 ; CHECK: @ %bb.0: @ %entry
341 ; CHECK-NEXT: vmov r0, r3, d1
342 ; CHECK-NEXT: mov.w r12, #0
343 ; CHECK-NEXT: vmov r2, r1, d0
344 ; CHECK-NEXT: lsrl r0, r3, #3
345 ; CHECK-NEXT: lsrl r2, r1, #3
346 ; CHECK-NEXT: vmov.i64 q2, #0xffffffff
347 ; CHECK-NEXT: vmov q0[2], q0[0], r2, r0
348 ; CHECK-NEXT: subs.w r0, r0, #-1
349 ; CHECK-NEXT: sbcs r0, r3, #0
350 ; CHECK-NEXT: vmov q0[3], q0[1], r1, r3
351 ; CHECK-NEXT: mov.w r0, #0
353 ; CHECK-NEXT: movlo r0, #1
354 ; CHECK-NEXT: cmp r0, #0
355 ; CHECK-NEXT: csetm r0, ne
356 ; CHECK-NEXT: subs.w r2, r2, #-1
357 ; CHECK-NEXT: sbcs r1, r1, #0
359 ; CHECK-NEXT: movlo.w r12, #1
360 ; CHECK-NEXT: cmp.w r12, #0
361 ; CHECK-NEXT: csetm r1, ne
362 ; CHECK-NEXT: vmov q1[2], q1[0], r1, r0
363 ; CHECK-NEXT: vmov q1[3], q1[1], r1, r0
364 ; CHECK-NEXT: vand q0, q0, q1
365 ; CHECK-NEXT: vbic q1, q2, q1
366 ; CHECK-NEXT: vorr q0, q0, q1
369 %s0 = lshr <2 x i64> %so, <i64 3, i64 3>
370 %c1 = icmp ult <2 x i64> %s0, <i64 4294967295, i64 4294967295>
371 %s1 = select <2 x i1> %c1, <2 x i64> %s0, <2 x i64> <i64 4294967295, i64 4294967295>
375 define arm_aapcs_vfpcc <2 x i64> @vqshrni64_uminmax(<2 x i64> %so) {
376 ; CHECK-LABEL: vqshrni64_uminmax:
377 ; CHECK: @ %bb.0: @ %entry
378 ; CHECK-NEXT: vmov r0, r3, d1
379 ; CHECK-NEXT: mov.w r12, #0
380 ; CHECK-NEXT: vmov r2, r1, d0
381 ; CHECK-NEXT: lsrl r0, r3, #3
382 ; CHECK-NEXT: lsrl r2, r1, #3
383 ; CHECK-NEXT: vmov.i64 q2, #0xffffffff
384 ; CHECK-NEXT: vmov q0[2], q0[0], r2, r0
385 ; CHECK-NEXT: subs.w r0, r0, #-1
386 ; CHECK-NEXT: sbcs r0, r3, #0
387 ; CHECK-NEXT: vmov q0[3], q0[1], r1, r3
388 ; CHECK-NEXT: mov.w r0, #0
390 ; CHECK-NEXT: movlo r0, #1
391 ; CHECK-NEXT: cmp r0, #0
392 ; CHECK-NEXT: csetm r0, ne
393 ; CHECK-NEXT: subs.w r2, r2, #-1
394 ; CHECK-NEXT: sbcs r1, r1, #0
396 ; CHECK-NEXT: movlo.w r12, #1
397 ; CHECK-NEXT: cmp.w r12, #0
398 ; CHECK-NEXT: csetm r1, ne
399 ; CHECK-NEXT: vmov q1[2], q1[0], r1, r0
400 ; CHECK-NEXT: vmov q1[3], q1[1], r1, r0
401 ; CHECK-NEXT: vand q0, q0, q1
402 ; CHECK-NEXT: vbic q1, q2, q1
403 ; CHECK-NEXT: vorr q0, q0, q1
406 %s0 = lshr <2 x i64> %so, <i64 3, i64 3>
407 %c2 = icmp ult <2 x i64> %s0, <i64 4294967295, i64 4294967295>
408 %s2 = select <2 x i1> %c2, <2 x i64> %s0, <2 x i64> <i64 4294967295, i64 4294967295>