1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mattr=+sve -force-streaming-compatible < %s | FileCheck %s
3 ; RUN: llc -mattr=+sme -force-streaming < %s | FileCheck %s
4 ; RUN: llc -force-streaming-compatible < %s | FileCheck %s --check-prefix=NONEON-NOSVE
6 target triple = "aarch64-unknown-linux-gnu"
12 define <8 x i8> @icmp_eq_v8i8(<8 x i8> %op1, <8 x i8> %op2) {
13 ; CHECK-LABEL: icmp_eq_v8i8:
15 ; CHECK-NEXT: ptrue p0.b, vl8
16 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
17 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
18 ; CHECK-NEXT: cmpeq p0.b, p0/z, z0.b, z1.b
19 ; CHECK-NEXT: mov z0.b, p0/z, #-1 // =0xffffffffffffffff
20 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
23 ; NONEON-NOSVE-LABEL: icmp_eq_v8i8:
24 ; NONEON-NOSVE: // %bb.0:
25 ; NONEON-NOSVE-NEXT: sub sp, sp, #32
26 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
27 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]
28 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #23]
29 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #15]
30 ; NONEON-NOSVE-NEXT: cmp w9, w8
31 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #14]
32 ; NONEON-NOSVE-NEXT: csetm w8, eq
33 ; NONEON-NOSVE-NEXT: strb w8, [sp, #31]
34 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #22]
35 ; NONEON-NOSVE-NEXT: cmp w9, w8
36 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #13]
37 ; NONEON-NOSVE-NEXT: csetm w8, eq
38 ; NONEON-NOSVE-NEXT: strb w8, [sp, #30]
39 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #21]
40 ; NONEON-NOSVE-NEXT: cmp w9, w8
41 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #12]
42 ; NONEON-NOSVE-NEXT: csetm w8, eq
43 ; NONEON-NOSVE-NEXT: strb w8, [sp, #29]
44 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #20]
45 ; NONEON-NOSVE-NEXT: cmp w9, w8
46 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #11]
47 ; NONEON-NOSVE-NEXT: csetm w8, eq
48 ; NONEON-NOSVE-NEXT: strb w8, [sp, #28]
49 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #19]
50 ; NONEON-NOSVE-NEXT: cmp w9, w8
51 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #10]
52 ; NONEON-NOSVE-NEXT: csetm w8, eq
53 ; NONEON-NOSVE-NEXT: strb w8, [sp, #27]
54 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #18]
55 ; NONEON-NOSVE-NEXT: cmp w9, w8
56 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #9]
57 ; NONEON-NOSVE-NEXT: csetm w8, eq
58 ; NONEON-NOSVE-NEXT: strb w8, [sp, #26]
59 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #17]
60 ; NONEON-NOSVE-NEXT: cmp w9, w8
61 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #8]
62 ; NONEON-NOSVE-NEXT: csetm w8, eq
63 ; NONEON-NOSVE-NEXT: strb w8, [sp, #25]
64 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #16]
65 ; NONEON-NOSVE-NEXT: cmp w9, w8
66 ; NONEON-NOSVE-NEXT: csetm w8, eq
67 ; NONEON-NOSVE-NEXT: strb w8, [sp, #24]
68 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]
69 ; NONEON-NOSVE-NEXT: add sp, sp, #32
70 ; NONEON-NOSVE-NEXT: ret
71 %cmp = icmp eq <8 x i8> %op1, %op2
72 %sext = sext <8 x i1> %cmp to <8 x i8>
76 define <16 x i8> @icmp_eq_v16i8(<16 x i8> %op1, <16 x i8> %op2) {
77 ; CHECK-LABEL: icmp_eq_v16i8:
79 ; CHECK-NEXT: ptrue p0.b, vl16
80 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
81 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
82 ; CHECK-NEXT: cmpeq p0.b, p0/z, z0.b, z1.b
83 ; CHECK-NEXT: mov z0.b, p0/z, #-1 // =0xffffffffffffffff
84 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
87 ; NONEON-NOSVE-LABEL: icmp_eq_v16i8:
88 ; NONEON-NOSVE: // %bb.0:
89 ; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]!
90 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48
91 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #31]
92 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #15]
93 ; NONEON-NOSVE-NEXT: cmp w9, w8
94 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #14]
95 ; NONEON-NOSVE-NEXT: csetm w8, eq
96 ; NONEON-NOSVE-NEXT: strb w8, [sp, #47]
97 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #30]
98 ; NONEON-NOSVE-NEXT: cmp w9, w8
99 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #13]
100 ; NONEON-NOSVE-NEXT: csetm w8, eq
101 ; NONEON-NOSVE-NEXT: strb w8, [sp, #46]
102 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #29]
103 ; NONEON-NOSVE-NEXT: cmp w9, w8
104 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #12]
105 ; NONEON-NOSVE-NEXT: csetm w8, eq
106 ; NONEON-NOSVE-NEXT: strb w8, [sp, #45]
107 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #28]
108 ; NONEON-NOSVE-NEXT: cmp w9, w8
109 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #11]
110 ; NONEON-NOSVE-NEXT: csetm w8, eq
111 ; NONEON-NOSVE-NEXT: strb w8, [sp, #44]
112 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #27]
113 ; NONEON-NOSVE-NEXT: cmp w9, w8
114 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #10]
115 ; NONEON-NOSVE-NEXT: csetm w8, eq
116 ; NONEON-NOSVE-NEXT: strb w8, [sp, #43]
117 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #26]
118 ; NONEON-NOSVE-NEXT: cmp w9, w8
119 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #9]
120 ; NONEON-NOSVE-NEXT: csetm w8, eq
121 ; NONEON-NOSVE-NEXT: strb w8, [sp, #42]
122 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #25]
123 ; NONEON-NOSVE-NEXT: cmp w9, w8
124 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #8]
125 ; NONEON-NOSVE-NEXT: csetm w8, eq
126 ; NONEON-NOSVE-NEXT: strb w8, [sp, #41]
127 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #24]
128 ; NONEON-NOSVE-NEXT: cmp w9, w8
129 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #7]
130 ; NONEON-NOSVE-NEXT: csetm w8, eq
131 ; NONEON-NOSVE-NEXT: strb w8, [sp, #40]
132 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #23]
133 ; NONEON-NOSVE-NEXT: cmp w9, w8
134 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #6]
135 ; NONEON-NOSVE-NEXT: csetm w8, eq
136 ; NONEON-NOSVE-NEXT: strb w8, [sp, #39]
137 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #22]
138 ; NONEON-NOSVE-NEXT: cmp w9, w8
139 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #5]
140 ; NONEON-NOSVE-NEXT: csetm w8, eq
141 ; NONEON-NOSVE-NEXT: strb w8, [sp, #38]
142 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #21]
143 ; NONEON-NOSVE-NEXT: cmp w9, w8
144 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #4]
145 ; NONEON-NOSVE-NEXT: csetm w8, eq
146 ; NONEON-NOSVE-NEXT: strb w8, [sp, #37]
147 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #20]
148 ; NONEON-NOSVE-NEXT: cmp w9, w8
149 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #3]
150 ; NONEON-NOSVE-NEXT: csetm w8, eq
151 ; NONEON-NOSVE-NEXT: strb w8, [sp, #36]
152 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #19]
153 ; NONEON-NOSVE-NEXT: cmp w9, w8
154 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #2]
155 ; NONEON-NOSVE-NEXT: csetm w8, eq
156 ; NONEON-NOSVE-NEXT: strb w8, [sp, #35]
157 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #18]
158 ; NONEON-NOSVE-NEXT: cmp w9, w8
159 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #1]
160 ; NONEON-NOSVE-NEXT: csetm w8, eq
161 ; NONEON-NOSVE-NEXT: strb w8, [sp, #34]
162 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #17]
163 ; NONEON-NOSVE-NEXT: cmp w9, w8
164 ; NONEON-NOSVE-NEXT: ldrb w9, [sp]
165 ; NONEON-NOSVE-NEXT: csetm w8, eq
166 ; NONEON-NOSVE-NEXT: strb w8, [sp, #33]
167 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #16]
168 ; NONEON-NOSVE-NEXT: cmp w9, w8
169 ; NONEON-NOSVE-NEXT: csetm w8, eq
170 ; NONEON-NOSVE-NEXT: strb w8, [sp, #32]
171 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]
172 ; NONEON-NOSVE-NEXT: add sp, sp, #48
173 ; NONEON-NOSVE-NEXT: ret
174 %cmp = icmp eq <16 x i8> %op1, %op2
175 %sext = sext <16 x i1> %cmp to <16 x i8>
179 define void @icmp_eq_v32i8(ptr %a, ptr %b) {
180 ; CHECK-LABEL: icmp_eq_v32i8:
182 ; CHECK-NEXT: ldp q0, q3, [x1]
183 ; CHECK-NEXT: ptrue p0.b, vl16
184 ; CHECK-NEXT: ldp q1, q2, [x0]
185 ; CHECK-NEXT: cmpeq p1.b, p0/z, z1.b, z0.b
186 ; CHECK-NEXT: cmpeq p0.b, p0/z, z2.b, z3.b
187 ; CHECK-NEXT: mov z0.b, p1/z, #-1 // =0xffffffffffffffff
188 ; CHECK-NEXT: mov z1.b, p0/z, #-1 // =0xffffffffffffffff
189 ; CHECK-NEXT: stp q0, q1, [x0]
192 ; NONEON-NOSVE-LABEL: icmp_eq_v32i8:
193 ; NONEON-NOSVE: // %bb.0:
194 ; NONEON-NOSVE-NEXT: sub sp, sp, #96
195 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96
196 ; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]
197 ; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]
198 ; NONEON-NOSVE-NEXT: stp q2, q3, [sp]
199 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]
200 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #63]
201 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #47]
202 ; NONEON-NOSVE-NEXT: cmp w9, w8
203 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #46]
204 ; NONEON-NOSVE-NEXT: csetm w8, eq
205 ; NONEON-NOSVE-NEXT: strb w8, [sp, #95]
206 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #62]
207 ; NONEON-NOSVE-NEXT: cmp w9, w8
208 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #45]
209 ; NONEON-NOSVE-NEXT: csetm w8, eq
210 ; NONEON-NOSVE-NEXT: strb w8, [sp, #94]
211 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #61]
212 ; NONEON-NOSVE-NEXT: cmp w9, w8
213 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #44]
214 ; NONEON-NOSVE-NEXT: csetm w8, eq
215 ; NONEON-NOSVE-NEXT: strb w8, [sp, #93]
216 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #60]
217 ; NONEON-NOSVE-NEXT: cmp w9, w8
218 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #43]
219 ; NONEON-NOSVE-NEXT: csetm w8, eq
220 ; NONEON-NOSVE-NEXT: strb w8, [sp, #92]
221 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #59]
222 ; NONEON-NOSVE-NEXT: cmp w9, w8
223 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #42]
224 ; NONEON-NOSVE-NEXT: csetm w8, eq
225 ; NONEON-NOSVE-NEXT: strb w8, [sp, #91]
226 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #58]
227 ; NONEON-NOSVE-NEXT: cmp w9, w8
228 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #41]
229 ; NONEON-NOSVE-NEXT: csetm w8, eq
230 ; NONEON-NOSVE-NEXT: strb w8, [sp, #90]
231 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #57]
232 ; NONEON-NOSVE-NEXT: cmp w9, w8
233 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #40]
234 ; NONEON-NOSVE-NEXT: csetm w8, eq
235 ; NONEON-NOSVE-NEXT: strb w8, [sp, #89]
236 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #56]
237 ; NONEON-NOSVE-NEXT: cmp w9, w8
238 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #39]
239 ; NONEON-NOSVE-NEXT: csetm w8, eq
240 ; NONEON-NOSVE-NEXT: strb w8, [sp, #88]
241 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #55]
242 ; NONEON-NOSVE-NEXT: cmp w9, w8
243 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #38]
244 ; NONEON-NOSVE-NEXT: csetm w8, eq
245 ; NONEON-NOSVE-NEXT: strb w8, [sp, #87]
246 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #54]
247 ; NONEON-NOSVE-NEXT: cmp w9, w8
248 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #37]
249 ; NONEON-NOSVE-NEXT: csetm w8, eq
250 ; NONEON-NOSVE-NEXT: strb w8, [sp, #86]
251 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #53]
252 ; NONEON-NOSVE-NEXT: cmp w9, w8
253 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #36]
254 ; NONEON-NOSVE-NEXT: csetm w8, eq
255 ; NONEON-NOSVE-NEXT: strb w8, [sp, #85]
256 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #52]
257 ; NONEON-NOSVE-NEXT: cmp w9, w8
258 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #35]
259 ; NONEON-NOSVE-NEXT: csetm w8, eq
260 ; NONEON-NOSVE-NEXT: strb w8, [sp, #84]
261 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #51]
262 ; NONEON-NOSVE-NEXT: cmp w9, w8
263 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #34]
264 ; NONEON-NOSVE-NEXT: csetm w8, eq
265 ; NONEON-NOSVE-NEXT: strb w8, [sp, #83]
266 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #50]
267 ; NONEON-NOSVE-NEXT: cmp w9, w8
268 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #33]
269 ; NONEON-NOSVE-NEXT: csetm w8, eq
270 ; NONEON-NOSVE-NEXT: strb w8, [sp, #82]
271 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #49]
272 ; NONEON-NOSVE-NEXT: cmp w9, w8
273 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #32]
274 ; NONEON-NOSVE-NEXT: csetm w8, eq
275 ; NONEON-NOSVE-NEXT: strb w8, [sp, #81]
276 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #48]
277 ; NONEON-NOSVE-NEXT: cmp w9, w8
278 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #15]
279 ; NONEON-NOSVE-NEXT: csetm w8, eq
280 ; NONEON-NOSVE-NEXT: strb w8, [sp, #80]
281 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #31]
282 ; NONEON-NOSVE-NEXT: cmp w9, w8
283 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #14]
284 ; NONEON-NOSVE-NEXT: csetm w8, eq
285 ; NONEON-NOSVE-NEXT: strb w8, [sp, #79]
286 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #30]
287 ; NONEON-NOSVE-NEXT: cmp w9, w8
288 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #13]
289 ; NONEON-NOSVE-NEXT: csetm w8, eq
290 ; NONEON-NOSVE-NEXT: strb w8, [sp, #78]
291 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #29]
292 ; NONEON-NOSVE-NEXT: cmp w9, w8
293 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #12]
294 ; NONEON-NOSVE-NEXT: csetm w8, eq
295 ; NONEON-NOSVE-NEXT: strb w8, [sp, #77]
296 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #28]
297 ; NONEON-NOSVE-NEXT: cmp w9, w8
298 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #11]
299 ; NONEON-NOSVE-NEXT: csetm w8, eq
300 ; NONEON-NOSVE-NEXT: strb w8, [sp, #76]
301 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #27]
302 ; NONEON-NOSVE-NEXT: cmp w9, w8
303 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #10]
304 ; NONEON-NOSVE-NEXT: csetm w8, eq
305 ; NONEON-NOSVE-NEXT: strb w8, [sp, #75]
306 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #26]
307 ; NONEON-NOSVE-NEXT: cmp w9, w8
308 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #9]
309 ; NONEON-NOSVE-NEXT: csetm w8, eq
310 ; NONEON-NOSVE-NEXT: strb w8, [sp, #74]
311 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #25]
312 ; NONEON-NOSVE-NEXT: cmp w9, w8
313 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #8]
314 ; NONEON-NOSVE-NEXT: csetm w8, eq
315 ; NONEON-NOSVE-NEXT: strb w8, [sp, #73]
316 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #24]
317 ; NONEON-NOSVE-NEXT: cmp w9, w8
318 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #7]
319 ; NONEON-NOSVE-NEXT: csetm w8, eq
320 ; NONEON-NOSVE-NEXT: strb w8, [sp, #72]
321 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #23]
322 ; NONEON-NOSVE-NEXT: cmp w9, w8
323 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #6]
324 ; NONEON-NOSVE-NEXT: csetm w8, eq
325 ; NONEON-NOSVE-NEXT: strb w8, [sp, #71]
326 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #22]
327 ; NONEON-NOSVE-NEXT: cmp w9, w8
328 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #5]
329 ; NONEON-NOSVE-NEXT: csetm w8, eq
330 ; NONEON-NOSVE-NEXT: strb w8, [sp, #70]
331 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #21]
332 ; NONEON-NOSVE-NEXT: cmp w9, w8
333 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #4]
334 ; NONEON-NOSVE-NEXT: csetm w8, eq
335 ; NONEON-NOSVE-NEXT: strb w8, [sp, #69]
336 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #20]
337 ; NONEON-NOSVE-NEXT: cmp w9, w8
338 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #3]
339 ; NONEON-NOSVE-NEXT: csetm w8, eq
340 ; NONEON-NOSVE-NEXT: strb w8, [sp, #68]
341 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #19]
342 ; NONEON-NOSVE-NEXT: cmp w9, w8
343 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #2]
344 ; NONEON-NOSVE-NEXT: csetm w8, eq
345 ; NONEON-NOSVE-NEXT: strb w8, [sp, #67]
346 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #18]
347 ; NONEON-NOSVE-NEXT: cmp w9, w8
348 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #1]
349 ; NONEON-NOSVE-NEXT: csetm w8, eq
350 ; NONEON-NOSVE-NEXT: strb w8, [sp, #66]
351 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #17]
352 ; NONEON-NOSVE-NEXT: cmp w9, w8
353 ; NONEON-NOSVE-NEXT: ldrb w9, [sp]
354 ; NONEON-NOSVE-NEXT: csetm w8, eq
355 ; NONEON-NOSVE-NEXT: strb w8, [sp, #65]
356 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #16]
357 ; NONEON-NOSVE-NEXT: cmp w9, w8
358 ; NONEON-NOSVE-NEXT: csetm w8, eq
359 ; NONEON-NOSVE-NEXT: strb w8, [sp, #64]
360 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]
361 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
362 ; NONEON-NOSVE-NEXT: add sp, sp, #96
363 ; NONEON-NOSVE-NEXT: ret
364 %op1 = load <32 x i8>, ptr %a
365 %op2 = load <32 x i8>, ptr %b
366 %cmp = icmp eq <32 x i8> %op1, %op2
367 %sext = sext <32 x i1> %cmp to <32 x i8>
368 store <32 x i8> %sext, ptr %a
372 define <4 x i16> @icmp_eq_v4i16(<4 x i16> %op1, <4 x i16> %op2) {
373 ; CHECK-LABEL: icmp_eq_v4i16:
375 ; CHECK-NEXT: ptrue p0.h, vl4
376 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
377 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
378 ; CHECK-NEXT: cmpeq p0.h, p0/z, z0.h, z1.h
379 ; CHECK-NEXT: mov z0.h, p0/z, #-1 // =0xffffffffffffffff
380 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
383 ; NONEON-NOSVE-LABEL: icmp_eq_v4i16:
384 ; NONEON-NOSVE: // %bb.0:
385 ; NONEON-NOSVE-NEXT: sub sp, sp, #32
386 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
387 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]
388 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #22]
389 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #14]
390 ; NONEON-NOSVE-NEXT: cmp w9, w8
391 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #12]
392 ; NONEON-NOSVE-NEXT: csetm w8, eq
393 ; NONEON-NOSVE-NEXT: strh w8, [sp, #30]
394 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]
395 ; NONEON-NOSVE-NEXT: cmp w9, w8
396 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #10]
397 ; NONEON-NOSVE-NEXT: csetm w8, eq
398 ; NONEON-NOSVE-NEXT: strh w8, [sp, #28]
399 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #18]
400 ; NONEON-NOSVE-NEXT: cmp w9, w8
401 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #8]
402 ; NONEON-NOSVE-NEXT: csetm w8, eq
403 ; NONEON-NOSVE-NEXT: strh w8, [sp, #26]
404 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #16]
405 ; NONEON-NOSVE-NEXT: cmp w9, w8
406 ; NONEON-NOSVE-NEXT: csetm w8, eq
407 ; NONEON-NOSVE-NEXT: strh w8, [sp, #24]
408 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]
409 ; NONEON-NOSVE-NEXT: add sp, sp, #32
410 ; NONEON-NOSVE-NEXT: ret
411 %cmp = icmp eq <4 x i16> %op1, %op2
412 %sext = sext <4 x i1> %cmp to <4 x i16>
416 define <8 x i16> @icmp_eq_v8i16(<8 x i16> %op1, <8 x i16> %op2) {
417 ; CHECK-LABEL: icmp_eq_v8i16:
419 ; CHECK-NEXT: ptrue p0.h, vl8
420 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
421 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
422 ; CHECK-NEXT: cmpeq p0.h, p0/z, z0.h, z1.h
423 ; CHECK-NEXT: mov z0.h, p0/z, #-1 // =0xffffffffffffffff
424 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
427 ; NONEON-NOSVE-LABEL: icmp_eq_v8i16:
428 ; NONEON-NOSVE: // %bb.0:
429 ; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]!
430 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48
431 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #30]
432 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #14]
433 ; NONEON-NOSVE-NEXT: cmp w9, w8
434 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #12]
435 ; NONEON-NOSVE-NEXT: csetm w8, eq
436 ; NONEON-NOSVE-NEXT: strh w8, [sp, #46]
437 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #28]
438 ; NONEON-NOSVE-NEXT: cmp w9, w8
439 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #10]
440 ; NONEON-NOSVE-NEXT: csetm w8, eq
441 ; NONEON-NOSVE-NEXT: strh w8, [sp, #44]
442 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #26]
443 ; NONEON-NOSVE-NEXT: cmp w9, w8
444 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #8]
445 ; NONEON-NOSVE-NEXT: csetm w8, eq
446 ; NONEON-NOSVE-NEXT: strh w8, [sp, #42]
447 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #24]
448 ; NONEON-NOSVE-NEXT: cmp w9, w8
449 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #6]
450 ; NONEON-NOSVE-NEXT: csetm w8, eq
451 ; NONEON-NOSVE-NEXT: strh w8, [sp, #40]
452 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #22]
453 ; NONEON-NOSVE-NEXT: cmp w9, w8
454 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #4]
455 ; NONEON-NOSVE-NEXT: csetm w8, eq
456 ; NONEON-NOSVE-NEXT: strh w8, [sp, #38]
457 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]
458 ; NONEON-NOSVE-NEXT: cmp w9, w8
459 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #2]
460 ; NONEON-NOSVE-NEXT: csetm w8, eq
461 ; NONEON-NOSVE-NEXT: strh w8, [sp, #36]
462 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #18]
463 ; NONEON-NOSVE-NEXT: cmp w9, w8
464 ; NONEON-NOSVE-NEXT: ldrh w9, [sp]
465 ; NONEON-NOSVE-NEXT: csetm w8, eq
466 ; NONEON-NOSVE-NEXT: strh w8, [sp, #34]
467 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #16]
468 ; NONEON-NOSVE-NEXT: cmp w9, w8
469 ; NONEON-NOSVE-NEXT: csetm w8, eq
470 ; NONEON-NOSVE-NEXT: strh w8, [sp, #32]
471 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]
472 ; NONEON-NOSVE-NEXT: add sp, sp, #48
473 ; NONEON-NOSVE-NEXT: ret
474 %cmp = icmp eq <8 x i16> %op1, %op2
475 %sext = sext <8 x i1> %cmp to <8 x i16>
479 define void @icmp_eq_v16i16(ptr %a, ptr %b) {
480 ; CHECK-LABEL: icmp_eq_v16i16:
482 ; CHECK-NEXT: ldp q0, q3, [x1]
483 ; CHECK-NEXT: ptrue p0.h, vl8
484 ; CHECK-NEXT: ldp q1, q2, [x0]
485 ; CHECK-NEXT: cmpeq p1.h, p0/z, z1.h, z0.h
486 ; CHECK-NEXT: cmpeq p0.h, p0/z, z2.h, z3.h
487 ; CHECK-NEXT: mov z0.h, p1/z, #-1 // =0xffffffffffffffff
488 ; CHECK-NEXT: mov z1.h, p0/z, #-1 // =0xffffffffffffffff
489 ; CHECK-NEXT: stp q0, q1, [x0]
492 ; NONEON-NOSVE-LABEL: icmp_eq_v16i16:
493 ; NONEON-NOSVE: // %bb.0:
494 ; NONEON-NOSVE-NEXT: sub sp, sp, #96
495 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96
496 ; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]
497 ; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]
498 ; NONEON-NOSVE-NEXT: stp q2, q3, [sp]
499 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]
500 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #62]
501 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #46]
502 ; NONEON-NOSVE-NEXT: cmp w9, w8
503 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #44]
504 ; NONEON-NOSVE-NEXT: csetm w8, eq
505 ; NONEON-NOSVE-NEXT: strh w8, [sp, #94]
506 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #60]
507 ; NONEON-NOSVE-NEXT: cmp w9, w8
508 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #42]
509 ; NONEON-NOSVE-NEXT: csetm w8, eq
510 ; NONEON-NOSVE-NEXT: strh w8, [sp, #92]
511 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #58]
512 ; NONEON-NOSVE-NEXT: cmp w9, w8
513 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #40]
514 ; NONEON-NOSVE-NEXT: csetm w8, eq
515 ; NONEON-NOSVE-NEXT: strh w8, [sp, #90]
516 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #56]
517 ; NONEON-NOSVE-NEXT: cmp w9, w8
518 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #38]
519 ; NONEON-NOSVE-NEXT: csetm w8, eq
520 ; NONEON-NOSVE-NEXT: strh w8, [sp, #88]
521 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #54]
522 ; NONEON-NOSVE-NEXT: cmp w9, w8
523 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #36]
524 ; NONEON-NOSVE-NEXT: csetm w8, eq
525 ; NONEON-NOSVE-NEXT: strh w8, [sp, #86]
526 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #52]
527 ; NONEON-NOSVE-NEXT: cmp w9, w8
528 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #34]
529 ; NONEON-NOSVE-NEXT: csetm w8, eq
530 ; NONEON-NOSVE-NEXT: strh w8, [sp, #84]
531 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #50]
532 ; NONEON-NOSVE-NEXT: cmp w9, w8
533 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #32]
534 ; NONEON-NOSVE-NEXT: csetm w8, eq
535 ; NONEON-NOSVE-NEXT: strh w8, [sp, #82]
536 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #48]
537 ; NONEON-NOSVE-NEXT: cmp w9, w8
538 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #14]
539 ; NONEON-NOSVE-NEXT: csetm w8, eq
540 ; NONEON-NOSVE-NEXT: strh w8, [sp, #80]
541 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #30]
542 ; NONEON-NOSVE-NEXT: cmp w9, w8
543 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #12]
544 ; NONEON-NOSVE-NEXT: csetm w8, eq
545 ; NONEON-NOSVE-NEXT: strh w8, [sp, #78]
546 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #28]
547 ; NONEON-NOSVE-NEXT: cmp w9, w8
548 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #10]
549 ; NONEON-NOSVE-NEXT: csetm w8, eq
550 ; NONEON-NOSVE-NEXT: strh w8, [sp, #76]
551 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #26]
552 ; NONEON-NOSVE-NEXT: cmp w9, w8
553 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #8]
554 ; NONEON-NOSVE-NEXT: csetm w8, eq
555 ; NONEON-NOSVE-NEXT: strh w8, [sp, #74]
556 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #24]
557 ; NONEON-NOSVE-NEXT: cmp w9, w8
558 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #6]
559 ; NONEON-NOSVE-NEXT: csetm w8, eq
560 ; NONEON-NOSVE-NEXT: strh w8, [sp, #72]
561 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #22]
562 ; NONEON-NOSVE-NEXT: cmp w9, w8
563 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #4]
564 ; NONEON-NOSVE-NEXT: csetm w8, eq
565 ; NONEON-NOSVE-NEXT: strh w8, [sp, #70]
566 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #20]
567 ; NONEON-NOSVE-NEXT: cmp w9, w8
568 ; NONEON-NOSVE-NEXT: ldrh w9, [sp, #2]
569 ; NONEON-NOSVE-NEXT: csetm w8, eq
570 ; NONEON-NOSVE-NEXT: strh w8, [sp, #68]
571 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #18]
572 ; NONEON-NOSVE-NEXT: cmp w9, w8
573 ; NONEON-NOSVE-NEXT: ldrh w9, [sp]
574 ; NONEON-NOSVE-NEXT: csetm w8, eq
575 ; NONEON-NOSVE-NEXT: strh w8, [sp, #66]
576 ; NONEON-NOSVE-NEXT: ldrh w8, [sp, #16]
577 ; NONEON-NOSVE-NEXT: cmp w9, w8
578 ; NONEON-NOSVE-NEXT: csetm w8, eq
579 ; NONEON-NOSVE-NEXT: strh w8, [sp, #64]
580 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]
581 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
582 ; NONEON-NOSVE-NEXT: add sp, sp, #96
583 ; NONEON-NOSVE-NEXT: ret
584 %op1 = load <16 x i16>, ptr %a
585 %op2 = load <16 x i16>, ptr %b
586 %cmp = icmp eq <16 x i16> %op1, %op2
587 %sext = sext <16 x i1> %cmp to <16 x i16>
588 store <16 x i16> %sext, ptr %a
592 define <2 x i32> @icmp_eq_v2i32(<2 x i32> %op1, <2 x i32> %op2) {
593 ; CHECK-LABEL: icmp_eq_v2i32:
595 ; CHECK-NEXT: ptrue p0.s, vl2
596 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
597 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
598 ; CHECK-NEXT: cmpeq p0.s, p0/z, z0.s, z1.s
599 ; CHECK-NEXT: mov z0.s, p0/z, #-1 // =0xffffffffffffffff
600 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
603 ; NONEON-NOSVE-LABEL: icmp_eq_v2i32:
604 ; NONEON-NOSVE: // %bb.0:
605 ; NONEON-NOSVE-NEXT: sub sp, sp, #32
606 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 32
607 ; NONEON-NOSVE-NEXT: stp d0, d1, [sp, #8]
608 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #8]
609 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]
610 ; NONEON-NOSVE-NEXT: cmp w10, w8
611 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]
612 ; NONEON-NOSVE-NEXT: csetm w10, eq
613 ; NONEON-NOSVE-NEXT: cmp w9, w8
614 ; NONEON-NOSVE-NEXT: csetm w8, eq
615 ; NONEON-NOSVE-NEXT: stp w8, w10, [sp, #24]
616 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #24]
617 ; NONEON-NOSVE-NEXT: add sp, sp, #32
618 ; NONEON-NOSVE-NEXT: ret
619 %cmp = icmp eq <2 x i32> %op1, %op2
620 %sext = sext <2 x i1> %cmp to <2 x i32>
624 define <4 x i32> @icmp_eq_v4i32(<4 x i32> %op1, <4 x i32> %op2) {
625 ; CHECK-LABEL: icmp_eq_v4i32:
627 ; CHECK-NEXT: ptrue p0.s, vl4
628 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
629 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
630 ; CHECK-NEXT: cmpeq p0.s, p0/z, z0.s, z1.s
631 ; CHECK-NEXT: mov z0.s, p0/z, #-1 // =0xffffffffffffffff
632 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
635 ; NONEON-NOSVE-LABEL: icmp_eq_v4i32:
636 ; NONEON-NOSVE: // %bb.0:
637 ; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]!
638 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48
639 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #8]
640 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #28]
641 ; NONEON-NOSVE-NEXT: cmp w10, w8
642 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #24]
643 ; NONEON-NOSVE-NEXT: csetm w10, eq
644 ; NONEON-NOSVE-NEXT: cmp w9, w8
645 ; NONEON-NOSVE-NEXT: csetm w8, eq
646 ; NONEON-NOSVE-NEXT: stp w8, w10, [sp, #40]
647 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]
648 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp]
649 ; NONEON-NOSVE-NEXT: cmp w10, w8
650 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]
651 ; NONEON-NOSVE-NEXT: csetm w10, eq
652 ; NONEON-NOSVE-NEXT: cmp w9, w8
653 ; NONEON-NOSVE-NEXT: csetm w8, eq
654 ; NONEON-NOSVE-NEXT: stp w8, w10, [sp, #32]
655 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]
656 ; NONEON-NOSVE-NEXT: add sp, sp, #48
657 ; NONEON-NOSVE-NEXT: ret
658 %cmp = icmp eq <4 x i32> %op1, %op2
659 %sext = sext <4 x i1> %cmp to <4 x i32>
663 define void @icmp_eq_v8i32(ptr %a, ptr %b) {
664 ; CHECK-LABEL: icmp_eq_v8i32:
666 ; CHECK-NEXT: ldp q0, q3, [x1]
667 ; CHECK-NEXT: ptrue p0.s, vl4
668 ; CHECK-NEXT: ldp q1, q2, [x0]
669 ; CHECK-NEXT: cmpeq p1.s, p0/z, z1.s, z0.s
670 ; CHECK-NEXT: cmpeq p0.s, p0/z, z2.s, z3.s
671 ; CHECK-NEXT: mov z0.s, p1/z, #-1 // =0xffffffffffffffff
672 ; CHECK-NEXT: mov z1.s, p0/z, #-1 // =0xffffffffffffffff
673 ; CHECK-NEXT: stp q0, q1, [x0]
676 ; NONEON-NOSVE-LABEL: icmp_eq_v8i32:
677 ; NONEON-NOSVE: // %bb.0:
678 ; NONEON-NOSVE-NEXT: sub sp, sp, #96
679 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96
680 ; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]
681 ; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]
682 ; NONEON-NOSVE-NEXT: stp q2, q3, [sp]
683 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]
684 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #40]
685 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #60]
686 ; NONEON-NOSVE-NEXT: cmp w10, w8
687 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #56]
688 ; NONEON-NOSVE-NEXT: csetm w10, eq
689 ; NONEON-NOSVE-NEXT: cmp w9, w8
690 ; NONEON-NOSVE-NEXT: csetm w8, eq
691 ; NONEON-NOSVE-NEXT: stp w8, w10, [sp, #88]
692 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #52]
693 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #32]
694 ; NONEON-NOSVE-NEXT: cmp w10, w8
695 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #48]
696 ; NONEON-NOSVE-NEXT: csetm w10, eq
697 ; NONEON-NOSVE-NEXT: cmp w9, w8
698 ; NONEON-NOSVE-NEXT: csetm w8, eq
699 ; NONEON-NOSVE-NEXT: stp w8, w10, [sp, #80]
700 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #28]
701 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #8]
702 ; NONEON-NOSVE-NEXT: cmp w10, w8
703 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #24]
704 ; NONEON-NOSVE-NEXT: csetm w10, eq
705 ; NONEON-NOSVE-NEXT: cmp w9, w8
706 ; NONEON-NOSVE-NEXT: csetm w8, eq
707 ; NONEON-NOSVE-NEXT: stp w8, w10, [sp, #72]
708 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]
709 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp]
710 ; NONEON-NOSVE-NEXT: cmp w10, w8
711 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]
712 ; NONEON-NOSVE-NEXT: csetm w10, eq
713 ; NONEON-NOSVE-NEXT: cmp w9, w8
714 ; NONEON-NOSVE-NEXT: csetm w8, eq
715 ; NONEON-NOSVE-NEXT: stp w8, w10, [sp, #64]
716 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]
717 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
718 ; NONEON-NOSVE-NEXT: add sp, sp, #96
719 ; NONEON-NOSVE-NEXT: ret
720 %op1 = load <8 x i32>, ptr %a
721 %op2 = load <8 x i32>, ptr %b
722 %cmp = icmp eq <8 x i32> %op1, %op2
723 %sext = sext <8 x i1> %cmp to <8 x i32>
724 store <8 x i32> %sext, ptr %a
728 define <1 x i64> @icmp_eq_v1i64(<1 x i64> %op1, <1 x i64> %op2) {
729 ; CHECK-LABEL: icmp_eq_v1i64:
731 ; CHECK-NEXT: ptrue p0.d, vl1
732 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $z1
733 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
734 ; CHECK-NEXT: cmpeq p0.d, p0/z, z0.d, z1.d
735 ; CHECK-NEXT: mov z0.d, p0/z, #-1 // =0xffffffffffffffff
736 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
739 ; NONEON-NOSVE-LABEL: icmp_eq_v1i64:
740 ; NONEON-NOSVE: // %bb.0:
741 ; NONEON-NOSVE-NEXT: sub sp, sp, #16
742 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 16
743 ; NONEON-NOSVE-NEXT: fmov x8, d1
744 ; NONEON-NOSVE-NEXT: fmov x9, d0
745 ; NONEON-NOSVE-NEXT: cmp x9, x8
746 ; NONEON-NOSVE-NEXT: csetm x8, eq
747 ; NONEON-NOSVE-NEXT: str x8, [sp, #8]
748 ; NONEON-NOSVE-NEXT: ldr d0, [sp, #8]
749 ; NONEON-NOSVE-NEXT: add sp, sp, #16
750 ; NONEON-NOSVE-NEXT: ret
751 %cmp = icmp eq <1 x i64> %op1, %op2
752 %sext = sext <1 x i1> %cmp to <1 x i64>
756 define <2 x i64> @icmp_eq_v2i64(<2 x i64> %op1, <2 x i64> %op2) {
757 ; CHECK-LABEL: icmp_eq_v2i64:
759 ; CHECK-NEXT: ptrue p0.d, vl2
760 ; CHECK-NEXT: // kill: def $q1 killed $q1 def $z1
761 ; CHECK-NEXT: // kill: def $q0 killed $q0 def $z0
762 ; CHECK-NEXT: cmpeq p0.d, p0/z, z0.d, z1.d
763 ; CHECK-NEXT: mov z0.d, p0/z, #-1 // =0xffffffffffffffff
764 ; CHECK-NEXT: // kill: def $q0 killed $q0 killed $z0
767 ; NONEON-NOSVE-LABEL: icmp_eq_v2i64:
768 ; NONEON-NOSVE: // %bb.0:
769 ; NONEON-NOSVE-NEXT: stp q0, q1, [sp, #-48]!
770 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48
771 ; NONEON-NOSVE-NEXT: ldp x9, x10, [sp]
772 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]
773 ; NONEON-NOSVE-NEXT: cmp x10, x8
774 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]
775 ; NONEON-NOSVE-NEXT: csetm x10, eq
776 ; NONEON-NOSVE-NEXT: cmp x9, x8
777 ; NONEON-NOSVE-NEXT: csetm x8, eq
778 ; NONEON-NOSVE-NEXT: stp x8, x10, [sp, #32]
779 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]
780 ; NONEON-NOSVE-NEXT: add sp, sp, #48
781 ; NONEON-NOSVE-NEXT: ret
782 %cmp = icmp eq <2 x i64> %op1, %op2
783 %sext = sext <2 x i1> %cmp to <2 x i64>
787 define void @icmp_eq_v4i64(ptr %a, ptr %b) {
788 ; CHECK-LABEL: icmp_eq_v4i64:
790 ; CHECK-NEXT: ldp q0, q3, [x1]
791 ; CHECK-NEXT: ptrue p0.d, vl2
792 ; CHECK-NEXT: ldp q1, q2, [x0]
793 ; CHECK-NEXT: cmpeq p1.d, p0/z, z1.d, z0.d
794 ; CHECK-NEXT: cmpeq p0.d, p0/z, z2.d, z3.d
795 ; CHECK-NEXT: mov z0.d, p1/z, #-1 // =0xffffffffffffffff
796 ; CHECK-NEXT: mov z1.d, p0/z, #-1 // =0xffffffffffffffff
797 ; CHECK-NEXT: stp q0, q1, [x0]
800 ; NONEON-NOSVE-LABEL: icmp_eq_v4i64:
801 ; NONEON-NOSVE: // %bb.0:
802 ; NONEON-NOSVE-NEXT: sub sp, sp, #96
803 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96
804 ; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]
805 ; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]
806 ; NONEON-NOSVE-NEXT: stp q2, q3, [sp]
807 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]
808 ; NONEON-NOSVE-NEXT: ldp x9, x10, [sp, #32]
809 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #56]
810 ; NONEON-NOSVE-NEXT: cmp x10, x8
811 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #48]
812 ; NONEON-NOSVE-NEXT: csetm x10, eq
813 ; NONEON-NOSVE-NEXT: cmp x9, x8
814 ; NONEON-NOSVE-NEXT: csetm x8, eq
815 ; NONEON-NOSVE-NEXT: stp x8, x10, [sp, #80]
816 ; NONEON-NOSVE-NEXT: ldp x9, x10, [sp]
817 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]
818 ; NONEON-NOSVE-NEXT: cmp x10, x8
819 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]
820 ; NONEON-NOSVE-NEXT: csetm x10, eq
821 ; NONEON-NOSVE-NEXT: cmp x9, x8
822 ; NONEON-NOSVE-NEXT: csetm x8, eq
823 ; NONEON-NOSVE-NEXT: stp x8, x10, [sp, #64]
824 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]
825 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
826 ; NONEON-NOSVE-NEXT: add sp, sp, #96
827 ; NONEON-NOSVE-NEXT: ret
828 %op1 = load <4 x i64>, ptr %a
829 %op2 = load <4 x i64>, ptr %b
830 %cmp = icmp eq <4 x i64> %op1, %op2
831 %sext = sext <4 x i1> %cmp to <4 x i64>
832 store <4 x i64> %sext, ptr %a
840 define void @icmp_ne_v32i8(ptr %a, ptr %b) {
841 ; CHECK-LABEL: icmp_ne_v32i8:
843 ; CHECK-NEXT: ldp q0, q3, [x1]
844 ; CHECK-NEXT: ptrue p0.b, vl16
845 ; CHECK-NEXT: ldp q1, q2, [x0]
846 ; CHECK-NEXT: cmpne p1.b, p0/z, z1.b, z0.b
847 ; CHECK-NEXT: cmpne p0.b, p0/z, z2.b, z3.b
848 ; CHECK-NEXT: mov z0.b, p1/z, #-1 // =0xffffffffffffffff
849 ; CHECK-NEXT: mov z1.b, p0/z, #-1 // =0xffffffffffffffff
850 ; CHECK-NEXT: stp q0, q1, [x0]
853 ; NONEON-NOSVE-LABEL: icmp_ne_v32i8:
854 ; NONEON-NOSVE: // %bb.0:
855 ; NONEON-NOSVE-NEXT: sub sp, sp, #96
856 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96
857 ; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]
858 ; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]
859 ; NONEON-NOSVE-NEXT: stp q2, q3, [sp]
860 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]
861 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #63]
862 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #47]
863 ; NONEON-NOSVE-NEXT: cmp w9, w8
864 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #46]
865 ; NONEON-NOSVE-NEXT: csetm w8, ne
866 ; NONEON-NOSVE-NEXT: strb w8, [sp, #95]
867 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #62]
868 ; NONEON-NOSVE-NEXT: cmp w9, w8
869 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #45]
870 ; NONEON-NOSVE-NEXT: csetm w8, ne
871 ; NONEON-NOSVE-NEXT: strb w8, [sp, #94]
872 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #61]
873 ; NONEON-NOSVE-NEXT: cmp w9, w8
874 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #44]
875 ; NONEON-NOSVE-NEXT: csetm w8, ne
876 ; NONEON-NOSVE-NEXT: strb w8, [sp, #93]
877 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #60]
878 ; NONEON-NOSVE-NEXT: cmp w9, w8
879 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #43]
880 ; NONEON-NOSVE-NEXT: csetm w8, ne
881 ; NONEON-NOSVE-NEXT: strb w8, [sp, #92]
882 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #59]
883 ; NONEON-NOSVE-NEXT: cmp w9, w8
884 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #42]
885 ; NONEON-NOSVE-NEXT: csetm w8, ne
886 ; NONEON-NOSVE-NEXT: strb w8, [sp, #91]
887 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #58]
888 ; NONEON-NOSVE-NEXT: cmp w9, w8
889 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #41]
890 ; NONEON-NOSVE-NEXT: csetm w8, ne
891 ; NONEON-NOSVE-NEXT: strb w8, [sp, #90]
892 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #57]
893 ; NONEON-NOSVE-NEXT: cmp w9, w8
894 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #40]
895 ; NONEON-NOSVE-NEXT: csetm w8, ne
896 ; NONEON-NOSVE-NEXT: strb w8, [sp, #89]
897 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #56]
898 ; NONEON-NOSVE-NEXT: cmp w9, w8
899 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #39]
900 ; NONEON-NOSVE-NEXT: csetm w8, ne
901 ; NONEON-NOSVE-NEXT: strb w8, [sp, #88]
902 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #55]
903 ; NONEON-NOSVE-NEXT: cmp w9, w8
904 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #38]
905 ; NONEON-NOSVE-NEXT: csetm w8, ne
906 ; NONEON-NOSVE-NEXT: strb w8, [sp, #87]
907 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #54]
908 ; NONEON-NOSVE-NEXT: cmp w9, w8
909 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #37]
910 ; NONEON-NOSVE-NEXT: csetm w8, ne
911 ; NONEON-NOSVE-NEXT: strb w8, [sp, #86]
912 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #53]
913 ; NONEON-NOSVE-NEXT: cmp w9, w8
914 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #36]
915 ; NONEON-NOSVE-NEXT: csetm w8, ne
916 ; NONEON-NOSVE-NEXT: strb w8, [sp, #85]
917 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #52]
918 ; NONEON-NOSVE-NEXT: cmp w9, w8
919 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #35]
920 ; NONEON-NOSVE-NEXT: csetm w8, ne
921 ; NONEON-NOSVE-NEXT: strb w8, [sp, #84]
922 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #51]
923 ; NONEON-NOSVE-NEXT: cmp w9, w8
924 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #34]
925 ; NONEON-NOSVE-NEXT: csetm w8, ne
926 ; NONEON-NOSVE-NEXT: strb w8, [sp, #83]
927 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #50]
928 ; NONEON-NOSVE-NEXT: cmp w9, w8
929 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #33]
930 ; NONEON-NOSVE-NEXT: csetm w8, ne
931 ; NONEON-NOSVE-NEXT: strb w8, [sp, #82]
932 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #49]
933 ; NONEON-NOSVE-NEXT: cmp w9, w8
934 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #32]
935 ; NONEON-NOSVE-NEXT: csetm w8, ne
936 ; NONEON-NOSVE-NEXT: strb w8, [sp, #81]
937 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #48]
938 ; NONEON-NOSVE-NEXT: cmp w9, w8
939 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #15]
940 ; NONEON-NOSVE-NEXT: csetm w8, ne
941 ; NONEON-NOSVE-NEXT: strb w8, [sp, #80]
942 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #31]
943 ; NONEON-NOSVE-NEXT: cmp w9, w8
944 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #14]
945 ; NONEON-NOSVE-NEXT: csetm w8, ne
946 ; NONEON-NOSVE-NEXT: strb w8, [sp, #79]
947 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #30]
948 ; NONEON-NOSVE-NEXT: cmp w9, w8
949 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #13]
950 ; NONEON-NOSVE-NEXT: csetm w8, ne
951 ; NONEON-NOSVE-NEXT: strb w8, [sp, #78]
952 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #29]
953 ; NONEON-NOSVE-NEXT: cmp w9, w8
954 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #12]
955 ; NONEON-NOSVE-NEXT: csetm w8, ne
956 ; NONEON-NOSVE-NEXT: strb w8, [sp, #77]
957 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #28]
958 ; NONEON-NOSVE-NEXT: cmp w9, w8
959 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #11]
960 ; NONEON-NOSVE-NEXT: csetm w8, ne
961 ; NONEON-NOSVE-NEXT: strb w8, [sp, #76]
962 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #27]
963 ; NONEON-NOSVE-NEXT: cmp w9, w8
964 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #10]
965 ; NONEON-NOSVE-NEXT: csetm w8, ne
966 ; NONEON-NOSVE-NEXT: strb w8, [sp, #75]
967 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #26]
968 ; NONEON-NOSVE-NEXT: cmp w9, w8
969 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #9]
970 ; NONEON-NOSVE-NEXT: csetm w8, ne
971 ; NONEON-NOSVE-NEXT: strb w8, [sp, #74]
972 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #25]
973 ; NONEON-NOSVE-NEXT: cmp w9, w8
974 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #8]
975 ; NONEON-NOSVE-NEXT: csetm w8, ne
976 ; NONEON-NOSVE-NEXT: strb w8, [sp, #73]
977 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #24]
978 ; NONEON-NOSVE-NEXT: cmp w9, w8
979 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #7]
980 ; NONEON-NOSVE-NEXT: csetm w8, ne
981 ; NONEON-NOSVE-NEXT: strb w8, [sp, #72]
982 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #23]
983 ; NONEON-NOSVE-NEXT: cmp w9, w8
984 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #6]
985 ; NONEON-NOSVE-NEXT: csetm w8, ne
986 ; NONEON-NOSVE-NEXT: strb w8, [sp, #71]
987 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #22]
988 ; NONEON-NOSVE-NEXT: cmp w9, w8
989 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #5]
990 ; NONEON-NOSVE-NEXT: csetm w8, ne
991 ; NONEON-NOSVE-NEXT: strb w8, [sp, #70]
992 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #21]
993 ; NONEON-NOSVE-NEXT: cmp w9, w8
994 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #4]
995 ; NONEON-NOSVE-NEXT: csetm w8, ne
996 ; NONEON-NOSVE-NEXT: strb w8, [sp, #69]
997 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #20]
998 ; NONEON-NOSVE-NEXT: cmp w9, w8
999 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #3]
1000 ; NONEON-NOSVE-NEXT: csetm w8, ne
1001 ; NONEON-NOSVE-NEXT: strb w8, [sp, #68]
1002 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #19]
1003 ; NONEON-NOSVE-NEXT: cmp w9, w8
1004 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #2]
1005 ; NONEON-NOSVE-NEXT: csetm w8, ne
1006 ; NONEON-NOSVE-NEXT: strb w8, [sp, #67]
1007 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #18]
1008 ; NONEON-NOSVE-NEXT: cmp w9, w8
1009 ; NONEON-NOSVE-NEXT: ldrb w9, [sp, #1]
1010 ; NONEON-NOSVE-NEXT: csetm w8, ne
1011 ; NONEON-NOSVE-NEXT: strb w8, [sp, #66]
1012 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #17]
1013 ; NONEON-NOSVE-NEXT: cmp w9, w8
1014 ; NONEON-NOSVE-NEXT: ldrb w9, [sp]
1015 ; NONEON-NOSVE-NEXT: csetm w8, ne
1016 ; NONEON-NOSVE-NEXT: strb w8, [sp, #65]
1017 ; NONEON-NOSVE-NEXT: ldrb w8, [sp, #16]
1018 ; NONEON-NOSVE-NEXT: cmp w9, w8
1019 ; NONEON-NOSVE-NEXT: csetm w8, ne
1020 ; NONEON-NOSVE-NEXT: strb w8, [sp, #64]
1021 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]
1022 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
1023 ; NONEON-NOSVE-NEXT: add sp, sp, #96
1024 ; NONEON-NOSVE-NEXT: ret
1025 %op1 = load <32 x i8>, ptr %a
1026 %op2 = load <32 x i8>, ptr %b
1027 %cmp = icmp ne <32 x i8> %op1, %op2
1028 %sext = sext <32 x i1> %cmp to <32 x i8>
1029 store <32 x i8> %sext, ptr %a
1037 define void @icmp_sge_v8i16(ptr %a, ptr %b) {
1038 ; CHECK-LABEL: icmp_sge_v8i16:
1040 ; CHECK-NEXT: ptrue p0.h, vl8
1041 ; CHECK-NEXT: ldr q0, [x0]
1042 ; CHECK-NEXT: ldr q1, [x1]
1043 ; CHECK-NEXT: cmpge p0.h, p0/z, z0.h, z1.h
1044 ; CHECK-NEXT: mov z0.h, p0/z, #-1 // =0xffffffffffffffff
1045 ; CHECK-NEXT: str q0, [x0]
1048 ; NONEON-NOSVE-LABEL: icmp_sge_v8i16:
1049 ; NONEON-NOSVE: // %bb.0:
1050 ; NONEON-NOSVE-NEXT: ldr q0, [x1]
1051 ; NONEON-NOSVE-NEXT: ldr q1, [x0]
1052 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-48]!
1053 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48
1054 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #30]
1055 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #14]
1056 ; NONEON-NOSVE-NEXT: cmp w9, w8
1057 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #12]
1058 ; NONEON-NOSVE-NEXT: csetm w8, ge
1059 ; NONEON-NOSVE-NEXT: strh w8, [sp, #46]
1060 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #28]
1061 ; NONEON-NOSVE-NEXT: cmp w9, w8
1062 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #10]
1063 ; NONEON-NOSVE-NEXT: csetm w8, ge
1064 ; NONEON-NOSVE-NEXT: strh w8, [sp, #44]
1065 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #26]
1066 ; NONEON-NOSVE-NEXT: cmp w9, w8
1067 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #8]
1068 ; NONEON-NOSVE-NEXT: csetm w8, ge
1069 ; NONEON-NOSVE-NEXT: strh w8, [sp, #42]
1070 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #24]
1071 ; NONEON-NOSVE-NEXT: cmp w9, w8
1072 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #6]
1073 ; NONEON-NOSVE-NEXT: csetm w8, ge
1074 ; NONEON-NOSVE-NEXT: strh w8, [sp, #40]
1075 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #22]
1076 ; NONEON-NOSVE-NEXT: cmp w9, w8
1077 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #4]
1078 ; NONEON-NOSVE-NEXT: csetm w8, ge
1079 ; NONEON-NOSVE-NEXT: strh w8, [sp, #38]
1080 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #20]
1081 ; NONEON-NOSVE-NEXT: cmp w9, w8
1082 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #2]
1083 ; NONEON-NOSVE-NEXT: csetm w8, ge
1084 ; NONEON-NOSVE-NEXT: strh w8, [sp, #36]
1085 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #18]
1086 ; NONEON-NOSVE-NEXT: cmp w9, w8
1087 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp]
1088 ; NONEON-NOSVE-NEXT: csetm w8, ge
1089 ; NONEON-NOSVE-NEXT: strh w8, [sp, #34]
1090 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #16]
1091 ; NONEON-NOSVE-NEXT: cmp w9, w8
1092 ; NONEON-NOSVE-NEXT: csetm w8, ge
1093 ; NONEON-NOSVE-NEXT: strh w8, [sp, #32]
1094 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]
1095 ; NONEON-NOSVE-NEXT: str q0, [x0]
1096 ; NONEON-NOSVE-NEXT: add sp, sp, #48
1097 ; NONEON-NOSVE-NEXT: ret
1098 %op1 = load <8 x i16>, ptr %a
1099 %op2 = load <8 x i16>, ptr %b
1100 %cmp = icmp sge <8 x i16> %op1, %op2
1101 %sext = sext <8 x i1> %cmp to <8 x i16>
1102 store <8 x i16> %sext, ptr %a
1110 define void @icmp_sgt_v16i16(ptr %a, ptr %b) {
1111 ; CHECK-LABEL: icmp_sgt_v16i16:
1113 ; CHECK-NEXT: ldp q0, q3, [x1]
1114 ; CHECK-NEXT: ptrue p0.h, vl8
1115 ; CHECK-NEXT: ldp q1, q2, [x0]
1116 ; CHECK-NEXT: cmpgt p1.h, p0/z, z1.h, z0.h
1117 ; CHECK-NEXT: cmpgt p0.h, p0/z, z2.h, z3.h
1118 ; CHECK-NEXT: mov z0.h, p1/z, #-1 // =0xffffffffffffffff
1119 ; CHECK-NEXT: mov z1.h, p0/z, #-1 // =0xffffffffffffffff
1120 ; CHECK-NEXT: stp q0, q1, [x0]
1123 ; NONEON-NOSVE-LABEL: icmp_sgt_v16i16:
1124 ; NONEON-NOSVE: // %bb.0:
1125 ; NONEON-NOSVE-NEXT: sub sp, sp, #96
1126 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96
1127 ; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]
1128 ; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]
1129 ; NONEON-NOSVE-NEXT: stp q2, q3, [sp]
1130 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]
1131 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #62]
1132 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #46]
1133 ; NONEON-NOSVE-NEXT: cmp w9, w8
1134 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #44]
1135 ; NONEON-NOSVE-NEXT: csetm w8, gt
1136 ; NONEON-NOSVE-NEXT: strh w8, [sp, #94]
1137 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #60]
1138 ; NONEON-NOSVE-NEXT: cmp w9, w8
1139 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #42]
1140 ; NONEON-NOSVE-NEXT: csetm w8, gt
1141 ; NONEON-NOSVE-NEXT: strh w8, [sp, #92]
1142 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #58]
1143 ; NONEON-NOSVE-NEXT: cmp w9, w8
1144 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #40]
1145 ; NONEON-NOSVE-NEXT: csetm w8, gt
1146 ; NONEON-NOSVE-NEXT: strh w8, [sp, #90]
1147 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #56]
1148 ; NONEON-NOSVE-NEXT: cmp w9, w8
1149 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #38]
1150 ; NONEON-NOSVE-NEXT: csetm w8, gt
1151 ; NONEON-NOSVE-NEXT: strh w8, [sp, #88]
1152 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #54]
1153 ; NONEON-NOSVE-NEXT: cmp w9, w8
1154 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #36]
1155 ; NONEON-NOSVE-NEXT: csetm w8, gt
1156 ; NONEON-NOSVE-NEXT: strh w8, [sp, #86]
1157 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #52]
1158 ; NONEON-NOSVE-NEXT: cmp w9, w8
1159 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #34]
1160 ; NONEON-NOSVE-NEXT: csetm w8, gt
1161 ; NONEON-NOSVE-NEXT: strh w8, [sp, #84]
1162 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #50]
1163 ; NONEON-NOSVE-NEXT: cmp w9, w8
1164 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #32]
1165 ; NONEON-NOSVE-NEXT: csetm w8, gt
1166 ; NONEON-NOSVE-NEXT: strh w8, [sp, #82]
1167 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #48]
1168 ; NONEON-NOSVE-NEXT: cmp w9, w8
1169 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #14]
1170 ; NONEON-NOSVE-NEXT: csetm w8, gt
1171 ; NONEON-NOSVE-NEXT: strh w8, [sp, #80]
1172 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #30]
1173 ; NONEON-NOSVE-NEXT: cmp w9, w8
1174 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #12]
1175 ; NONEON-NOSVE-NEXT: csetm w8, gt
1176 ; NONEON-NOSVE-NEXT: strh w8, [sp, #78]
1177 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #28]
1178 ; NONEON-NOSVE-NEXT: cmp w9, w8
1179 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #10]
1180 ; NONEON-NOSVE-NEXT: csetm w8, gt
1181 ; NONEON-NOSVE-NEXT: strh w8, [sp, #76]
1182 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #26]
1183 ; NONEON-NOSVE-NEXT: cmp w9, w8
1184 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #8]
1185 ; NONEON-NOSVE-NEXT: csetm w8, gt
1186 ; NONEON-NOSVE-NEXT: strh w8, [sp, #74]
1187 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #24]
1188 ; NONEON-NOSVE-NEXT: cmp w9, w8
1189 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #6]
1190 ; NONEON-NOSVE-NEXT: csetm w8, gt
1191 ; NONEON-NOSVE-NEXT: strh w8, [sp, #72]
1192 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #22]
1193 ; NONEON-NOSVE-NEXT: cmp w9, w8
1194 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #4]
1195 ; NONEON-NOSVE-NEXT: csetm w8, gt
1196 ; NONEON-NOSVE-NEXT: strh w8, [sp, #70]
1197 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #20]
1198 ; NONEON-NOSVE-NEXT: cmp w9, w8
1199 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp, #2]
1200 ; NONEON-NOSVE-NEXT: csetm w8, gt
1201 ; NONEON-NOSVE-NEXT: strh w8, [sp, #68]
1202 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #18]
1203 ; NONEON-NOSVE-NEXT: cmp w9, w8
1204 ; NONEON-NOSVE-NEXT: ldrsh w9, [sp]
1205 ; NONEON-NOSVE-NEXT: csetm w8, gt
1206 ; NONEON-NOSVE-NEXT: strh w8, [sp, #66]
1207 ; NONEON-NOSVE-NEXT: ldrsh w8, [sp, #16]
1208 ; NONEON-NOSVE-NEXT: cmp w9, w8
1209 ; NONEON-NOSVE-NEXT: csetm w8, gt
1210 ; NONEON-NOSVE-NEXT: strh w8, [sp, #64]
1211 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]
1212 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
1213 ; NONEON-NOSVE-NEXT: add sp, sp, #96
1214 ; NONEON-NOSVE-NEXT: ret
1215 %op1 = load <16 x i16>, ptr %a
1216 %op2 = load <16 x i16>, ptr %b
1217 %cmp = icmp sgt <16 x i16> %op1, %op2
1218 %sext = sext <16 x i1> %cmp to <16 x i16>
1219 store <16 x i16> %sext, ptr %a
1227 define void @icmp_sle_v4i32(ptr %a, ptr %b) {
1228 ; CHECK-LABEL: icmp_sle_v4i32:
1230 ; CHECK-NEXT: ptrue p0.s, vl4
1231 ; CHECK-NEXT: ldr q0, [x0]
1232 ; CHECK-NEXT: ldr q1, [x1]
1233 ; CHECK-NEXT: cmpge p0.s, p0/z, z1.s, z0.s
1234 ; CHECK-NEXT: mov z0.s, p0/z, #-1 // =0xffffffffffffffff
1235 ; CHECK-NEXT: str q0, [x0]
1238 ; NONEON-NOSVE-LABEL: icmp_sle_v4i32:
1239 ; NONEON-NOSVE: // %bb.0:
1240 ; NONEON-NOSVE-NEXT: ldr q0, [x1]
1241 ; NONEON-NOSVE-NEXT: ldr q1, [x0]
1242 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-48]!
1243 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48
1244 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #8]
1245 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #28]
1246 ; NONEON-NOSVE-NEXT: cmp w10, w8
1247 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #24]
1248 ; NONEON-NOSVE-NEXT: csetm w10, le
1249 ; NONEON-NOSVE-NEXT: cmp w9, w8
1250 ; NONEON-NOSVE-NEXT: csetm w8, le
1251 ; NONEON-NOSVE-NEXT: stp w8, w10, [sp, #40]
1252 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]
1253 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp]
1254 ; NONEON-NOSVE-NEXT: cmp w10, w8
1255 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]
1256 ; NONEON-NOSVE-NEXT: csetm w10, le
1257 ; NONEON-NOSVE-NEXT: cmp w9, w8
1258 ; NONEON-NOSVE-NEXT: csetm w8, le
1259 ; NONEON-NOSVE-NEXT: stp w8, w10, [sp, #32]
1260 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]
1261 ; NONEON-NOSVE-NEXT: str q0, [x0]
1262 ; NONEON-NOSVE-NEXT: add sp, sp, #48
1263 ; NONEON-NOSVE-NEXT: ret
1264 %op1 = load <4 x i32>, ptr %a
1265 %op2 = load <4 x i32>, ptr %b
1266 %cmp = icmp sle <4 x i32> %op1, %op2
1267 %sext = sext <4 x i1> %cmp to <4 x i32>
1268 store <4 x i32> %sext, ptr %a
1276 define void @icmp_slt_v8i32(ptr %a, ptr %b) {
1277 ; CHECK-LABEL: icmp_slt_v8i32:
1279 ; CHECK-NEXT: ldp q0, q3, [x1]
1280 ; CHECK-NEXT: ptrue p0.s, vl4
1281 ; CHECK-NEXT: ldp q1, q2, [x0]
1282 ; CHECK-NEXT: cmpgt p1.s, p0/z, z0.s, z1.s
1283 ; CHECK-NEXT: cmpgt p0.s, p0/z, z3.s, z2.s
1284 ; CHECK-NEXT: mov z0.s, p1/z, #-1 // =0xffffffffffffffff
1285 ; CHECK-NEXT: mov z1.s, p0/z, #-1 // =0xffffffffffffffff
1286 ; CHECK-NEXT: stp q0, q1, [x0]
1289 ; NONEON-NOSVE-LABEL: icmp_slt_v8i32:
1290 ; NONEON-NOSVE: // %bb.0:
1291 ; NONEON-NOSVE-NEXT: sub sp, sp, #96
1292 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 96
1293 ; NONEON-NOSVE-NEXT: ldp q3, q0, [x1]
1294 ; NONEON-NOSVE-NEXT: ldp q2, q1, [x0]
1295 ; NONEON-NOSVE-NEXT: stp q2, q3, [sp]
1296 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #32]
1297 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #40]
1298 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #60]
1299 ; NONEON-NOSVE-NEXT: cmp w10, w8
1300 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #56]
1301 ; NONEON-NOSVE-NEXT: csetm w10, lt
1302 ; NONEON-NOSVE-NEXT: cmp w9, w8
1303 ; NONEON-NOSVE-NEXT: csetm w8, lt
1304 ; NONEON-NOSVE-NEXT: stp w8, w10, [sp, #88]
1305 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #52]
1306 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #32]
1307 ; NONEON-NOSVE-NEXT: cmp w10, w8
1308 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #48]
1309 ; NONEON-NOSVE-NEXT: csetm w10, lt
1310 ; NONEON-NOSVE-NEXT: cmp w9, w8
1311 ; NONEON-NOSVE-NEXT: csetm w8, lt
1312 ; NONEON-NOSVE-NEXT: stp w8, w10, [sp, #80]
1313 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #28]
1314 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp, #8]
1315 ; NONEON-NOSVE-NEXT: cmp w10, w8
1316 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #24]
1317 ; NONEON-NOSVE-NEXT: csetm w10, lt
1318 ; NONEON-NOSVE-NEXT: cmp w9, w8
1319 ; NONEON-NOSVE-NEXT: csetm w8, lt
1320 ; NONEON-NOSVE-NEXT: stp w8, w10, [sp, #72]
1321 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #20]
1322 ; NONEON-NOSVE-NEXT: ldp w9, w10, [sp]
1323 ; NONEON-NOSVE-NEXT: cmp w10, w8
1324 ; NONEON-NOSVE-NEXT: ldr w8, [sp, #16]
1325 ; NONEON-NOSVE-NEXT: csetm w10, lt
1326 ; NONEON-NOSVE-NEXT: cmp w9, w8
1327 ; NONEON-NOSVE-NEXT: csetm w8, lt
1328 ; NONEON-NOSVE-NEXT: stp w8, w10, [sp, #64]
1329 ; NONEON-NOSVE-NEXT: ldp q0, q1, [sp, #64]
1330 ; NONEON-NOSVE-NEXT: stp q0, q1, [x0]
1331 ; NONEON-NOSVE-NEXT: add sp, sp, #96
1332 ; NONEON-NOSVE-NEXT: ret
1333 %op1 = load <8 x i32>, ptr %a
1334 %op2 = load <8 x i32>, ptr %b
1335 %cmp = icmp slt <8 x i32> %op1, %op2
1336 %sext = sext <8 x i1> %cmp to <8 x i32>
1337 store <8 x i32> %sext, ptr %a
1345 define void @icmp_uge_v2i64(ptr %a, ptr %b) {
1346 ; CHECK-LABEL: icmp_uge_v2i64:
1348 ; CHECK-NEXT: ptrue p0.d, vl2
1349 ; CHECK-NEXT: ldr q0, [x0]
1350 ; CHECK-NEXT: ldr q1, [x1]
1351 ; CHECK-NEXT: cmphs p0.d, p0/z, z0.d, z1.d
1352 ; CHECK-NEXT: mov z0.d, p0/z, #-1 // =0xffffffffffffffff
1353 ; CHECK-NEXT: str q0, [x0]
1356 ; NONEON-NOSVE-LABEL: icmp_uge_v2i64:
1357 ; NONEON-NOSVE: // %bb.0:
1358 ; NONEON-NOSVE-NEXT: ldr q0, [x1]
1359 ; NONEON-NOSVE-NEXT: ldr q1, [x0]
1360 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-48]!
1361 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48
1362 ; NONEON-NOSVE-NEXT: ldp x9, x10, [sp]
1363 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]
1364 ; NONEON-NOSVE-NEXT: cmp x10, x8
1365 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]
1366 ; NONEON-NOSVE-NEXT: csetm x10, hs
1367 ; NONEON-NOSVE-NEXT: cmp x9, x8
1368 ; NONEON-NOSVE-NEXT: csetm x8, hs
1369 ; NONEON-NOSVE-NEXT: stp x8, x10, [sp, #32]
1370 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]
1371 ; NONEON-NOSVE-NEXT: str q0, [x0]
1372 ; NONEON-NOSVE-NEXT: add sp, sp, #48
1373 ; NONEON-NOSVE-NEXT: ret
1374 %op1 = load <2 x i64>, ptr %a
1375 %op2 = load <2 x i64>, ptr %b
1376 %cmp = icmp uge <2 x i64> %op1, %op2
1377 %sext = sext <2 x i1> %cmp to <2 x i64>
1378 store <2 x i64> %sext, ptr %a
1386 define void @icmp_ugt_v2i64(ptr %a, ptr %b) {
1387 ; CHECK-LABEL: icmp_ugt_v2i64:
1389 ; CHECK-NEXT: ptrue p0.d, vl2
1390 ; CHECK-NEXT: ldr q0, [x0]
1391 ; CHECK-NEXT: ldr q1, [x1]
1392 ; CHECK-NEXT: cmphi p0.d, p0/z, z0.d, z1.d
1393 ; CHECK-NEXT: mov z0.d, p0/z, #-1 // =0xffffffffffffffff
1394 ; CHECK-NEXT: str q0, [x0]
1397 ; NONEON-NOSVE-LABEL: icmp_ugt_v2i64:
1398 ; NONEON-NOSVE: // %bb.0:
1399 ; NONEON-NOSVE-NEXT: ldr q0, [x1]
1400 ; NONEON-NOSVE-NEXT: ldr q1, [x0]
1401 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-48]!
1402 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48
1403 ; NONEON-NOSVE-NEXT: ldp x9, x10, [sp]
1404 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]
1405 ; NONEON-NOSVE-NEXT: cmp x10, x8
1406 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]
1407 ; NONEON-NOSVE-NEXT: csetm x10, hi
1408 ; NONEON-NOSVE-NEXT: cmp x9, x8
1409 ; NONEON-NOSVE-NEXT: csetm x8, hi
1410 ; NONEON-NOSVE-NEXT: stp x8, x10, [sp, #32]
1411 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]
1412 ; NONEON-NOSVE-NEXT: str q0, [x0]
1413 ; NONEON-NOSVE-NEXT: add sp, sp, #48
1414 ; NONEON-NOSVE-NEXT: ret
1415 %op1 = load <2 x i64>, ptr %a
1416 %op2 = load <2 x i64>, ptr %b
1417 %cmp = icmp ugt <2 x i64> %op1, %op2
1418 %sext = sext <2 x i1> %cmp to <2 x i64>
1419 store <2 x i64> %sext, ptr %a
1427 define void @icmp_ule_v2i64(ptr %a, ptr %b) {
1428 ; CHECK-LABEL: icmp_ule_v2i64:
1430 ; CHECK-NEXT: ptrue p0.d, vl2
1431 ; CHECK-NEXT: ldr q0, [x0]
1432 ; CHECK-NEXT: ldr q1, [x1]
1433 ; CHECK-NEXT: cmphs p0.d, p0/z, z1.d, z0.d
1434 ; CHECK-NEXT: mov z0.d, p0/z, #-1 // =0xffffffffffffffff
1435 ; CHECK-NEXT: str q0, [x0]
1438 ; NONEON-NOSVE-LABEL: icmp_ule_v2i64:
1439 ; NONEON-NOSVE: // %bb.0:
1440 ; NONEON-NOSVE-NEXT: ldr q0, [x1]
1441 ; NONEON-NOSVE-NEXT: ldr q1, [x0]
1442 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-48]!
1443 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48
1444 ; NONEON-NOSVE-NEXT: ldp x9, x10, [sp]
1445 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]
1446 ; NONEON-NOSVE-NEXT: cmp x10, x8
1447 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]
1448 ; NONEON-NOSVE-NEXT: csetm x10, ls
1449 ; NONEON-NOSVE-NEXT: cmp x9, x8
1450 ; NONEON-NOSVE-NEXT: csetm x8, ls
1451 ; NONEON-NOSVE-NEXT: stp x8, x10, [sp, #32]
1452 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]
1453 ; NONEON-NOSVE-NEXT: str q0, [x0]
1454 ; NONEON-NOSVE-NEXT: add sp, sp, #48
1455 ; NONEON-NOSVE-NEXT: ret
1456 %op1 = load <2 x i64>, ptr %a
1457 %op2 = load <2 x i64>, ptr %b
1458 %cmp = icmp ule <2 x i64> %op1, %op2
1459 %sext = sext <2 x i1> %cmp to <2 x i64>
1460 store <2 x i64> %sext, ptr %a
1468 define void @icmp_ult_v2i64(ptr %a, ptr %b) {
1469 ; CHECK-LABEL: icmp_ult_v2i64:
1471 ; CHECK-NEXT: ptrue p0.d, vl2
1472 ; CHECK-NEXT: ldr q0, [x0]
1473 ; CHECK-NEXT: ldr q1, [x1]
1474 ; CHECK-NEXT: cmphi p0.d, p0/z, z1.d, z0.d
1475 ; CHECK-NEXT: mov z0.d, p0/z, #-1 // =0xffffffffffffffff
1476 ; CHECK-NEXT: str q0, [x0]
1479 ; NONEON-NOSVE-LABEL: icmp_ult_v2i64:
1480 ; NONEON-NOSVE: // %bb.0:
1481 ; NONEON-NOSVE-NEXT: ldr q0, [x1]
1482 ; NONEON-NOSVE-NEXT: ldr q1, [x0]
1483 ; NONEON-NOSVE-NEXT: stp q1, q0, [sp, #-48]!
1484 ; NONEON-NOSVE-NEXT: .cfi_def_cfa_offset 48
1485 ; NONEON-NOSVE-NEXT: ldp x9, x10, [sp]
1486 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #24]
1487 ; NONEON-NOSVE-NEXT: cmp x10, x8
1488 ; NONEON-NOSVE-NEXT: ldr x8, [sp, #16]
1489 ; NONEON-NOSVE-NEXT: csetm x10, lo
1490 ; NONEON-NOSVE-NEXT: cmp x9, x8
1491 ; NONEON-NOSVE-NEXT: csetm x8, lo
1492 ; NONEON-NOSVE-NEXT: stp x8, x10, [sp, #32]
1493 ; NONEON-NOSVE-NEXT: ldr q0, [sp, #32]
1494 ; NONEON-NOSVE-NEXT: str q0, [x0]
1495 ; NONEON-NOSVE-NEXT: add sp, sp, #48
1496 ; NONEON-NOSVE-NEXT: ret
1497 %op1 = load <2 x i64>, ptr %a
1498 %op2 = load <2 x i64>, ptr %b
1499 %cmp = icmp ult <2 x i64> %op1, %op2
1500 %sext = sext <2 x i1> %cmp to <2 x i64>
1501 store <2 x i64> %sext, ptr %a