1 //===- ARMInstrNEON.td - NEON support for ARM -----------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file describes the ARM NEON instruction set.
12 //===----------------------------------------------------------------------===//
15 //===----------------------------------------------------------------------===//
16 // NEON-specific Operands.
17 //===----------------------------------------------------------------------===//
18 def nModImm : Operand<i32> {
19 let PrintMethod = "printNEONModImmOperand";
22 def nImmSplatI8AsmOperand : AsmOperandClass { let Name = "NEONi8splat"; }
23 def nImmSplatI8 : Operand<i32> {
24 let PrintMethod = "printNEONModImmOperand";
25 let ParserMatchClass = nImmSplatI8AsmOperand;
27 def nImmSplatI16AsmOperand : AsmOperandClass { let Name = "NEONi16splat"; }
28 def nImmSplatI16 : Operand<i32> {
29 let PrintMethod = "printNEONModImmOperand";
30 let ParserMatchClass = nImmSplatI16AsmOperand;
32 def nImmSplatI32AsmOperand : AsmOperandClass { let Name = "NEONi32splat"; }
33 def nImmSplatI32 : Operand<i32> {
34 let PrintMethod = "printNEONModImmOperand";
35 let ParserMatchClass = nImmSplatI32AsmOperand;
37 def nImmVMOVI32AsmOperand : AsmOperandClass { let Name = "NEONi32vmov"; }
38 def nImmVMOVI32 : Operand<i32> {
39 let PrintMethod = "printNEONModImmOperand";
40 let ParserMatchClass = nImmVMOVI32AsmOperand;
42 def nImmVMOVI32NegAsmOperand : AsmOperandClass { let Name = "NEONi32vmovNeg"; }
43 def nImmVMOVI32Neg : Operand<i32> {
44 let PrintMethod = "printNEONModImmOperand";
45 let ParserMatchClass = nImmVMOVI32NegAsmOperand;
47 def nImmVMOVF32 : Operand<i32> {
48 let PrintMethod = "printFPImmOperand";
49 let ParserMatchClass = FPImmOperand;
51 def nImmSplatI64AsmOperand : AsmOperandClass { let Name = "NEONi64splat"; }
52 def nImmSplatI64 : Operand<i32> {
53 let PrintMethod = "printNEONModImmOperand";
54 let ParserMatchClass = nImmSplatI64AsmOperand;
57 def VectorIndex8Operand : AsmOperandClass { let Name = "VectorIndex8"; }
58 def VectorIndex16Operand : AsmOperandClass { let Name = "VectorIndex16"; }
59 def VectorIndex32Operand : AsmOperandClass { let Name = "VectorIndex32"; }
60 def VectorIndex8 : Operand<i32>, ImmLeaf<i32, [{
61 return ((uint64_t)Imm) < 8;
63 let ParserMatchClass = VectorIndex8Operand;
64 let PrintMethod = "printVectorIndex";
65 let MIOperandInfo = (ops i32imm);
67 def VectorIndex16 : Operand<i32>, ImmLeaf<i32, [{
68 return ((uint64_t)Imm) < 4;
70 let ParserMatchClass = VectorIndex16Operand;
71 let PrintMethod = "printVectorIndex";
72 let MIOperandInfo = (ops i32imm);
74 def VectorIndex32 : Operand<i32>, ImmLeaf<i32, [{
75 return ((uint64_t)Imm) < 2;
77 let ParserMatchClass = VectorIndex32Operand;
78 let PrintMethod = "printVectorIndex";
79 let MIOperandInfo = (ops i32imm);
82 // Register list of one D register.
83 def VecListOneDAsmOperand : AsmOperandClass {
84 let Name = "VecListOneD";
85 let ParserMethod = "parseVectorList";
86 let RenderMethod = "addVecListOperands";
88 def VecListOneD : RegisterOperand<DPR, "printVectorListOne"> {
89 let ParserMatchClass = VecListOneDAsmOperand;
91 // Register list of two sequential D registers.
92 def VecListTwoDAsmOperand : AsmOperandClass {
93 let Name = "VecListTwoD";
94 let ParserMethod = "parseVectorList";
95 let RenderMethod = "addVecListOperands";
97 def VecListTwoD : RegisterOperand<DPR, "printVectorListTwo"> {
98 let ParserMatchClass = VecListTwoDAsmOperand;
100 // Register list of three sequential D registers.
101 def VecListThreeDAsmOperand : AsmOperandClass {
102 let Name = "VecListThreeD";
103 let ParserMethod = "parseVectorList";
104 let RenderMethod = "addVecListOperands";
106 def VecListThreeD : RegisterOperand<DPR, "printVectorListThree"> {
107 let ParserMatchClass = VecListThreeDAsmOperand;
109 // Register list of four sequential D registers.
110 def VecListFourDAsmOperand : AsmOperandClass {
111 let Name = "VecListFourD";
112 let ParserMethod = "parseVectorList";
113 let RenderMethod = "addVecListOperands";
115 def VecListFourD : RegisterOperand<DPR, "printVectorListFour"> {
116 let ParserMatchClass = VecListFourDAsmOperand;
118 // Register list of two D registers spaced by 2 (two sequential Q registers).
119 def VecListTwoQAsmOperand : AsmOperandClass {
120 let Name = "VecListTwoQ";
121 let ParserMethod = "parseVectorList";
122 let RenderMethod = "addVecListOperands";
124 def VecListTwoQ : RegisterOperand<DPR, "printVectorListTwoSpaced"> {
125 let ParserMatchClass = VecListTwoQAsmOperand;
127 // Register list of three D registers spaced by 2 (three Q registers).
128 def VecListThreeQAsmOperand : AsmOperandClass {
129 let Name = "VecListThreeQ";
130 let ParserMethod = "parseVectorList";
131 let RenderMethod = "addVecListOperands";
133 def VecListThreeQ : RegisterOperand<DPR, "printVectorListThreeSpaced"> {
134 let ParserMatchClass = VecListThreeQAsmOperand;
136 // Register list of three D registers spaced by 2 (three Q registers).
137 def VecListFourQAsmOperand : AsmOperandClass {
138 let Name = "VecListFourQ";
139 let ParserMethod = "parseVectorList";
140 let RenderMethod = "addVecListOperands";
142 def VecListFourQ : RegisterOperand<DPR, "printVectorListFourSpaced"> {
143 let ParserMatchClass = VecListFourQAsmOperand;
146 // Register list of one D register, with "all lanes" subscripting.
147 def VecListOneDAllLanesAsmOperand : AsmOperandClass {
148 let Name = "VecListOneDAllLanes";
149 let ParserMethod = "parseVectorList";
150 let RenderMethod = "addVecListOperands";
152 def VecListOneDAllLanes : RegisterOperand<DPR, "printVectorListOneAllLanes"> {
153 let ParserMatchClass = VecListOneDAllLanesAsmOperand;
155 // Register list of two D registers, with "all lanes" subscripting.
156 def VecListTwoDAllLanesAsmOperand : AsmOperandClass {
157 let Name = "VecListTwoDAllLanes";
158 let ParserMethod = "parseVectorList";
159 let RenderMethod = "addVecListOperands";
161 def VecListTwoDAllLanes : RegisterOperand<DPR, "printVectorListTwoAllLanes"> {
162 let ParserMatchClass = VecListTwoDAllLanesAsmOperand;
164 // Register list of two D registers spaced by 2 (two sequential Q registers).
165 def VecListTwoQAllLanesAsmOperand : AsmOperandClass {
166 let Name = "VecListTwoQAllLanes";
167 let ParserMethod = "parseVectorList";
168 let RenderMethod = "addVecListOperands";
170 def VecListTwoQAllLanes : RegisterOperand<DPR,
171 "printVectorListTwoSpacedAllLanes"> {
172 let ParserMatchClass = VecListTwoQAllLanesAsmOperand;
174 // Register list of three D registers, with "all lanes" subscripting.
175 def VecListThreeDAllLanesAsmOperand : AsmOperandClass {
176 let Name = "VecListThreeDAllLanes";
177 let ParserMethod = "parseVectorList";
178 let RenderMethod = "addVecListOperands";
180 def VecListThreeDAllLanes : RegisterOperand<DPR,
181 "printVectorListThreeAllLanes"> {
182 let ParserMatchClass = VecListThreeDAllLanesAsmOperand;
184 // Register list of three D registers spaced by 2 (three sequential Q regs).
185 def VecListThreeQAllLanesAsmOperand : AsmOperandClass {
186 let Name = "VecListThreeQAllLanes";
187 let ParserMethod = "parseVectorList";
188 let RenderMethod = "addVecListOperands";
190 def VecListThreeQAllLanes : RegisterOperand<DPR,
191 "printVectorListThreeSpacedAllLanes"> {
192 let ParserMatchClass = VecListThreeQAllLanesAsmOperand;
194 // Register list of four D registers, with "all lanes" subscripting.
195 def VecListFourDAllLanesAsmOperand : AsmOperandClass {
196 let Name = "VecListFourDAllLanes";
197 let ParserMethod = "parseVectorList";
198 let RenderMethod = "addVecListOperands";
200 def VecListFourDAllLanes : RegisterOperand<DPR, "printVectorListFourAllLanes"> {
201 let ParserMatchClass = VecListFourDAllLanesAsmOperand;
203 // Register list of four D registers spaced by 2 (four sequential Q regs).
204 def VecListFourQAllLanesAsmOperand : AsmOperandClass {
205 let Name = "VecListFourQAllLanes";
206 let ParserMethod = "parseVectorList";
207 let RenderMethod = "addVecListOperands";
209 def VecListFourQAllLanes : RegisterOperand<DPR,
210 "printVectorListFourSpacedAllLanes"> {
211 let ParserMatchClass = VecListFourQAllLanesAsmOperand;
215 // Register list of one D register, with byte lane subscripting.
216 def VecListOneDByteIndexAsmOperand : AsmOperandClass {
217 let Name = "VecListOneDByteIndexed";
218 let ParserMethod = "parseVectorList";
219 let RenderMethod = "addVecListIndexedOperands";
221 def VecListOneDByteIndexed : Operand<i32> {
222 let ParserMatchClass = VecListOneDByteIndexAsmOperand;
223 let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
225 // ...with half-word lane subscripting.
226 def VecListOneDHWordIndexAsmOperand : AsmOperandClass {
227 let Name = "VecListOneDHWordIndexed";
228 let ParserMethod = "parseVectorList";
229 let RenderMethod = "addVecListIndexedOperands";
231 def VecListOneDHWordIndexed : Operand<i32> {
232 let ParserMatchClass = VecListOneDHWordIndexAsmOperand;
233 let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
235 // ...with word lane subscripting.
236 def VecListOneDWordIndexAsmOperand : AsmOperandClass {
237 let Name = "VecListOneDWordIndexed";
238 let ParserMethod = "parseVectorList";
239 let RenderMethod = "addVecListIndexedOperands";
241 def VecListOneDWordIndexed : Operand<i32> {
242 let ParserMatchClass = VecListOneDWordIndexAsmOperand;
243 let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
246 // Register list of two D registers with byte lane subscripting.
247 def VecListTwoDByteIndexAsmOperand : AsmOperandClass {
248 let Name = "VecListTwoDByteIndexed";
249 let ParserMethod = "parseVectorList";
250 let RenderMethod = "addVecListIndexedOperands";
252 def VecListTwoDByteIndexed : Operand<i32> {
253 let ParserMatchClass = VecListTwoDByteIndexAsmOperand;
254 let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
256 // ...with half-word lane subscripting.
257 def VecListTwoDHWordIndexAsmOperand : AsmOperandClass {
258 let Name = "VecListTwoDHWordIndexed";
259 let ParserMethod = "parseVectorList";
260 let RenderMethod = "addVecListIndexedOperands";
262 def VecListTwoDHWordIndexed : Operand<i32> {
263 let ParserMatchClass = VecListTwoDHWordIndexAsmOperand;
264 let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
266 // ...with word lane subscripting.
267 def VecListTwoDWordIndexAsmOperand : AsmOperandClass {
268 let Name = "VecListTwoDWordIndexed";
269 let ParserMethod = "parseVectorList";
270 let RenderMethod = "addVecListIndexedOperands";
272 def VecListTwoDWordIndexed : Operand<i32> {
273 let ParserMatchClass = VecListTwoDWordIndexAsmOperand;
274 let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
276 // Register list of two Q registers with half-word lane subscripting.
277 def VecListTwoQHWordIndexAsmOperand : AsmOperandClass {
278 let Name = "VecListTwoQHWordIndexed";
279 let ParserMethod = "parseVectorList";
280 let RenderMethod = "addVecListIndexedOperands";
282 def VecListTwoQHWordIndexed : Operand<i32> {
283 let ParserMatchClass = VecListTwoQHWordIndexAsmOperand;
284 let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
286 // ...with word lane subscripting.
287 def VecListTwoQWordIndexAsmOperand : AsmOperandClass {
288 let Name = "VecListTwoQWordIndexed";
289 let ParserMethod = "parseVectorList";
290 let RenderMethod = "addVecListIndexedOperands";
292 def VecListTwoQWordIndexed : Operand<i32> {
293 let ParserMatchClass = VecListTwoQWordIndexAsmOperand;
294 let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
298 // Register list of three D registers with byte lane subscripting.
299 def VecListThreeDByteIndexAsmOperand : AsmOperandClass {
300 let Name = "VecListThreeDByteIndexed";
301 let ParserMethod = "parseVectorList";
302 let RenderMethod = "addVecListIndexedOperands";
304 def VecListThreeDByteIndexed : Operand<i32> {
305 let ParserMatchClass = VecListThreeDByteIndexAsmOperand;
306 let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
308 // ...with half-word lane subscripting.
309 def VecListThreeDHWordIndexAsmOperand : AsmOperandClass {
310 let Name = "VecListThreeDHWordIndexed";
311 let ParserMethod = "parseVectorList";
312 let RenderMethod = "addVecListIndexedOperands";
314 def VecListThreeDHWordIndexed : Operand<i32> {
315 let ParserMatchClass = VecListThreeDHWordIndexAsmOperand;
316 let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
318 // ...with word lane subscripting.
319 def VecListThreeDWordIndexAsmOperand : AsmOperandClass {
320 let Name = "VecListThreeDWordIndexed";
321 let ParserMethod = "parseVectorList";
322 let RenderMethod = "addVecListIndexedOperands";
324 def VecListThreeDWordIndexed : Operand<i32> {
325 let ParserMatchClass = VecListThreeDWordIndexAsmOperand;
326 let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
328 // Register list of three Q registers with half-word lane subscripting.
329 def VecListThreeQHWordIndexAsmOperand : AsmOperandClass {
330 let Name = "VecListThreeQHWordIndexed";
331 let ParserMethod = "parseVectorList";
332 let RenderMethod = "addVecListIndexedOperands";
334 def VecListThreeQHWordIndexed : Operand<i32> {
335 let ParserMatchClass = VecListThreeQHWordIndexAsmOperand;
336 let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
338 // ...with word lane subscripting.
339 def VecListThreeQWordIndexAsmOperand : AsmOperandClass {
340 let Name = "VecListThreeQWordIndexed";
341 let ParserMethod = "parseVectorList";
342 let RenderMethod = "addVecListIndexedOperands";
344 def VecListThreeQWordIndexed : Operand<i32> {
345 let ParserMatchClass = VecListThreeQWordIndexAsmOperand;
346 let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
349 // Register list of four D registers with byte lane subscripting.
350 def VecListFourDByteIndexAsmOperand : AsmOperandClass {
351 let Name = "VecListFourDByteIndexed";
352 let ParserMethod = "parseVectorList";
353 let RenderMethod = "addVecListIndexedOperands";
355 def VecListFourDByteIndexed : Operand<i32> {
356 let ParserMatchClass = VecListFourDByteIndexAsmOperand;
357 let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
359 // ...with half-word lane subscripting.
360 def VecListFourDHWordIndexAsmOperand : AsmOperandClass {
361 let Name = "VecListFourDHWordIndexed";
362 let ParserMethod = "parseVectorList";
363 let RenderMethod = "addVecListIndexedOperands";
365 def VecListFourDHWordIndexed : Operand<i32> {
366 let ParserMatchClass = VecListFourDHWordIndexAsmOperand;
367 let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
369 // ...with word lane subscripting.
370 def VecListFourDWordIndexAsmOperand : AsmOperandClass {
371 let Name = "VecListFourDWordIndexed";
372 let ParserMethod = "parseVectorList";
373 let RenderMethod = "addVecListIndexedOperands";
375 def VecListFourDWordIndexed : Operand<i32> {
376 let ParserMatchClass = VecListFourDWordIndexAsmOperand;
377 let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
379 // Register list of four Q registers with half-word lane subscripting.
380 def VecListFourQHWordIndexAsmOperand : AsmOperandClass {
381 let Name = "VecListFourQHWordIndexed";
382 let ParserMethod = "parseVectorList";
383 let RenderMethod = "addVecListIndexedOperands";
385 def VecListFourQHWordIndexed : Operand<i32> {
386 let ParserMatchClass = VecListFourQHWordIndexAsmOperand;
387 let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
389 // ...with word lane subscripting.
390 def VecListFourQWordIndexAsmOperand : AsmOperandClass {
391 let Name = "VecListFourQWordIndexed";
392 let ParserMethod = "parseVectorList";
393 let RenderMethod = "addVecListIndexedOperands";
395 def VecListFourQWordIndexed : Operand<i32> {
396 let ParserMatchClass = VecListFourQWordIndexAsmOperand;
397 let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
401 //===----------------------------------------------------------------------===//
402 // NEON-specific DAG Nodes.
403 //===----------------------------------------------------------------------===//
405 def SDTARMVCMP : SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisSameAs<1, 2>]>;
406 def SDTARMVCMPZ : SDTypeProfile<1, 1, []>;
408 def NEONvceq : SDNode<"ARMISD::VCEQ", SDTARMVCMP>;
409 def NEONvceqz : SDNode<"ARMISD::VCEQZ", SDTARMVCMPZ>;
410 def NEONvcge : SDNode<"ARMISD::VCGE", SDTARMVCMP>;
411 def NEONvcgez : SDNode<"ARMISD::VCGEZ", SDTARMVCMPZ>;
412 def NEONvclez : SDNode<"ARMISD::VCLEZ", SDTARMVCMPZ>;
413 def NEONvcgeu : SDNode<"ARMISD::VCGEU", SDTARMVCMP>;
414 def NEONvcgt : SDNode<"ARMISD::VCGT", SDTARMVCMP>;
415 def NEONvcgtz : SDNode<"ARMISD::VCGTZ", SDTARMVCMPZ>;
416 def NEONvcltz : SDNode<"ARMISD::VCLTZ", SDTARMVCMPZ>;
417 def NEONvcgtu : SDNode<"ARMISD::VCGTU", SDTARMVCMP>;
418 def NEONvtst : SDNode<"ARMISD::VTST", SDTARMVCMP>;
420 // Types for vector shift by immediates. The "SHX" version is for long and
421 // narrow operations where the source and destination vectors have different
422 // types. The "SHINS" version is for shift and insert operations.
423 def SDTARMVSH : SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisSameAs<0, 1>,
425 def SDTARMVSHX : SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisInt<1>,
427 def SDTARMVSHINS : SDTypeProfile<1, 3, [SDTCisInt<0>, SDTCisSameAs<0, 1>,
428 SDTCisSameAs<0, 2>, SDTCisVT<3, i32>]>;
430 def NEONvshl : SDNode<"ARMISD::VSHL", SDTARMVSH>;
431 def NEONvshrs : SDNode<"ARMISD::VSHRs", SDTARMVSH>;
432 def NEONvshru : SDNode<"ARMISD::VSHRu", SDTARMVSH>;
433 def NEONvshlls : SDNode<"ARMISD::VSHLLs", SDTARMVSHX>;
434 def NEONvshllu : SDNode<"ARMISD::VSHLLu", SDTARMVSHX>;
435 def NEONvshlli : SDNode<"ARMISD::VSHLLi", SDTARMVSHX>;
436 def NEONvshrn : SDNode<"ARMISD::VSHRN", SDTARMVSHX>;
438 def NEONvrshrs : SDNode<"ARMISD::VRSHRs", SDTARMVSH>;
439 def NEONvrshru : SDNode<"ARMISD::VRSHRu", SDTARMVSH>;
440 def NEONvrshrn : SDNode<"ARMISD::VRSHRN", SDTARMVSHX>;
442 def NEONvqshls : SDNode<"ARMISD::VQSHLs", SDTARMVSH>;
443 def NEONvqshlu : SDNode<"ARMISD::VQSHLu", SDTARMVSH>;
444 def NEONvqshlsu : SDNode<"ARMISD::VQSHLsu", SDTARMVSH>;
445 def NEONvqshrns : SDNode<"ARMISD::VQSHRNs", SDTARMVSHX>;
446 def NEONvqshrnu : SDNode<"ARMISD::VQSHRNu", SDTARMVSHX>;
447 def NEONvqshrnsu : SDNode<"ARMISD::VQSHRNsu", SDTARMVSHX>;
449 def NEONvqrshrns : SDNode<"ARMISD::VQRSHRNs", SDTARMVSHX>;
450 def NEONvqrshrnu : SDNode<"ARMISD::VQRSHRNu", SDTARMVSHX>;
451 def NEONvqrshrnsu : SDNode<"ARMISD::VQRSHRNsu", SDTARMVSHX>;
453 def NEONvsli : SDNode<"ARMISD::VSLI", SDTARMVSHINS>;
454 def NEONvsri : SDNode<"ARMISD::VSRI", SDTARMVSHINS>;
456 def SDTARMVGETLN : SDTypeProfile<1, 2, [SDTCisVT<0, i32>, SDTCisInt<1>,
458 def NEONvgetlaneu : SDNode<"ARMISD::VGETLANEu", SDTARMVGETLN>;
459 def NEONvgetlanes : SDNode<"ARMISD::VGETLANEs", SDTARMVGETLN>;
461 def SDTARMVMOVIMM : SDTypeProfile<1, 1, [SDTCisVec<0>, SDTCisVT<1, i32>]>;
462 def NEONvmovImm : SDNode<"ARMISD::VMOVIMM", SDTARMVMOVIMM>;
463 def NEONvmvnImm : SDNode<"ARMISD::VMVNIMM", SDTARMVMOVIMM>;
464 def NEONvmovFPImm : SDNode<"ARMISD::VMOVFPIMM", SDTARMVMOVIMM>;
466 def SDTARMVORRIMM : SDTypeProfile<1, 2, [SDTCisVec<0>, SDTCisSameAs<0, 1>,
468 def NEONvorrImm : SDNode<"ARMISD::VORRIMM", SDTARMVORRIMM>;
469 def NEONvbicImm : SDNode<"ARMISD::VBICIMM", SDTARMVORRIMM>;
471 def NEONvbsl : SDNode<"ARMISD::VBSL",
472 SDTypeProfile<1, 3, [SDTCisVec<0>,
475 SDTCisSameAs<0, 3>]>>;
477 def NEONvdup : SDNode<"ARMISD::VDUP", SDTypeProfile<1, 1, [SDTCisVec<0>]>>;
479 // VDUPLANE can produce a quad-register result from a double-register source,
480 // so the result is not constrained to match the source.
481 def NEONvduplane : SDNode<"ARMISD::VDUPLANE",
482 SDTypeProfile<1, 2, [SDTCisVec<0>, SDTCisVec<1>,
485 def SDTARMVEXT : SDTypeProfile<1, 3, [SDTCisVec<0>, SDTCisSameAs<0, 1>,
486 SDTCisSameAs<0, 2>, SDTCisVT<3, i32>]>;
487 def NEONvext : SDNode<"ARMISD::VEXT", SDTARMVEXT>;
489 def SDTARMVSHUF : SDTypeProfile<1, 1, [SDTCisVec<0>, SDTCisSameAs<0, 1>]>;
490 def NEONvrev64 : SDNode<"ARMISD::VREV64", SDTARMVSHUF>;
491 def NEONvrev32 : SDNode<"ARMISD::VREV32", SDTARMVSHUF>;
492 def NEONvrev16 : SDNode<"ARMISD::VREV16", SDTARMVSHUF>;
494 def SDTARMVSHUF2 : SDTypeProfile<2, 2, [SDTCisVec<0>, SDTCisSameAs<0, 1>,
496 SDTCisSameAs<0, 3>]>;
497 def NEONzip : SDNode<"ARMISD::VZIP", SDTARMVSHUF2>;
498 def NEONuzp : SDNode<"ARMISD::VUZP", SDTARMVSHUF2>;
499 def NEONtrn : SDNode<"ARMISD::VTRN", SDTARMVSHUF2>;
501 def SDTARMVMULL : SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisInt<1>,
502 SDTCisSameAs<1, 2>]>;
503 def NEONvmulls : SDNode<"ARMISD::VMULLs", SDTARMVMULL>;
504 def NEONvmullu : SDNode<"ARMISD::VMULLu", SDTARMVMULL>;
506 def SDTARMFMAX : SDTypeProfile<1, 2, [SDTCisVT<0, f32>, SDTCisSameAs<0, 1>,
507 SDTCisSameAs<0, 2>]>;
508 def NEONfmax : SDNode<"ARMISD::FMAX", SDTARMFMAX>;
509 def NEONfmin : SDNode<"ARMISD::FMIN", SDTARMFMAX>;
511 def NEONimmAllZerosV: PatLeaf<(NEONvmovImm (i32 timm)), [{
512 ConstantSDNode *ConstVal = cast<ConstantSDNode>(N->getOperand(0));
513 unsigned EltBits = 0;
514 uint64_t EltVal = ARM_AM::decodeNEONModImm(ConstVal->getZExtValue(), EltBits);
515 return (EltBits == 32 && EltVal == 0);
518 def NEONimmAllOnesV: PatLeaf<(NEONvmovImm (i32 timm)), [{
519 ConstantSDNode *ConstVal = cast<ConstantSDNode>(N->getOperand(0));
520 unsigned EltBits = 0;
521 uint64_t EltVal = ARM_AM::decodeNEONModImm(ConstVal->getZExtValue(), EltBits);
522 return (EltBits == 8 && EltVal == 0xff);
525 //===----------------------------------------------------------------------===//
526 // NEON load / store instructions
527 //===----------------------------------------------------------------------===//
529 // Use VLDM to load a Q register as a D register pair.
530 // This is a pseudo instruction that is expanded to VLDMD after reg alloc.
532 : PseudoVFPLdStM<(outs QPR:$dst), (ins GPR:$Rn),
534 [(set QPR:$dst, (v2f64 (load GPR:$Rn)))]>;
536 // Use VSTM to store a Q register as a D register pair.
537 // This is a pseudo instruction that is expanded to VSTMD after reg alloc.
539 : PseudoVFPLdStM<(outs), (ins QPR:$src, GPR:$Rn),
541 [(store (v2f64 QPR:$src), GPR:$Rn)]>;
543 // Classes for VLD* pseudo-instructions with multi-register operands.
544 // These are expanded to real instructions after register allocation.
545 class VLDQPseudo<InstrItinClass itin>
546 : PseudoNLdSt<(outs QPR:$dst), (ins addrmode6:$addr), itin, "">;
547 class VLDQWBPseudo<InstrItinClass itin>
548 : PseudoNLdSt<(outs QPR:$dst, GPR:$wb),
549 (ins addrmode6:$addr, am6offset:$offset), itin,
551 class VLDQWBfixedPseudo<InstrItinClass itin>
552 : PseudoNLdSt<(outs QPR:$dst, GPR:$wb),
553 (ins addrmode6:$addr), itin,
555 class VLDQWBregisterPseudo<InstrItinClass itin>
556 : PseudoNLdSt<(outs QPR:$dst, GPR:$wb),
557 (ins addrmode6:$addr, rGPR:$offset), itin,
560 class VLDQQPseudo<InstrItinClass itin>
561 : PseudoNLdSt<(outs QQPR:$dst), (ins addrmode6:$addr), itin, "">;
562 class VLDQQWBPseudo<InstrItinClass itin>
563 : PseudoNLdSt<(outs QQPR:$dst, GPR:$wb),
564 (ins addrmode6:$addr, am6offset:$offset), itin,
566 class VLDQQWBfixedPseudo<InstrItinClass itin>
567 : PseudoNLdSt<(outs QQPR:$dst, GPR:$wb),
568 (ins addrmode6:$addr), itin,
570 class VLDQQWBregisterPseudo<InstrItinClass itin>
571 : PseudoNLdSt<(outs QQPR:$dst, GPR:$wb),
572 (ins addrmode6:$addr, rGPR:$offset), itin,
576 class VLDQQQQPseudo<InstrItinClass itin>
577 : PseudoNLdSt<(outs QQQQPR:$dst), (ins addrmode6:$addr, QQQQPR:$src),itin,
579 class VLDQQQQWBPseudo<InstrItinClass itin>
580 : PseudoNLdSt<(outs QQQQPR:$dst, GPR:$wb),
581 (ins addrmode6:$addr, am6offset:$offset, QQQQPR:$src), itin,
582 "$addr.addr = $wb, $src = $dst">;
584 let mayLoad = 1, neverHasSideEffects = 1, hasExtraDefRegAllocReq = 1 in {
586 // VLD1 : Vector Load (multiple single elements)
587 class VLD1D<bits<4> op7_4, string Dt>
588 : NLdSt<0,0b10,0b0111,op7_4, (outs VecListOneD:$Vd),
589 (ins addrmode6:$Rn), IIC_VLD1,
590 "vld1", Dt, "$Vd, $Rn", "", []> {
593 let DecoderMethod = "DecodeVLDInstruction";
595 class VLD1Q<bits<4> op7_4, string Dt>
596 : NLdSt<0,0b10,0b1010,op7_4, (outs VecListTwoD:$Vd),
597 (ins addrmode6:$Rn), IIC_VLD1x2,
598 "vld1", Dt, "$Vd, $Rn", "", []> {
600 let Inst{5-4} = Rn{5-4};
601 let DecoderMethod = "DecodeVLDInstruction";
604 def VLD1d8 : VLD1D<{0,0,0,?}, "8">;
605 def VLD1d16 : VLD1D<{0,1,0,?}, "16">;
606 def VLD1d32 : VLD1D<{1,0,0,?}, "32">;
607 def VLD1d64 : VLD1D<{1,1,0,?}, "64">;
609 def VLD1q8 : VLD1Q<{0,0,?,?}, "8">;
610 def VLD1q16 : VLD1Q<{0,1,?,?}, "16">;
611 def VLD1q32 : VLD1Q<{1,0,?,?}, "32">;
612 def VLD1q64 : VLD1Q<{1,1,?,?}, "64">;
614 def VLD1q8Pseudo : VLDQPseudo<IIC_VLD1x2>;
615 def VLD1q16Pseudo : VLDQPseudo<IIC_VLD1x2>;
616 def VLD1q32Pseudo : VLDQPseudo<IIC_VLD1x2>;
617 def VLD1q64Pseudo : VLDQPseudo<IIC_VLD1x2>;
619 // ...with address register writeback:
620 multiclass VLD1DWB<bits<4> op7_4, string Dt> {
621 def _fixed : NLdSt<0,0b10, 0b0111,op7_4, (outs VecListOneD:$Vd, GPR:$wb),
622 (ins addrmode6:$Rn), IIC_VLD1u,
623 "vld1", Dt, "$Vd, $Rn!",
624 "$Rn.addr = $wb", []> {
625 let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
627 let DecoderMethod = "DecodeVLDInstruction";
628 let AsmMatchConverter = "cvtVLDwbFixed";
630 def _register : NLdSt<0,0b10,0b0111,op7_4, (outs VecListOneD:$Vd, GPR:$wb),
631 (ins addrmode6:$Rn, rGPR:$Rm), IIC_VLD1u,
632 "vld1", Dt, "$Vd, $Rn, $Rm",
633 "$Rn.addr = $wb", []> {
635 let DecoderMethod = "DecodeVLDInstruction";
636 let AsmMatchConverter = "cvtVLDwbRegister";
639 multiclass VLD1QWB<bits<4> op7_4, string Dt> {
640 def _fixed : NLdSt<0,0b10,0b1010,op7_4, (outs VecListTwoD:$Vd, GPR:$wb),
641 (ins addrmode6:$Rn), IIC_VLD1x2u,
642 "vld1", Dt, "$Vd, $Rn!",
643 "$Rn.addr = $wb", []> {
644 let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
645 let Inst{5-4} = Rn{5-4};
646 let DecoderMethod = "DecodeVLDInstruction";
647 let AsmMatchConverter = "cvtVLDwbFixed";
649 def _register : NLdSt<0,0b10,0b1010,op7_4, (outs VecListTwoD:$Vd, GPR:$wb),
650 (ins addrmode6:$Rn, rGPR:$Rm), IIC_VLD1x2u,
651 "vld1", Dt, "$Vd, $Rn, $Rm",
652 "$Rn.addr = $wb", []> {
653 let Inst{5-4} = Rn{5-4};
654 let DecoderMethod = "DecodeVLDInstruction";
655 let AsmMatchConverter = "cvtVLDwbRegister";
659 defm VLD1d8wb : VLD1DWB<{0,0,0,?}, "8">;
660 defm VLD1d16wb : VLD1DWB<{0,1,0,?}, "16">;
661 defm VLD1d32wb : VLD1DWB<{1,0,0,?}, "32">;
662 defm VLD1d64wb : VLD1DWB<{1,1,0,?}, "64">;
663 defm VLD1q8wb : VLD1QWB<{0,0,?,?}, "8">;
664 defm VLD1q16wb : VLD1QWB<{0,1,?,?}, "16">;
665 defm VLD1q32wb : VLD1QWB<{1,0,?,?}, "32">;
666 defm VLD1q64wb : VLD1QWB<{1,1,?,?}, "64">;
668 def VLD1q8PseudoWB_fixed : VLDQWBfixedPseudo<IIC_VLD1x2u>;
669 def VLD1q16PseudoWB_fixed : VLDQWBfixedPseudo<IIC_VLD1x2u>;
670 def VLD1q32PseudoWB_fixed : VLDQWBfixedPseudo<IIC_VLD1x2u>;
671 def VLD1q64PseudoWB_fixed : VLDQWBfixedPseudo<IIC_VLD1x2u>;
672 def VLD1q8PseudoWB_register : VLDQWBregisterPseudo<IIC_VLD1x2u>;
673 def VLD1q16PseudoWB_register : VLDQWBregisterPseudo<IIC_VLD1x2u>;
674 def VLD1q32PseudoWB_register : VLDQWBregisterPseudo<IIC_VLD1x2u>;
675 def VLD1q64PseudoWB_register : VLDQWBregisterPseudo<IIC_VLD1x2u>;
677 // ...with 3 registers
678 class VLD1D3<bits<4> op7_4, string Dt>
679 : NLdSt<0,0b10,0b0110,op7_4, (outs VecListThreeD:$Vd),
680 (ins addrmode6:$Rn), IIC_VLD1x3, "vld1", Dt,
681 "$Vd, $Rn", "", []> {
684 let DecoderMethod = "DecodeVLDInstruction";
686 multiclass VLD1D3WB<bits<4> op7_4, string Dt> {
687 def _fixed : NLdSt<0,0b10,0b0110, op7_4, (outs VecListThreeD:$Vd, GPR:$wb),
688 (ins addrmode6:$Rn), IIC_VLD1x2u,
689 "vld1", Dt, "$Vd, $Rn!",
690 "$Rn.addr = $wb", []> {
691 let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
693 let DecoderMethod = "DecodeVLDInstruction";
694 let AsmMatchConverter = "cvtVLDwbFixed";
696 def _register : NLdSt<0,0b10,0b0110,op7_4, (outs VecListThreeD:$Vd, GPR:$wb),
697 (ins addrmode6:$Rn, rGPR:$Rm), IIC_VLD1x2u,
698 "vld1", Dt, "$Vd, $Rn, $Rm",
699 "$Rn.addr = $wb", []> {
701 let DecoderMethod = "DecodeVLDInstruction";
702 let AsmMatchConverter = "cvtVLDwbRegister";
706 def VLD1d8T : VLD1D3<{0,0,0,?}, "8">;
707 def VLD1d16T : VLD1D3<{0,1,0,?}, "16">;
708 def VLD1d32T : VLD1D3<{1,0,0,?}, "32">;
709 def VLD1d64T : VLD1D3<{1,1,0,?}, "64">;
711 defm VLD1d8Twb : VLD1D3WB<{0,0,0,?}, "8">;
712 defm VLD1d16Twb : VLD1D3WB<{0,1,0,?}, "16">;
713 defm VLD1d32Twb : VLD1D3WB<{1,0,0,?}, "32">;
714 defm VLD1d64Twb : VLD1D3WB<{1,1,0,?}, "64">;
716 def VLD1d64TPseudo : VLDQQPseudo<IIC_VLD1x3>;
718 // ...with 4 registers
719 class VLD1D4<bits<4> op7_4, string Dt>
720 : NLdSt<0, 0b10, 0b0010, op7_4, (outs VecListFourD:$Vd),
721 (ins addrmode6:$Rn), IIC_VLD1x4, "vld1", Dt,
722 "$Vd, $Rn", "", []> {
724 let Inst{5-4} = Rn{5-4};
725 let DecoderMethod = "DecodeVLDInstruction";
727 multiclass VLD1D4WB<bits<4> op7_4, string Dt> {
728 def _fixed : NLdSt<0,0b10,0b0010, op7_4, (outs VecListFourD:$Vd, GPR:$wb),
729 (ins addrmode6:$Rn), IIC_VLD1x2u,
730 "vld1", Dt, "$Vd, $Rn!",
731 "$Rn.addr = $wb", []> {
732 let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
733 let Inst{5-4} = Rn{5-4};
734 let DecoderMethod = "DecodeVLDInstruction";
735 let AsmMatchConverter = "cvtVLDwbFixed";
737 def _register : NLdSt<0,0b10,0b0010,op7_4, (outs VecListFourD:$Vd, GPR:$wb),
738 (ins addrmode6:$Rn, rGPR:$Rm), IIC_VLD1x2u,
739 "vld1", Dt, "$Vd, $Rn, $Rm",
740 "$Rn.addr = $wb", []> {
741 let Inst{5-4} = Rn{5-4};
742 let DecoderMethod = "DecodeVLDInstruction";
743 let AsmMatchConverter = "cvtVLDwbRegister";
747 def VLD1d8Q : VLD1D4<{0,0,?,?}, "8">;
748 def VLD1d16Q : VLD1D4<{0,1,?,?}, "16">;
749 def VLD1d32Q : VLD1D4<{1,0,?,?}, "32">;
750 def VLD1d64Q : VLD1D4<{1,1,?,?}, "64">;
752 defm VLD1d8Qwb : VLD1D4WB<{0,0,?,?}, "8">;
753 defm VLD1d16Qwb : VLD1D4WB<{0,1,?,?}, "16">;
754 defm VLD1d32Qwb : VLD1D4WB<{1,0,?,?}, "32">;
755 defm VLD1d64Qwb : VLD1D4WB<{1,1,?,?}, "64">;
757 def VLD1d64QPseudo : VLDQQPseudo<IIC_VLD1x4>;
759 // VLD2 : Vector Load (multiple 2-element structures)
760 class VLD2<bits<4> op11_8, bits<4> op7_4, string Dt, RegisterOperand VdTy,
762 : NLdSt<0, 0b10, op11_8, op7_4, (outs VdTy:$Vd),
763 (ins addrmode6:$Rn), itin,
764 "vld2", Dt, "$Vd, $Rn", "", []> {
766 let Inst{5-4} = Rn{5-4};
767 let DecoderMethod = "DecodeVLDInstruction";
770 def VLD2d8 : VLD2<0b1000, {0,0,?,?}, "8", VecListTwoD, IIC_VLD2>;
771 def VLD2d16 : VLD2<0b1000, {0,1,?,?}, "16", VecListTwoD, IIC_VLD2>;
772 def VLD2d32 : VLD2<0b1000, {1,0,?,?}, "32", VecListTwoD, IIC_VLD2>;
774 def VLD2q8 : VLD2<0b0011, {0,0,?,?}, "8", VecListFourD, IIC_VLD2x2>;
775 def VLD2q16 : VLD2<0b0011, {0,1,?,?}, "16", VecListFourD, IIC_VLD2x2>;
776 def VLD2q32 : VLD2<0b0011, {1,0,?,?}, "32", VecListFourD, IIC_VLD2x2>;
778 def VLD2d8Pseudo : VLDQPseudo<IIC_VLD2>;
779 def VLD2d16Pseudo : VLDQPseudo<IIC_VLD2>;
780 def VLD2d32Pseudo : VLDQPseudo<IIC_VLD2>;
782 def VLD2q8Pseudo : VLDQQPseudo<IIC_VLD2x2>;
783 def VLD2q16Pseudo : VLDQQPseudo<IIC_VLD2x2>;
784 def VLD2q32Pseudo : VLDQQPseudo<IIC_VLD2x2>;
786 // ...with address register writeback:
787 multiclass VLD2WB<bits<4> op11_8, bits<4> op7_4, string Dt,
788 RegisterOperand VdTy, InstrItinClass itin> {
789 def _fixed : NLdSt<0, 0b10, op11_8, op7_4, (outs VdTy:$Vd, GPR:$wb),
790 (ins addrmode6:$Rn), itin,
791 "vld2", Dt, "$Vd, $Rn!",
792 "$Rn.addr = $wb", []> {
793 let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
794 let Inst{5-4} = Rn{5-4};
795 let DecoderMethod = "DecodeVLDInstruction";
796 let AsmMatchConverter = "cvtVLDwbFixed";
798 def _register : NLdSt<0, 0b10, op11_8, op7_4, (outs VdTy:$Vd, GPR:$wb),
799 (ins addrmode6:$Rn, rGPR:$Rm), itin,
800 "vld2", Dt, "$Vd, $Rn, $Rm",
801 "$Rn.addr = $wb", []> {
802 let Inst{5-4} = Rn{5-4};
803 let DecoderMethod = "DecodeVLDInstruction";
804 let AsmMatchConverter = "cvtVLDwbRegister";
808 defm VLD2d8wb : VLD2WB<0b1000, {0,0,?,?}, "8", VecListTwoD, IIC_VLD2u>;
809 defm VLD2d16wb : VLD2WB<0b1000, {0,1,?,?}, "16", VecListTwoD, IIC_VLD2u>;
810 defm VLD2d32wb : VLD2WB<0b1000, {1,0,?,?}, "32", VecListTwoD, IIC_VLD2u>;
812 defm VLD2q8wb : VLD2WB<0b0011, {0,0,?,?}, "8", VecListFourD, IIC_VLD2x2u>;
813 defm VLD2q16wb : VLD2WB<0b0011, {0,1,?,?}, "16", VecListFourD, IIC_VLD2x2u>;
814 defm VLD2q32wb : VLD2WB<0b0011, {1,0,?,?}, "32", VecListFourD, IIC_VLD2x2u>;
816 def VLD2d8PseudoWB_fixed : VLDQWBfixedPseudo<IIC_VLD2u>;
817 def VLD2d16PseudoWB_fixed : VLDQWBfixedPseudo<IIC_VLD2u>;
818 def VLD2d32PseudoWB_fixed : VLDQWBfixedPseudo<IIC_VLD2u>;
819 def VLD2d8PseudoWB_register : VLDQWBregisterPseudo<IIC_VLD2u>;
820 def VLD2d16PseudoWB_register : VLDQWBregisterPseudo<IIC_VLD2u>;
821 def VLD2d32PseudoWB_register : VLDQWBregisterPseudo<IIC_VLD2u>;
823 def VLD2q8PseudoWB_fixed : VLDQQWBfixedPseudo<IIC_VLD2x2u>;
824 def VLD2q16PseudoWB_fixed : VLDQQWBfixedPseudo<IIC_VLD2x2u>;
825 def VLD2q32PseudoWB_fixed : VLDQQWBfixedPseudo<IIC_VLD2x2u>;
826 def VLD2q8PseudoWB_register : VLDQQWBregisterPseudo<IIC_VLD2x2u>;
827 def VLD2q16PseudoWB_register : VLDQQWBregisterPseudo<IIC_VLD2x2u>;
828 def VLD2q32PseudoWB_register : VLDQQWBregisterPseudo<IIC_VLD2x2u>;
830 // ...with double-spaced registers
831 def VLD2b8 : VLD2<0b1001, {0,0,?,?}, "8", VecListTwoQ, IIC_VLD2>;
832 def VLD2b16 : VLD2<0b1001, {0,1,?,?}, "16", VecListTwoQ, IIC_VLD2>;
833 def VLD2b32 : VLD2<0b1001, {1,0,?,?}, "32", VecListTwoQ, IIC_VLD2>;
834 defm VLD2b8wb : VLD2WB<0b1001, {0,0,?,?}, "8", VecListTwoQ, IIC_VLD2u>;
835 defm VLD2b16wb : VLD2WB<0b1001, {0,1,?,?}, "16", VecListTwoQ, IIC_VLD2u>;
836 defm VLD2b32wb : VLD2WB<0b1001, {1,0,?,?}, "32", VecListTwoQ, IIC_VLD2u>;
838 // VLD3 : Vector Load (multiple 3-element structures)
839 class VLD3D<bits<4> op11_8, bits<4> op7_4, string Dt>
840 : NLdSt<0, 0b10, op11_8, op7_4, (outs DPR:$Vd, DPR:$dst2, DPR:$dst3),
841 (ins addrmode6:$Rn), IIC_VLD3,
842 "vld3", Dt, "\\{$Vd, $dst2, $dst3\\}, $Rn", "", []> {
845 let DecoderMethod = "DecodeVLDInstruction";
848 def VLD3d8 : VLD3D<0b0100, {0,0,0,?}, "8">;
849 def VLD3d16 : VLD3D<0b0100, {0,1,0,?}, "16">;
850 def VLD3d32 : VLD3D<0b0100, {1,0,0,?}, "32">;
852 def VLD3d8Pseudo : VLDQQPseudo<IIC_VLD3>;
853 def VLD3d16Pseudo : VLDQQPseudo<IIC_VLD3>;
854 def VLD3d32Pseudo : VLDQQPseudo<IIC_VLD3>;
856 // ...with address register writeback:
857 class VLD3DWB<bits<4> op11_8, bits<4> op7_4, string Dt>
858 : NLdSt<0, 0b10, op11_8, op7_4,
859 (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, GPR:$wb),
860 (ins addrmode6:$Rn, am6offset:$Rm), IIC_VLD3u,
861 "vld3", Dt, "\\{$Vd, $dst2, $dst3\\}, $Rn$Rm",
862 "$Rn.addr = $wb", []> {
864 let DecoderMethod = "DecodeVLDInstruction";
867 def VLD3d8_UPD : VLD3DWB<0b0100, {0,0,0,?}, "8">;
868 def VLD3d16_UPD : VLD3DWB<0b0100, {0,1,0,?}, "16">;
869 def VLD3d32_UPD : VLD3DWB<0b0100, {1,0,0,?}, "32">;
871 def VLD3d8Pseudo_UPD : VLDQQWBPseudo<IIC_VLD3u>;
872 def VLD3d16Pseudo_UPD : VLDQQWBPseudo<IIC_VLD3u>;
873 def VLD3d32Pseudo_UPD : VLDQQWBPseudo<IIC_VLD3u>;
875 // ...with double-spaced registers:
876 def VLD3q8 : VLD3D<0b0101, {0,0,0,?}, "8">;
877 def VLD3q16 : VLD3D<0b0101, {0,1,0,?}, "16">;
878 def VLD3q32 : VLD3D<0b0101, {1,0,0,?}, "32">;
879 def VLD3q8_UPD : VLD3DWB<0b0101, {0,0,0,?}, "8">;
880 def VLD3q16_UPD : VLD3DWB<0b0101, {0,1,0,?}, "16">;
881 def VLD3q32_UPD : VLD3DWB<0b0101, {1,0,0,?}, "32">;
883 def VLD3q8Pseudo_UPD : VLDQQQQWBPseudo<IIC_VLD3u>;
884 def VLD3q16Pseudo_UPD : VLDQQQQWBPseudo<IIC_VLD3u>;
885 def VLD3q32Pseudo_UPD : VLDQQQQWBPseudo<IIC_VLD3u>;
887 // ...alternate versions to be allocated odd register numbers:
888 def VLD3q8oddPseudo : VLDQQQQPseudo<IIC_VLD3>;
889 def VLD3q16oddPseudo : VLDQQQQPseudo<IIC_VLD3>;
890 def VLD3q32oddPseudo : VLDQQQQPseudo<IIC_VLD3>;
892 def VLD3q8oddPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD3u>;
893 def VLD3q16oddPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD3u>;
894 def VLD3q32oddPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD3u>;
896 // VLD4 : Vector Load (multiple 4-element structures)
897 class VLD4D<bits<4> op11_8, bits<4> op7_4, string Dt>
898 : NLdSt<0, 0b10, op11_8, op7_4,
899 (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, DPR:$dst4),
900 (ins addrmode6:$Rn), IIC_VLD4,
901 "vld4", Dt, "\\{$Vd, $dst2, $dst3, $dst4\\}, $Rn", "", []> {
903 let Inst{5-4} = Rn{5-4};
904 let DecoderMethod = "DecodeVLDInstruction";
907 def VLD4d8 : VLD4D<0b0000, {0,0,?,?}, "8">;
908 def VLD4d16 : VLD4D<0b0000, {0,1,?,?}, "16">;
909 def VLD4d32 : VLD4D<0b0000, {1,0,?,?}, "32">;
911 def VLD4d8Pseudo : VLDQQPseudo<IIC_VLD4>;
912 def VLD4d16Pseudo : VLDQQPseudo<IIC_VLD4>;
913 def VLD4d32Pseudo : VLDQQPseudo<IIC_VLD4>;
915 // ...with address register writeback:
916 class VLD4DWB<bits<4> op11_8, bits<4> op7_4, string Dt>
917 : NLdSt<0, 0b10, op11_8, op7_4,
918 (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, DPR:$dst4, GPR:$wb),
919 (ins addrmode6:$Rn, am6offset:$Rm), IIC_VLD4u,
920 "vld4", Dt, "\\{$Vd, $dst2, $dst3, $dst4\\}, $Rn$Rm",
921 "$Rn.addr = $wb", []> {
922 let Inst{5-4} = Rn{5-4};
923 let DecoderMethod = "DecodeVLDInstruction";
926 def VLD4d8_UPD : VLD4DWB<0b0000, {0,0,?,?}, "8">;
927 def VLD4d16_UPD : VLD4DWB<0b0000, {0,1,?,?}, "16">;
928 def VLD4d32_UPD : VLD4DWB<0b0000, {1,0,?,?}, "32">;
930 def VLD4d8Pseudo_UPD : VLDQQWBPseudo<IIC_VLD4u>;
931 def VLD4d16Pseudo_UPD : VLDQQWBPseudo<IIC_VLD4u>;
932 def VLD4d32Pseudo_UPD : VLDQQWBPseudo<IIC_VLD4u>;
934 // ...with double-spaced registers:
935 def VLD4q8 : VLD4D<0b0001, {0,0,?,?}, "8">;
936 def VLD4q16 : VLD4D<0b0001, {0,1,?,?}, "16">;
937 def VLD4q32 : VLD4D<0b0001, {1,0,?,?}, "32">;
938 def VLD4q8_UPD : VLD4DWB<0b0001, {0,0,?,?}, "8">;
939 def VLD4q16_UPD : VLD4DWB<0b0001, {0,1,?,?}, "16">;
940 def VLD4q32_UPD : VLD4DWB<0b0001, {1,0,?,?}, "32">;
942 def VLD4q8Pseudo_UPD : VLDQQQQWBPseudo<IIC_VLD4u>;
943 def VLD4q16Pseudo_UPD : VLDQQQQWBPseudo<IIC_VLD4u>;
944 def VLD4q32Pseudo_UPD : VLDQQQQWBPseudo<IIC_VLD4u>;
946 // ...alternate versions to be allocated odd register numbers:
947 def VLD4q8oddPseudo : VLDQQQQPseudo<IIC_VLD4>;
948 def VLD4q16oddPseudo : VLDQQQQPseudo<IIC_VLD4>;
949 def VLD4q32oddPseudo : VLDQQQQPseudo<IIC_VLD4>;
951 def VLD4q8oddPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD4u>;
952 def VLD4q16oddPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD4u>;
953 def VLD4q32oddPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD4u>;
955 } // mayLoad = 1, neverHasSideEffects = 1, hasExtraDefRegAllocReq = 1
957 // Classes for VLD*LN pseudo-instructions with multi-register operands.
958 // These are expanded to real instructions after register allocation.
959 class VLDQLNPseudo<InstrItinClass itin>
960 : PseudoNLdSt<(outs QPR:$dst),
961 (ins addrmode6:$addr, QPR:$src, nohash_imm:$lane),
962 itin, "$src = $dst">;
963 class VLDQLNWBPseudo<InstrItinClass itin>
964 : PseudoNLdSt<(outs QPR:$dst, GPR:$wb),
965 (ins addrmode6:$addr, am6offset:$offset, QPR:$src,
966 nohash_imm:$lane), itin, "$addr.addr = $wb, $src = $dst">;
967 class VLDQQLNPseudo<InstrItinClass itin>
968 : PseudoNLdSt<(outs QQPR:$dst),
969 (ins addrmode6:$addr, QQPR:$src, nohash_imm:$lane),
970 itin, "$src = $dst">;
971 class VLDQQLNWBPseudo<InstrItinClass itin>
972 : PseudoNLdSt<(outs QQPR:$dst, GPR:$wb),
973 (ins addrmode6:$addr, am6offset:$offset, QQPR:$src,
974 nohash_imm:$lane), itin, "$addr.addr = $wb, $src = $dst">;
975 class VLDQQQQLNPseudo<InstrItinClass itin>
976 : PseudoNLdSt<(outs QQQQPR:$dst),
977 (ins addrmode6:$addr, QQQQPR:$src, nohash_imm:$lane),
978 itin, "$src = $dst">;
979 class VLDQQQQLNWBPseudo<InstrItinClass itin>
980 : PseudoNLdSt<(outs QQQQPR:$dst, GPR:$wb),
981 (ins addrmode6:$addr, am6offset:$offset, QQQQPR:$src,
982 nohash_imm:$lane), itin, "$addr.addr = $wb, $src = $dst">;
984 // VLD1LN : Vector Load (single element to one lane)
985 class VLD1LN<bits<4> op11_8, bits<4> op7_4, string Dt, ValueType Ty,
987 : NLdStLn<1, 0b10, op11_8, op7_4, (outs DPR:$Vd),
988 (ins addrmode6:$Rn, DPR:$src, nohash_imm:$lane),
989 IIC_VLD1ln, "vld1", Dt, "\\{$Vd[$lane]\\}, $Rn",
991 [(set DPR:$Vd, (vector_insert (Ty DPR:$src),
992 (i32 (LoadOp addrmode6:$Rn)),
995 let DecoderMethod = "DecodeVLD1LN";
997 class VLD1LN32<bits<4> op11_8, bits<4> op7_4, string Dt, ValueType Ty,
999 : NLdStLn<1, 0b10, op11_8, op7_4, (outs DPR:$Vd),
1000 (ins addrmode6oneL32:$Rn, DPR:$src, nohash_imm:$lane),
1001 IIC_VLD1ln, "vld1", Dt, "\\{$Vd[$lane]\\}, $Rn",
1003 [(set DPR:$Vd, (vector_insert (Ty DPR:$src),
1004 (i32 (LoadOp addrmode6oneL32:$Rn)),
1007 let DecoderMethod = "DecodeVLD1LN";
1009 class VLD1QLNPseudo<ValueType Ty, PatFrag LoadOp> : VLDQLNPseudo<IIC_VLD1ln> {
1010 let Pattern = [(set QPR:$dst, (vector_insert (Ty QPR:$src),
1011 (i32 (LoadOp addrmode6:$addr)),
1015 def VLD1LNd8 : VLD1LN<0b0000, {?,?,?,0}, "8", v8i8, extloadi8> {
1016 let Inst{7-5} = lane{2-0};
1018 def VLD1LNd16 : VLD1LN<0b0100, {?,?,0,?}, "16", v4i16, extloadi16> {
1019 let Inst{7-6} = lane{1-0};
1020 let Inst{5-4} = Rn{5-4};
1022 def VLD1LNd32 : VLD1LN32<0b1000, {?,0,?,?}, "32", v2i32, load> {
1023 let Inst{7} = lane{0};
1024 let Inst{5-4} = Rn{5-4};
1027 def VLD1LNq8Pseudo : VLD1QLNPseudo<v16i8, extloadi8>;
1028 def VLD1LNq16Pseudo : VLD1QLNPseudo<v8i16, extloadi16>;
1029 def VLD1LNq32Pseudo : VLD1QLNPseudo<v4i32, load>;
1031 def : Pat<(vector_insert (v2f32 DPR:$src),
1032 (f32 (load addrmode6:$addr)), imm:$lane),
1033 (VLD1LNd32 addrmode6:$addr, DPR:$src, imm:$lane)>;
1034 def : Pat<(vector_insert (v4f32 QPR:$src),
1035 (f32 (load addrmode6:$addr)), imm:$lane),
1036 (VLD1LNq32Pseudo addrmode6:$addr, QPR:$src, imm:$lane)>;
1038 let mayLoad = 1, neverHasSideEffects = 1, hasExtraDefRegAllocReq = 1 in {
1040 // ...with address register writeback:
1041 class VLD1LNWB<bits<4> op11_8, bits<4> op7_4, string Dt>
1042 : NLdStLn<1, 0b10, op11_8, op7_4, (outs DPR:$Vd, GPR:$wb),
1043 (ins addrmode6:$Rn, am6offset:$Rm,
1044 DPR:$src, nohash_imm:$lane), IIC_VLD1lnu, "vld1", Dt,
1045 "\\{$Vd[$lane]\\}, $Rn$Rm",
1046 "$src = $Vd, $Rn.addr = $wb", []> {
1047 let DecoderMethod = "DecodeVLD1LN";
1050 def VLD1LNd8_UPD : VLD1LNWB<0b0000, {?,?,?,0}, "8"> {
1051 let Inst{7-5} = lane{2-0};
1053 def VLD1LNd16_UPD : VLD1LNWB<0b0100, {?,?,0,?}, "16"> {
1054 let Inst{7-6} = lane{1-0};
1055 let Inst{4} = Rn{4};
1057 def VLD1LNd32_UPD : VLD1LNWB<0b1000, {?,0,?,?}, "32"> {
1058 let Inst{7} = lane{0};
1059 let Inst{5} = Rn{4};
1060 let Inst{4} = Rn{4};
1063 def VLD1LNq8Pseudo_UPD : VLDQLNWBPseudo<IIC_VLD1lnu>;
1064 def VLD1LNq16Pseudo_UPD : VLDQLNWBPseudo<IIC_VLD1lnu>;
1065 def VLD1LNq32Pseudo_UPD : VLDQLNWBPseudo<IIC_VLD1lnu>;
1067 // VLD2LN : Vector Load (single 2-element structure to one lane)
1068 class VLD2LN<bits<4> op11_8, bits<4> op7_4, string Dt>
1069 : NLdStLn<1, 0b10, op11_8, op7_4, (outs DPR:$Vd, DPR:$dst2),
1070 (ins addrmode6:$Rn, DPR:$src1, DPR:$src2, nohash_imm:$lane),
1071 IIC_VLD2ln, "vld2", Dt, "\\{$Vd[$lane], $dst2[$lane]\\}, $Rn",
1072 "$src1 = $Vd, $src2 = $dst2", []> {
1074 let Inst{4} = Rn{4};
1075 let DecoderMethod = "DecodeVLD2LN";
1078 def VLD2LNd8 : VLD2LN<0b0001, {?,?,?,?}, "8"> {
1079 let Inst{7-5} = lane{2-0};
1081 def VLD2LNd16 : VLD2LN<0b0101, {?,?,0,?}, "16"> {
1082 let Inst{7-6} = lane{1-0};
1084 def VLD2LNd32 : VLD2LN<0b1001, {?,0,0,?}, "32"> {
1085 let Inst{7} = lane{0};
1088 def VLD2LNd8Pseudo : VLDQLNPseudo<IIC_VLD2ln>;
1089 def VLD2LNd16Pseudo : VLDQLNPseudo<IIC_VLD2ln>;
1090 def VLD2LNd32Pseudo : VLDQLNPseudo<IIC_VLD2ln>;
1092 // ...with double-spaced registers:
1093 def VLD2LNq16 : VLD2LN<0b0101, {?,?,1,?}, "16"> {
1094 let Inst{7-6} = lane{1-0};
1096 def VLD2LNq32 : VLD2LN<0b1001, {?,1,0,?}, "32"> {
1097 let Inst{7} = lane{0};
1100 def VLD2LNq16Pseudo : VLDQQLNPseudo<IIC_VLD2ln>;
1101 def VLD2LNq32Pseudo : VLDQQLNPseudo<IIC_VLD2ln>;
1103 // ...with address register writeback:
1104 class VLD2LNWB<bits<4> op11_8, bits<4> op7_4, string Dt>
1105 : NLdStLn<1, 0b10, op11_8, op7_4, (outs DPR:$Vd, DPR:$dst2, GPR:$wb),
1106 (ins addrmode6:$Rn, am6offset:$Rm,
1107 DPR:$src1, DPR:$src2, nohash_imm:$lane), IIC_VLD2lnu, "vld2", Dt,
1108 "\\{$Vd[$lane], $dst2[$lane]\\}, $Rn$Rm",
1109 "$src1 = $Vd, $src2 = $dst2, $Rn.addr = $wb", []> {
1110 let Inst{4} = Rn{4};
1111 let DecoderMethod = "DecodeVLD2LN";
1114 def VLD2LNd8_UPD : VLD2LNWB<0b0001, {?,?,?,?}, "8"> {
1115 let Inst{7-5} = lane{2-0};
1117 def VLD2LNd16_UPD : VLD2LNWB<0b0101, {?,?,0,?}, "16"> {
1118 let Inst{7-6} = lane{1-0};
1120 def VLD2LNd32_UPD : VLD2LNWB<0b1001, {?,0,0,?}, "32"> {
1121 let Inst{7} = lane{0};
1124 def VLD2LNd8Pseudo_UPD : VLDQLNWBPseudo<IIC_VLD2lnu>;
1125 def VLD2LNd16Pseudo_UPD : VLDQLNWBPseudo<IIC_VLD2lnu>;
1126 def VLD2LNd32Pseudo_UPD : VLDQLNWBPseudo<IIC_VLD2lnu>;
1128 def VLD2LNq16_UPD : VLD2LNWB<0b0101, {?,?,1,?}, "16"> {
1129 let Inst{7-6} = lane{1-0};
1131 def VLD2LNq32_UPD : VLD2LNWB<0b1001, {?,1,0,?}, "32"> {
1132 let Inst{7} = lane{0};
1135 def VLD2LNq16Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD2lnu>;
1136 def VLD2LNq32Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD2lnu>;
1138 // VLD3LN : Vector Load (single 3-element structure to one lane)
1139 class VLD3LN<bits<4> op11_8, bits<4> op7_4, string Dt>
1140 : NLdStLn<1, 0b10, op11_8, op7_4, (outs DPR:$Vd, DPR:$dst2, DPR:$dst3),
1141 (ins addrmode6:$Rn, DPR:$src1, DPR:$src2, DPR:$src3,
1142 nohash_imm:$lane), IIC_VLD3ln, "vld3", Dt,
1143 "\\{$Vd[$lane], $dst2[$lane], $dst3[$lane]\\}, $Rn",
1144 "$src1 = $Vd, $src2 = $dst2, $src3 = $dst3", []> {
1146 let DecoderMethod = "DecodeVLD3LN";
1149 def VLD3LNd8 : VLD3LN<0b0010, {?,?,?,0}, "8"> {
1150 let Inst{7-5} = lane{2-0};
1152 def VLD3LNd16 : VLD3LN<0b0110, {?,?,0,0}, "16"> {
1153 let Inst{7-6} = lane{1-0};
1155 def VLD3LNd32 : VLD3LN<0b1010, {?,0,0,0}, "32"> {
1156 let Inst{7} = lane{0};
1159 def VLD3LNd8Pseudo : VLDQQLNPseudo<IIC_VLD3ln>;
1160 def VLD3LNd16Pseudo : VLDQQLNPseudo<IIC_VLD3ln>;
1161 def VLD3LNd32Pseudo : VLDQQLNPseudo<IIC_VLD3ln>;
1163 // ...with double-spaced registers:
1164 def VLD3LNq16 : VLD3LN<0b0110, {?,?,1,0}, "16"> {
1165 let Inst{7-6} = lane{1-0};
1167 def VLD3LNq32 : VLD3LN<0b1010, {?,1,0,0}, "32"> {
1168 let Inst{7} = lane{0};
1171 def VLD3LNq16Pseudo : VLDQQQQLNPseudo<IIC_VLD3ln>;
1172 def VLD3LNq32Pseudo : VLDQQQQLNPseudo<IIC_VLD3ln>;
1174 // ...with address register writeback:
1175 class VLD3LNWB<bits<4> op11_8, bits<4> op7_4, string Dt>
1176 : NLdStLn<1, 0b10, op11_8, op7_4,
1177 (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, GPR:$wb),
1178 (ins addrmode6:$Rn, am6offset:$Rm,
1179 DPR:$src1, DPR:$src2, DPR:$src3, nohash_imm:$lane),
1180 IIC_VLD3lnu, "vld3", Dt,
1181 "\\{$Vd[$lane], $dst2[$lane], $dst3[$lane]\\}, $Rn$Rm",
1182 "$src1 = $Vd, $src2 = $dst2, $src3 = $dst3, $Rn.addr = $wb",
1184 let DecoderMethod = "DecodeVLD3LN";
1187 def VLD3LNd8_UPD : VLD3LNWB<0b0010, {?,?,?,0}, "8"> {
1188 let Inst{7-5} = lane{2-0};
1190 def VLD3LNd16_UPD : VLD3LNWB<0b0110, {?,?,0,0}, "16"> {
1191 let Inst{7-6} = lane{1-0};
1193 def VLD3LNd32_UPD : VLD3LNWB<0b1010, {?,0,0,0}, "32"> {
1194 let Inst{7} = lane{0};
1197 def VLD3LNd8Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD3lnu>;
1198 def VLD3LNd16Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD3lnu>;
1199 def VLD3LNd32Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD3lnu>;
1201 def VLD3LNq16_UPD : VLD3LNWB<0b0110, {?,?,1,0}, "16"> {
1202 let Inst{7-6} = lane{1-0};
1204 def VLD3LNq32_UPD : VLD3LNWB<0b1010, {?,1,0,0}, "32"> {
1205 let Inst{7} = lane{0};
1208 def VLD3LNq16Pseudo_UPD : VLDQQQQLNWBPseudo<IIC_VLD3lnu>;
1209 def VLD3LNq32Pseudo_UPD : VLDQQQQLNWBPseudo<IIC_VLD3lnu>;
1211 // VLD4LN : Vector Load (single 4-element structure to one lane)
1212 class VLD4LN<bits<4> op11_8, bits<4> op7_4, string Dt>
1213 : NLdStLn<1, 0b10, op11_8, op7_4,
1214 (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, DPR:$dst4),
1215 (ins addrmode6:$Rn, DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4,
1216 nohash_imm:$lane), IIC_VLD4ln, "vld4", Dt,
1217 "\\{$Vd[$lane], $dst2[$lane], $dst3[$lane], $dst4[$lane]\\}, $Rn",
1218 "$src1 = $Vd, $src2 = $dst2, $src3 = $dst3, $src4 = $dst4", []> {
1220 let Inst{4} = Rn{4};
1221 let DecoderMethod = "DecodeVLD4LN";
1224 def VLD4LNd8 : VLD4LN<0b0011, {?,?,?,?}, "8"> {
1225 let Inst{7-5} = lane{2-0};
1227 def VLD4LNd16 : VLD4LN<0b0111, {?,?,0,?}, "16"> {
1228 let Inst{7-6} = lane{1-0};
1230 def VLD4LNd32 : VLD4LN<0b1011, {?,0,?,?}, "32"> {
1231 let Inst{7} = lane{0};
1232 let Inst{5} = Rn{5};
1235 def VLD4LNd8Pseudo : VLDQQLNPseudo<IIC_VLD4ln>;
1236 def VLD4LNd16Pseudo : VLDQQLNPseudo<IIC_VLD4ln>;
1237 def VLD4LNd32Pseudo : VLDQQLNPseudo<IIC_VLD4ln>;
1239 // ...with double-spaced registers:
1240 def VLD4LNq16 : VLD4LN<0b0111, {?,?,1,?}, "16"> {
1241 let Inst{7-6} = lane{1-0};
1243 def VLD4LNq32 : VLD4LN<0b1011, {?,1,?,?}, "32"> {
1244 let Inst{7} = lane{0};
1245 let Inst{5} = Rn{5};
1248 def VLD4LNq16Pseudo : VLDQQQQLNPseudo<IIC_VLD4ln>;
1249 def VLD4LNq32Pseudo : VLDQQQQLNPseudo<IIC_VLD4ln>;
1251 // ...with address register writeback:
1252 class VLD4LNWB<bits<4> op11_8, bits<4> op7_4, string Dt>
1253 : NLdStLn<1, 0b10, op11_8, op7_4,
1254 (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, DPR:$dst4, GPR:$wb),
1255 (ins addrmode6:$Rn, am6offset:$Rm,
1256 DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4, nohash_imm:$lane),
1257 IIC_VLD4lnu, "vld4", Dt,
1258 "\\{$Vd[$lane], $dst2[$lane], $dst3[$lane], $dst4[$lane]\\}, $Rn$Rm",
1259 "$src1 = $Vd, $src2 = $dst2, $src3 = $dst3, $src4 = $dst4, $Rn.addr = $wb",
1261 let Inst{4} = Rn{4};
1262 let DecoderMethod = "DecodeVLD4LN" ;
1265 def VLD4LNd8_UPD : VLD4LNWB<0b0011, {?,?,?,?}, "8"> {
1266 let Inst{7-5} = lane{2-0};
1268 def VLD4LNd16_UPD : VLD4LNWB<0b0111, {?,?,0,?}, "16"> {
1269 let Inst{7-6} = lane{1-0};
1271 def VLD4LNd32_UPD : VLD4LNWB<0b1011, {?,0,?,?}, "32"> {
1272 let Inst{7} = lane{0};
1273 let Inst{5} = Rn{5};
1276 def VLD4LNd8Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD4lnu>;
1277 def VLD4LNd16Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD4lnu>;
1278 def VLD4LNd32Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD4lnu>;
1280 def VLD4LNq16_UPD : VLD4LNWB<0b0111, {?,?,1,?}, "16"> {
1281 let Inst{7-6} = lane{1-0};
1283 def VLD4LNq32_UPD : VLD4LNWB<0b1011, {?,1,?,?}, "32"> {
1284 let Inst{7} = lane{0};
1285 let Inst{5} = Rn{5};
1288 def VLD4LNq16Pseudo_UPD : VLDQQQQLNWBPseudo<IIC_VLD4lnu>;
1289 def VLD4LNq32Pseudo_UPD : VLDQQQQLNWBPseudo<IIC_VLD4lnu>;
1291 } // mayLoad = 1, neverHasSideEffects = 1, hasExtraDefRegAllocReq = 1
1293 // VLD1DUP : Vector Load (single element to all lanes)
1294 class VLD1DUP<bits<4> op7_4, string Dt, ValueType Ty, PatFrag LoadOp>
1295 : NLdSt<1, 0b10, 0b1100, op7_4, (outs VecListOneDAllLanes:$Vd),
1296 (ins addrmode6dup:$Rn),
1297 IIC_VLD1dup, "vld1", Dt, "$Vd, $Rn", "",
1298 [(set VecListOneDAllLanes:$Vd,
1299 (Ty (NEONvdup (i32 (LoadOp addrmode6dup:$Rn)))))]> {
1301 let Inst{4} = Rn{4};
1302 let DecoderMethod = "DecodeVLD1DupInstruction";
1304 class VLD1QDUPPseudo<ValueType Ty, PatFrag LoadOp> : VLDQPseudo<IIC_VLD1dup> {
1305 let Pattern = [(set QPR:$dst,
1306 (Ty (NEONvdup (i32 (LoadOp addrmode6dup:$addr)))))];
1309 def VLD1DUPd8 : VLD1DUP<{0,0,0,?}, "8", v8i8, extloadi8>;
1310 def VLD1DUPd16 : VLD1DUP<{0,1,0,?}, "16", v4i16, extloadi16>;
1311 def VLD1DUPd32 : VLD1DUP<{1,0,0,?}, "32", v2i32, load>;
1313 def VLD1DUPq8Pseudo : VLD1QDUPPseudo<v16i8, extloadi8>;
1314 def VLD1DUPq16Pseudo : VLD1QDUPPseudo<v8i16, extloadi16>;
1315 def VLD1DUPq32Pseudo : VLD1QDUPPseudo<v4i32, load>;
1317 def : Pat<(v2f32 (NEONvdup (f32 (load addrmode6dup:$addr)))),
1318 (VLD1DUPd32 addrmode6:$addr)>;
1319 def : Pat<(v4f32 (NEONvdup (f32 (load addrmode6dup:$addr)))),
1320 (VLD1DUPq32Pseudo addrmode6:$addr)>;
1322 let mayLoad = 1, neverHasSideEffects = 1, hasExtraDefRegAllocReq = 1 in {
1324 class VLD1QDUP<bits<4> op7_4, string Dt>
1325 : NLdSt<1, 0b10, 0b1100, op7_4, (outs VecListTwoDAllLanes:$Vd),
1326 (ins addrmode6dup:$Rn), IIC_VLD1dup,
1327 "vld1", Dt, "$Vd, $Rn", "", []> {
1329 let Inst{4} = Rn{4};
1330 let DecoderMethod = "DecodeVLD1DupInstruction";
1333 def VLD1DUPq8 : VLD1QDUP<{0,0,1,0}, "8">;
1334 def VLD1DUPq16 : VLD1QDUP<{0,1,1,?}, "16">;
1335 def VLD1DUPq32 : VLD1QDUP<{1,0,1,?}, "32">;
1337 // ...with address register writeback:
1338 multiclass VLD1DUPWB<bits<4> op7_4, string Dt> {
1339 def _fixed : NLdSt<1, 0b10, 0b1100, op7_4,
1340 (outs VecListOneDAllLanes:$Vd, GPR:$wb),
1341 (ins addrmode6dup:$Rn), IIC_VLD1dupu,
1342 "vld1", Dt, "$Vd, $Rn!",
1343 "$Rn.addr = $wb", []> {
1344 let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
1345 let Inst{4} = Rn{4};
1346 let DecoderMethod = "DecodeVLD1DupInstruction";
1347 let AsmMatchConverter = "cvtVLDwbFixed";
1349 def _register : NLdSt<1, 0b10, 0b1100, op7_4,
1350 (outs VecListOneDAllLanes:$Vd, GPR:$wb),
1351 (ins addrmode6dup:$Rn, rGPR:$Rm), IIC_VLD1dupu,
1352 "vld1", Dt, "$Vd, $Rn, $Rm",
1353 "$Rn.addr = $wb", []> {
1354 let Inst{4} = Rn{4};
1355 let DecoderMethod = "DecodeVLD1DupInstruction";
1356 let AsmMatchConverter = "cvtVLDwbRegister";
1359 multiclass VLD1QDUPWB<bits<4> op7_4, string Dt> {
1360 def _fixed : NLdSt<1, 0b10, 0b1100, op7_4,
1361 (outs VecListTwoDAllLanes:$Vd, GPR:$wb),
1362 (ins addrmode6dup:$Rn), IIC_VLD1dupu,
1363 "vld1", Dt, "$Vd, $Rn!",
1364 "$Rn.addr = $wb", []> {
1365 let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
1366 let Inst{4} = Rn{4};
1367 let DecoderMethod = "DecodeVLD1DupInstruction";
1368 let AsmMatchConverter = "cvtVLDwbFixed";
1370 def _register : NLdSt<1, 0b10, 0b1100, op7_4,
1371 (outs VecListTwoDAllLanes:$Vd, GPR:$wb),
1372 (ins addrmode6dup:$Rn, rGPR:$Rm), IIC_VLD1dupu,
1373 "vld1", Dt, "$Vd, $Rn, $Rm",
1374 "$Rn.addr = $wb", []> {
1375 let Inst{4} = Rn{4};
1376 let DecoderMethod = "DecodeVLD1DupInstruction";
1377 let AsmMatchConverter = "cvtVLDwbRegister";
1381 defm VLD1DUPd8wb : VLD1DUPWB<{0,0,0,0}, "8">;
1382 defm VLD1DUPd16wb : VLD1DUPWB<{0,1,0,?}, "16">;
1383 defm VLD1DUPd32wb : VLD1DUPWB<{1,0,0,?}, "32">;
1385 defm VLD1DUPq8wb : VLD1QDUPWB<{0,0,1,0}, "8">;
1386 defm VLD1DUPq16wb : VLD1QDUPWB<{0,1,1,?}, "16">;
1387 defm VLD1DUPq32wb : VLD1QDUPWB<{1,0,1,?}, "32">;
1389 def VLD1DUPq8PseudoWB_fixed : VLDQWBfixedPseudo<IIC_VLD1dupu>;
1390 def VLD1DUPq16PseudoWB_fixed : VLDQWBfixedPseudo<IIC_VLD1dupu>;
1391 def VLD1DUPq32PseudoWB_fixed : VLDQWBfixedPseudo<IIC_VLD1dupu>;
1392 def VLD1DUPq8PseudoWB_register : VLDQWBregisterPseudo<IIC_VLD1dupu>;
1393 def VLD1DUPq16PseudoWB_register : VLDQWBregisterPseudo<IIC_VLD1dupu>;
1394 def VLD1DUPq32PseudoWB_register : VLDQWBregisterPseudo<IIC_VLD1dupu>;
1396 // VLD2DUP : Vector Load (single 2-element structure to all lanes)
1397 class VLD2DUP<bits<4> op7_4, string Dt, RegisterOperand VdTy>
1398 : NLdSt<1, 0b10, 0b1101, op7_4, (outs VdTy:$Vd),
1399 (ins addrmode6dup:$Rn), IIC_VLD2dup,
1400 "vld2", Dt, "$Vd, $Rn", "", []> {
1402 let Inst{4} = Rn{4};
1403 let DecoderMethod = "DecodeVLD2DupInstruction";
1406 def VLD2DUPd8 : VLD2DUP<{0,0,0,?}, "8", VecListTwoDAllLanes>;
1407 def VLD2DUPd16 : VLD2DUP<{0,1,0,?}, "16", VecListTwoDAllLanes>;
1408 def VLD2DUPd32 : VLD2DUP<{1,0,0,?}, "32", VecListTwoDAllLanes>;
1410 def VLD2DUPd8Pseudo : VLDQPseudo<IIC_VLD2dup>;
1411 def VLD2DUPd16Pseudo : VLDQPseudo<IIC_VLD2dup>;
1412 def VLD2DUPd32Pseudo : VLDQPseudo<IIC_VLD2dup>;
1414 // ...with double-spaced registers (not used for codegen):
1415 def VLD2DUPd8x2 : VLD2DUP<{0,0,1,?}, "8", VecListTwoQAllLanes>;
1416 def VLD2DUPd16x2 : VLD2DUP<{0,1,1,?}, "16", VecListTwoQAllLanes>;
1417 def VLD2DUPd32x2 : VLD2DUP<{1,0,1,?}, "32", VecListTwoQAllLanes>;
1419 // ...with address register writeback:
1420 multiclass VLD2DUPWB<bits<4> op7_4, string Dt, RegisterOperand VdTy> {
1421 def _fixed : NLdSt<1, 0b10, 0b1101, op7_4,
1422 (outs VdTy:$Vd, GPR:$wb),
1423 (ins addrmode6dup:$Rn), IIC_VLD2dupu,
1424 "vld2", Dt, "$Vd, $Rn!",
1425 "$Rn.addr = $wb", []> {
1426 let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
1427 let Inst{4} = Rn{4};
1428 let DecoderMethod = "DecodeVLD2DupInstruction";
1429 let AsmMatchConverter = "cvtVLDwbFixed";
1431 def _register : NLdSt<1, 0b10, 0b1101, op7_4,
1432 (outs VdTy:$Vd, GPR:$wb),
1433 (ins addrmode6dup:$Rn, rGPR:$Rm), IIC_VLD2dupu,
1434 "vld2", Dt, "$Vd, $Rn, $Rm",
1435 "$Rn.addr = $wb", []> {
1436 let Inst{4} = Rn{4};
1437 let DecoderMethod = "DecodeVLD2DupInstruction";
1438 let AsmMatchConverter = "cvtVLDwbRegister";
1442 defm VLD2DUPd8wb : VLD2DUPWB<{0,0,0,0}, "8", VecListTwoDAllLanes>;
1443 defm VLD2DUPd16wb : VLD2DUPWB<{0,1,0,?}, "16", VecListTwoDAllLanes>;
1444 defm VLD2DUPd32wb : VLD2DUPWB<{1,0,0,?}, "32", VecListTwoDAllLanes>;
1446 defm VLD2DUPd8x2wb : VLD2DUPWB<{0,0,1,0}, "8", VecListTwoQAllLanes>;
1447 defm VLD2DUPd16x2wb : VLD2DUPWB<{0,1,1,?}, "16", VecListTwoQAllLanes>;
1448 defm VLD2DUPd32x2wb : VLD2DUPWB<{1,0,1,?}, "32", VecListTwoQAllLanes>;
1450 def VLD2DUPd8PseudoWB_fixed : VLDQWBfixedPseudo <IIC_VLD2dupu>;
1451 def VLD2DUPd8PseudoWB_register : VLDQWBregisterPseudo<IIC_VLD2dupu>;
1452 def VLD2DUPd16PseudoWB_fixed : VLDQWBfixedPseudo <IIC_VLD2dupu>;
1453 def VLD2DUPd16PseudoWB_register : VLDQWBregisterPseudo<IIC_VLD2dupu>;
1454 def VLD2DUPd32PseudoWB_fixed : VLDQWBfixedPseudo <IIC_VLD2dupu>;
1455 def VLD2DUPd32PseudoWB_register : VLDQWBregisterPseudo<IIC_VLD2dupu>;
1457 // VLD3DUP : Vector Load (single 3-element structure to all lanes)
1458 class VLD3DUP<bits<4> op7_4, string Dt>
1459 : NLdSt<1, 0b10, 0b1110, op7_4, (outs DPR:$Vd, DPR:$dst2, DPR:$dst3),
1460 (ins addrmode6dup:$Rn), IIC_VLD3dup,
1461 "vld3", Dt, "\\{$Vd[], $dst2[], $dst3[]\\}, $Rn", "", []> {
1464 let DecoderMethod = "DecodeVLD3DupInstruction";
1467 def VLD3DUPd8 : VLD3DUP<{0,0,0,?}, "8">;
1468 def VLD3DUPd16 : VLD3DUP<{0,1,0,?}, "16">;
1469 def VLD3DUPd32 : VLD3DUP<{1,0,0,?}, "32">;
1471 def VLD3DUPd8Pseudo : VLDQQPseudo<IIC_VLD3dup>;
1472 def VLD3DUPd16Pseudo : VLDQQPseudo<IIC_VLD3dup>;
1473 def VLD3DUPd32Pseudo : VLDQQPseudo<IIC_VLD3dup>;
1475 // ...with double-spaced registers (not used for codegen):
1476 def VLD3DUPq8 : VLD3DUP<{0,0,1,?}, "8">;
1477 def VLD3DUPq16 : VLD3DUP<{0,1,1,?}, "16">;
1478 def VLD3DUPq32 : VLD3DUP<{1,0,1,?}, "32">;
1480 // ...with address register writeback:
1481 class VLD3DUPWB<bits<4> op7_4, string Dt>
1482 : NLdSt<1, 0b10, 0b1110, op7_4, (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, GPR:$wb),
1483 (ins addrmode6dup:$Rn, am6offset:$Rm), IIC_VLD3dupu,
1484 "vld3", Dt, "\\{$Vd[], $dst2[], $dst3[]\\}, $Rn$Rm",
1485 "$Rn.addr = $wb", []> {
1487 let DecoderMethod = "DecodeVLD3DupInstruction";
1490 def VLD3DUPd8_UPD : VLD3DUPWB<{0,0,0,0}, "8">;
1491 def VLD3DUPd16_UPD : VLD3DUPWB<{0,1,0,?}, "16">;
1492 def VLD3DUPd32_UPD : VLD3DUPWB<{1,0,0,?}, "32">;
1494 def VLD3DUPq8_UPD : VLD3DUPWB<{0,0,1,0}, "8">;
1495 def VLD3DUPq16_UPD : VLD3DUPWB<{0,1,1,?}, "16">;
1496 def VLD3DUPq32_UPD : VLD3DUPWB<{1,0,1,?}, "32">;
1498 def VLD3DUPd8Pseudo_UPD : VLDQQWBPseudo<IIC_VLD3dupu>;
1499 def VLD3DUPd16Pseudo_UPD : VLDQQWBPseudo<IIC_VLD3dupu>;
1500 def VLD3DUPd32Pseudo_UPD : VLDQQWBPseudo<IIC_VLD3dupu>;
1502 // VLD4DUP : Vector Load (single 4-element structure to all lanes)
1503 class VLD4DUP<bits<4> op7_4, string Dt>
1504 : NLdSt<1, 0b10, 0b1111, op7_4,
1505 (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, DPR:$dst4),
1506 (ins addrmode6dup:$Rn), IIC_VLD4dup,
1507 "vld4", Dt, "\\{$Vd[], $dst2[], $dst3[], $dst4[]\\}, $Rn", "", []> {
1509 let Inst{4} = Rn{4};
1510 let DecoderMethod = "DecodeVLD4DupInstruction";
1513 def VLD4DUPd8 : VLD4DUP<{0,0,0,?}, "8">;
1514 def VLD4DUPd16 : VLD4DUP<{0,1,0,?}, "16">;
1515 def VLD4DUPd32 : VLD4DUP<{1,?,0,?}, "32"> { let Inst{6} = Rn{5}; }
1517 def VLD4DUPd8Pseudo : VLDQQPseudo<IIC_VLD4dup>;
1518 def VLD4DUPd16Pseudo : VLDQQPseudo<IIC_VLD4dup>;
1519 def VLD4DUPd32Pseudo : VLDQQPseudo<IIC_VLD4dup>;
1521 // ...with double-spaced registers (not used for codegen):
1522 def VLD4DUPq8 : VLD4DUP<{0,0,1,?}, "8">;
1523 def VLD4DUPq16 : VLD4DUP<{0,1,1,?}, "16">;
1524 def VLD4DUPq32 : VLD4DUP<{1,?,1,?}, "32"> { let Inst{6} = Rn{5}; }
1526 // ...with address register writeback:
1527 class VLD4DUPWB<bits<4> op7_4, string Dt>
1528 : NLdSt<1, 0b10, 0b1111, op7_4,
1529 (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, DPR:$dst4, GPR:$wb),
1530 (ins addrmode6dup:$Rn, am6offset:$Rm), IIC_VLD4dupu,
1531 "vld4", Dt, "\\{$Vd[], $dst2[], $dst3[], $dst4[]\\}, $Rn$Rm",
1532 "$Rn.addr = $wb", []> {
1533 let Inst{4} = Rn{4};
1534 let DecoderMethod = "DecodeVLD4DupInstruction";
1537 def VLD4DUPd8_UPD : VLD4DUPWB<{0,0,0,0}, "8">;
1538 def VLD4DUPd16_UPD : VLD4DUPWB<{0,1,0,?}, "16">;
1539 def VLD4DUPd32_UPD : VLD4DUPWB<{1,?,0,?}, "32"> { let Inst{6} = Rn{5}; }
1541 def VLD4DUPq8_UPD : VLD4DUPWB<{0,0,1,0}, "8">;
1542 def VLD4DUPq16_UPD : VLD4DUPWB<{0,1,1,?}, "16">;
1543 def VLD4DUPq32_UPD : VLD4DUPWB<{1,?,1,?}, "32"> { let Inst{6} = Rn{5}; }
1545 def VLD4DUPd8Pseudo_UPD : VLDQQWBPseudo<IIC_VLD4dupu>;
1546 def VLD4DUPd16Pseudo_UPD : VLDQQWBPseudo<IIC_VLD4dupu>;
1547 def VLD4DUPd32Pseudo_UPD : VLDQQWBPseudo<IIC_VLD4dupu>;
1549 } // mayLoad = 1, neverHasSideEffects = 1, hasExtraDefRegAllocReq = 1
1551 let mayStore = 1, neverHasSideEffects = 1, hasExtraSrcRegAllocReq = 1 in {
1553 // Classes for VST* pseudo-instructions with multi-register operands.
1554 // These are expanded to real instructions after register allocation.
1555 class VSTQPseudo<InstrItinClass itin>
1556 : PseudoNLdSt<(outs), (ins addrmode6:$addr, QPR:$src), itin, "">;
1557 class VSTQWBPseudo<InstrItinClass itin>
1558 : PseudoNLdSt<(outs GPR:$wb),
1559 (ins addrmode6:$addr, am6offset:$offset, QPR:$src), itin,
1560 "$addr.addr = $wb">;
1561 class VSTQWBfixedPseudo<InstrItinClass itin>
1562 : PseudoNLdSt<(outs GPR:$wb),
1563 (ins addrmode6:$addr, QPR:$src), itin,
1564 "$addr.addr = $wb">;
1565 class VSTQWBregisterPseudo<InstrItinClass itin>
1566 : PseudoNLdSt<(outs GPR:$wb),
1567 (ins addrmode6:$addr, rGPR:$offset, QPR:$src), itin,
1568 "$addr.addr = $wb">;
1569 class VSTQQPseudo<InstrItinClass itin>
1570 : PseudoNLdSt<(outs), (ins addrmode6:$addr, QQPR:$src), itin, "">;
1571 class VSTQQWBPseudo<InstrItinClass itin>
1572 : PseudoNLdSt<(outs GPR:$wb),
1573 (ins addrmode6:$addr, am6offset:$offset, QQPR:$src), itin,
1574 "$addr.addr = $wb">;
1575 class VSTQQWBfixedPseudo<InstrItinClass itin>
1576 : PseudoNLdSt<(outs GPR:$wb),
1577 (ins addrmode6:$addr, QQPR:$src), itin,
1578 "$addr.addr = $wb">;
1579 class VSTQQWBregisterPseudo<InstrItinClass itin>
1580 : PseudoNLdSt<(outs GPR:$wb),
1581 (ins addrmode6:$addr, rGPR:$offset, QQPR:$src), itin,
1582 "$addr.addr = $wb">;
1584 class VSTQQQQPseudo<InstrItinClass itin>
1585 : PseudoNLdSt<(outs), (ins addrmode6:$addr, QQQQPR:$src), itin, "">;
1586 class VSTQQQQWBPseudo<InstrItinClass itin>
1587 : PseudoNLdSt<(outs GPR:$wb),
1588 (ins addrmode6:$addr, am6offset:$offset, QQQQPR:$src), itin,
1589 "$addr.addr = $wb">;
1591 // VST1 : Vector Store (multiple single elements)
1592 class VST1D<bits<4> op7_4, string Dt>
1593 : NLdSt<0,0b00,0b0111,op7_4, (outs), (ins addrmode6:$Rn, VecListOneD:$Vd),
1594 IIC_VST1, "vst1", Dt, "$Vd, $Rn", "", []> {
1596 let Inst{4} = Rn{4};
1597 let DecoderMethod = "DecodeVSTInstruction";
1599 class VST1Q<bits<4> op7_4, string Dt>
1600 : NLdSt<0,0b00,0b1010,op7_4, (outs), (ins addrmode6:$Rn, VecListTwoD:$Vd),
1601 IIC_VST1x2, "vst1", Dt, "$Vd, $Rn", "", []> {
1603 let Inst{5-4} = Rn{5-4};
1604 let DecoderMethod = "DecodeVSTInstruction";
1607 def VST1d8 : VST1D<{0,0,0,?}, "8">;
1608 def VST1d16 : VST1D<{0,1,0,?}, "16">;
1609 def VST1d32 : VST1D<{1,0,0,?}, "32">;
1610 def VST1d64 : VST1D<{1,1,0,?}, "64">;
1612 def VST1q8 : VST1Q<{0,0,?,?}, "8">;
1613 def VST1q16 : VST1Q<{0,1,?,?}, "16">;
1614 def VST1q32 : VST1Q<{1,0,?,?}, "32">;
1615 def VST1q64 : VST1Q<{1,1,?,?}, "64">;
1617 def VST1q8Pseudo : VSTQPseudo<IIC_VST1x2>;
1618 def VST1q16Pseudo : VSTQPseudo<IIC_VST1x2>;
1619 def VST1q32Pseudo : VSTQPseudo<IIC_VST1x2>;
1620 def VST1q64Pseudo : VSTQPseudo<IIC_VST1x2>;
1622 // ...with address register writeback:
1623 multiclass VST1DWB<bits<4> op7_4, string Dt> {
1624 def _fixed : NLdSt<0,0b00, 0b0111,op7_4, (outs GPR:$wb),
1625 (ins addrmode6:$Rn, VecListOneD:$Vd), IIC_VLD1u,
1626 "vst1", Dt, "$Vd, $Rn!",
1627 "$Rn.addr = $wb", []> {
1628 let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
1629 let Inst{4} = Rn{4};
1630 let DecoderMethod = "DecodeVSTInstruction";
1631 let AsmMatchConverter = "cvtVSTwbFixed";
1633 def _register : NLdSt<0,0b00,0b0111,op7_4, (outs GPR:$wb),
1634 (ins addrmode6:$Rn, rGPR:$Rm, VecListOneD:$Vd),
1636 "vst1", Dt, "$Vd, $Rn, $Rm",
1637 "$Rn.addr = $wb", []> {
1638 let Inst{4} = Rn{4};
1639 let DecoderMethod = "DecodeVSTInstruction";
1640 let AsmMatchConverter = "cvtVSTwbRegister";
1643 multiclass VST1QWB<bits<4> op7_4, string Dt> {
1644 def _fixed : NLdSt<0,0b00,0b1010,op7_4, (outs GPR:$wb),
1645 (ins addrmode6:$Rn, VecListTwoD:$Vd), IIC_VLD1x2u,
1646 "vst1", Dt, "$Vd, $Rn!",
1647 "$Rn.addr = $wb", []> {
1648 let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
1649 let Inst{5-4} = Rn{5-4};
1650 let DecoderMethod = "DecodeVSTInstruction";
1651 let AsmMatchConverter = "cvtVSTwbFixed";
1653 def _register : NLdSt<0,0b00,0b1010,op7_4, (outs GPR:$wb),
1654 (ins addrmode6:$Rn, rGPR:$Rm, VecListTwoD:$Vd),
1656 "vst1", Dt, "$Vd, $Rn, $Rm",
1657 "$Rn.addr = $wb", []> {
1658 let Inst{5-4} = Rn{5-4};
1659 let DecoderMethod = "DecodeVSTInstruction";
1660 let AsmMatchConverter = "cvtVSTwbRegister";
1664 defm VST1d8wb : VST1DWB<{0,0,0,?}, "8">;
1665 defm VST1d16wb : VST1DWB<{0,1,0,?}, "16">;
1666 defm VST1d32wb : VST1DWB<{1,0,0,?}, "32">;
1667 defm VST1d64wb : VST1DWB<{1,1,0,?}, "64">;
1669 defm VST1q8wb : VST1QWB<{0,0,?,?}, "8">;
1670 defm VST1q16wb : VST1QWB<{0,1,?,?}, "16">;
1671 defm VST1q32wb : VST1QWB<{1,0,?,?}, "32">;
1672 defm VST1q64wb : VST1QWB<{1,1,?,?}, "64">;
1674 def VST1q8PseudoWB_fixed : VSTQWBfixedPseudo<IIC_VST1x2u>;
1675 def VST1q16PseudoWB_fixed : VSTQWBfixedPseudo<IIC_VST1x2u>;
1676 def VST1q32PseudoWB_fixed : VSTQWBfixedPseudo<IIC_VST1x2u>;
1677 def VST1q64PseudoWB_fixed : VSTQWBfixedPseudo<IIC_VST1x2u>;
1678 def VST1q8PseudoWB_register : VSTQWBregisterPseudo<IIC_VST1x2u>;
1679 def VST1q16PseudoWB_register : VSTQWBregisterPseudo<IIC_VST1x2u>;
1680 def VST1q32PseudoWB_register : VSTQWBregisterPseudo<IIC_VST1x2u>;
1681 def VST1q64PseudoWB_register : VSTQWBregisterPseudo<IIC_VST1x2u>;
1683 // ...with 3 registers
1684 class VST1D3<bits<4> op7_4, string Dt>
1685 : NLdSt<0, 0b00, 0b0110, op7_4, (outs),
1686 (ins addrmode6:$Rn, VecListThreeD:$Vd),
1687 IIC_VST1x3, "vst1", Dt, "$Vd, $Rn", "", []> {
1689 let Inst{4} = Rn{4};
1690 let DecoderMethod = "DecodeVSTInstruction";
1692 multiclass VST1D3WB<bits<4> op7_4, string Dt> {
1693 def _fixed : NLdSt<0,0b00,0b0110,op7_4, (outs GPR:$wb),
1694 (ins addrmode6:$Rn, VecListThreeD:$Vd), IIC_VLD1x3u,
1695 "vst1", Dt, "$Vd, $Rn!",
1696 "$Rn.addr = $wb", []> {
1697 let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
1698 let Inst{5-4} = Rn{5-4};
1699 let DecoderMethod = "DecodeVSTInstruction";
1700 let AsmMatchConverter = "cvtVSTwbFixed";
1702 def _register : NLdSt<0,0b00,0b0110,op7_4, (outs GPR:$wb),
1703 (ins addrmode6:$Rn, rGPR:$Rm, VecListThreeD:$Vd),
1705 "vst1", Dt, "$Vd, $Rn, $Rm",
1706 "$Rn.addr = $wb", []> {
1707 let Inst{5-4} = Rn{5-4};
1708 let DecoderMethod = "DecodeVSTInstruction";
1709 let AsmMatchConverter = "cvtVSTwbRegister";
1713 def VST1d8T : VST1D3<{0,0,0,?}, "8">;
1714 def VST1d16T : VST1D3<{0,1,0,?}, "16">;
1715 def VST1d32T : VST1D3<{1,0,0,?}, "32">;
1716 def VST1d64T : VST1D3<{1,1,0,?}, "64">;
1718 defm VST1d8Twb : VST1D3WB<{0,0,0,?}, "8">;
1719 defm VST1d16Twb : VST1D3WB<{0,1,0,?}, "16">;
1720 defm VST1d32Twb : VST1D3WB<{1,0,0,?}, "32">;
1721 defm VST1d64Twb : VST1D3WB<{1,1,0,?}, "64">;
1723 def VST1d64TPseudo : VSTQQPseudo<IIC_VST1x3>;
1724 def VST1d64TPseudoWB_fixed : VSTQQWBPseudo<IIC_VST1x3u>;
1725 def VST1d64TPseudoWB_register : VSTQQWBPseudo<IIC_VST1x3u>;
1727 // ...with 4 registers
1728 class VST1D4<bits<4> op7_4, string Dt>
1729 : NLdSt<0, 0b00, 0b0010, op7_4, (outs),
1730 (ins addrmode6:$Rn, VecListFourD:$Vd),
1731 IIC_VST1x4, "vst1", Dt, "$Vd, $Rn", "",
1734 let Inst{5-4} = Rn{5-4};
1735 let DecoderMethod = "DecodeVSTInstruction";
1737 multiclass VST1D4WB<bits<4> op7_4, string Dt> {
1738 def _fixed : NLdSt<0,0b00,0b0010,op7_4, (outs GPR:$wb),
1739 (ins addrmode6:$Rn, VecListFourD:$Vd), IIC_VLD1x4u,
1740 "vst1", Dt, "$Vd, $Rn!",
1741 "$Rn.addr = $wb", []> {
1742 let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
1743 let Inst{5-4} = Rn{5-4};
1744 let DecoderMethod = "DecodeVSTInstruction";
1745 let AsmMatchConverter = "cvtVSTwbFixed";
1747 def _register : NLdSt<0,0b00,0b0010,op7_4, (outs GPR:$wb),
1748 (ins addrmode6:$Rn, rGPR:$Rm, VecListFourD:$Vd),
1750 "vst1", Dt, "$Vd, $Rn, $Rm",
1751 "$Rn.addr = $wb", []> {
1752 let Inst{5-4} = Rn{5-4};
1753 let DecoderMethod = "DecodeVSTInstruction";
1754 let AsmMatchConverter = "cvtVSTwbRegister";
1758 def VST1d8Q : VST1D4<{0,0,?,?}, "8">;
1759 def VST1d16Q : VST1D4<{0,1,?,?}, "16">;
1760 def VST1d32Q : VST1D4<{1,0,?,?}, "32">;
1761 def VST1d64Q : VST1D4<{1,1,?,?}, "64">;
1763 defm VST1d8Qwb : VST1D4WB<{0,0,?,?}, "8">;
1764 defm VST1d16Qwb : VST1D4WB<{0,1,?,?}, "16">;
1765 defm VST1d32Qwb : VST1D4WB<{1,0,?,?}, "32">;
1766 defm VST1d64Qwb : VST1D4WB<{1,1,?,?}, "64">;
1768 def VST1d64QPseudo : VSTQQPseudo<IIC_VST1x4>;
1769 def VST1d64QPseudoWB_fixed : VSTQQWBPseudo<IIC_VST1x4u>;
1770 def VST1d64QPseudoWB_register : VSTQQWBPseudo<IIC_VST1x4u>;
1772 // VST2 : Vector Store (multiple 2-element structures)
1773 class VST2<bits<4> op11_8, bits<4> op7_4, string Dt, RegisterOperand VdTy,
1774 InstrItinClass itin>
1775 : NLdSt<0, 0b00, op11_8, op7_4, (outs), (ins addrmode6:$Rn, VdTy:$Vd),
1776 itin, "vst2", Dt, "$Vd, $Rn", "", []> {
1778 let Inst{5-4} = Rn{5-4};
1779 let DecoderMethod = "DecodeVSTInstruction";
1782 def VST2d8 : VST2<0b1000, {0,0,?,?}, "8", VecListTwoD, IIC_VST2>;
1783 def VST2d16 : VST2<0b1000, {0,1,?,?}, "16", VecListTwoD, IIC_VST2>;
1784 def VST2d32 : VST2<0b1000, {1,0,?,?}, "32", VecListTwoD, IIC_VST2>;
1786 def VST2q8 : VST2<0b0011, {0,0,?,?}, "8", VecListFourD, IIC_VST2x2>;
1787 def VST2q16 : VST2<0b0011, {0,1,?,?}, "16", VecListFourD, IIC_VST2x2>;
1788 def VST2q32 : VST2<0b0011, {1,0,?,?}, "32", VecListFourD, IIC_VST2x2>;
1790 def VST2d8Pseudo : VSTQPseudo<IIC_VST2>;
1791 def VST2d16Pseudo : VSTQPseudo<IIC_VST2>;
1792 def VST2d32Pseudo : VSTQPseudo<IIC_VST2>;
1794 def VST2q8Pseudo : VSTQQPseudo<IIC_VST2x2>;
1795 def VST2q16Pseudo : VSTQQPseudo<IIC_VST2x2>;
1796 def VST2q32Pseudo : VSTQQPseudo<IIC_VST2x2>;
1798 // ...with address register writeback:
1799 multiclass VST2DWB<bits<4> op11_8, bits<4> op7_4, string Dt,
1800 RegisterOperand VdTy> {
1801 def _fixed : NLdSt<0, 0b00, op11_8, op7_4, (outs GPR:$wb),
1802 (ins addrmode6:$Rn, VdTy:$Vd), IIC_VLD1u,
1803 "vst2", Dt, "$Vd, $Rn!",
1804 "$Rn.addr = $wb", []> {
1805 let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
1806 let Inst{5-4} = Rn{5-4};
1807 let DecoderMethod = "DecodeVSTInstruction";
1808 let AsmMatchConverter = "cvtVSTwbFixed";
1810 def _register : NLdSt<0, 0b00, op11_8, op7_4, (outs GPR:$wb),
1811 (ins addrmode6:$Rn, rGPR:$Rm, VdTy:$Vd), IIC_VLD1u,
1812 "vst2", Dt, "$Vd, $Rn, $Rm",
1813 "$Rn.addr = $wb", []> {
1814 let Inst{5-4} = Rn{5-4};
1815 let DecoderMethod = "DecodeVSTInstruction";
1816 let AsmMatchConverter = "cvtVSTwbRegister";
1819 multiclass VST2QWB<bits<4> op7_4, string Dt> {
1820 def _fixed : NLdSt<0, 0b00, 0b0011, op7_4, (outs GPR:$wb),
1821 (ins addrmode6:$Rn, VecListFourD:$Vd), IIC_VLD1u,
1822 "vst2", Dt, "$Vd, $Rn!",
1823 "$Rn.addr = $wb", []> {
1824 let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
1825 let Inst{5-4} = Rn{5-4};
1826 let DecoderMethod = "DecodeVSTInstruction";
1827 let AsmMatchConverter = "cvtVSTwbFixed";
1829 def _register : NLdSt<0, 0b00, 0b0011, op7_4, (outs GPR:$wb),
1830 (ins addrmode6:$Rn, rGPR:$Rm, VecListFourD:$Vd),
1832 "vst2", Dt, "$Vd, $Rn, $Rm",
1833 "$Rn.addr = $wb", []> {
1834 let Inst{5-4} = Rn{5-4};
1835 let DecoderMethod = "DecodeVSTInstruction";
1836 let AsmMatchConverter = "cvtVSTwbRegister";
1840 defm VST2d8wb : VST2DWB<0b1000, {0,0,?,?}, "8", VecListTwoD>;
1841 defm VST2d16wb : VST2DWB<0b1000, {0,1,?,?}, "16", VecListTwoD>;
1842 defm VST2d32wb : VST2DWB<0b1000, {1,0,?,?}, "32", VecListTwoD>;
1844 defm VST2q8wb : VST2QWB<{0,0,?,?}, "8">;
1845 defm VST2q16wb : VST2QWB<{0,1,?,?}, "16">;
1846 defm VST2q32wb : VST2QWB<{1,0,?,?}, "32">;
1848 def VST2d8PseudoWB_fixed : VSTQWBfixedPseudo<IIC_VST2u>;
1849 def VST2d16PseudoWB_fixed : VSTQWBfixedPseudo<IIC_VST2u>;
1850 def VST2d32PseudoWB_fixed : VSTQWBfixedPseudo<IIC_VST2u>;
1851 def VST2d8PseudoWB_register : VSTQWBregisterPseudo<IIC_VST2u>;
1852 def VST2d16PseudoWB_register : VSTQWBregisterPseudo<IIC_VST2u>;
1853 def VST2d32PseudoWB_register : VSTQWBregisterPseudo<IIC_VST2u>;
1855 def VST2q8PseudoWB_fixed : VSTQQWBfixedPseudo<IIC_VST2x2u>;
1856 def VST2q16PseudoWB_fixed : VSTQQWBfixedPseudo<IIC_VST2x2u>;
1857 def VST2q32PseudoWB_fixed : VSTQQWBfixedPseudo<IIC_VST2x2u>;
1858 def VST2q8PseudoWB_register : VSTQQWBregisterPseudo<IIC_VST2x2u>;
1859 def VST2q16PseudoWB_register : VSTQQWBregisterPseudo<IIC_VST2x2u>;
1860 def VST2q32PseudoWB_register : VSTQQWBregisterPseudo<IIC_VST2x2u>;
1862 // ...with double-spaced registers
1863 def VST2b8 : VST2<0b1001, {0,0,?,?}, "8", VecListTwoQ, IIC_VST2>;
1864 def VST2b16 : VST2<0b1001, {0,1,?,?}, "16", VecListTwoQ, IIC_VST2>;
1865 def VST2b32 : VST2<0b1001, {1,0,?,?}, "32", VecListTwoQ, IIC_VST2>;
1866 defm VST2b8wb : VST2DWB<0b1001, {0,0,?,?}, "8", VecListTwoQ>;
1867 defm VST2b16wb : VST2DWB<0b1001, {0,1,?,?}, "16", VecListTwoQ>;
1868 defm VST2b32wb : VST2DWB<0b1001, {1,0,?,?}, "32", VecListTwoQ>;
1870 // VST3 : Vector Store (multiple 3-element structures)
1871 class VST3D<bits<4> op11_8, bits<4> op7_4, string Dt>
1872 : NLdSt<0, 0b00, op11_8, op7_4, (outs),
1873 (ins addrmode6:$Rn, DPR:$Vd, DPR:$src2, DPR:$src3), IIC_VST3,
1874 "vst3", Dt, "\\{$Vd, $src2, $src3\\}, $Rn", "", []> {
1876 let Inst{4} = Rn{4};
1877 let DecoderMethod = "DecodeVSTInstruction";
1880 def VST3d8 : VST3D<0b0100, {0,0,0,?}, "8">;
1881 def VST3d16 : VST3D<0b0100, {0,1,0,?}, "16">;
1882 def VST3d32 : VST3D<0b0100, {1,0,0,?}, "32">;
1884 def VST3d8Pseudo : VSTQQPseudo<IIC_VST3>;
1885 def VST3d16Pseudo : VSTQQPseudo<IIC_VST3>;
1886 def VST3d32Pseudo : VSTQQPseudo<IIC_VST3>;
1888 // ...with address register writeback:
1889 class VST3DWB<bits<4> op11_8, bits<4> op7_4, string Dt>
1890 : NLdSt<0, 0b00, op11_8, op7_4, (outs GPR:$wb),
1891 (ins addrmode6:$Rn, am6offset:$Rm,
1892 DPR:$Vd, DPR:$src2, DPR:$src3), IIC_VST3u,
1893 "vst3", Dt, "\\{$Vd, $src2, $src3\\}, $Rn$Rm",
1894 "$Rn.addr = $wb", []> {
1895 let Inst{4} = Rn{4};
1896 let DecoderMethod = "DecodeVSTInstruction";
1899 def VST3d8_UPD : VST3DWB<0b0100, {0,0,0,?}, "8">;
1900 def VST3d16_UPD : VST3DWB<0b0100, {0,1,0,?}, "16">;
1901 def VST3d32_UPD : VST3DWB<0b0100, {1,0,0,?}, "32">;
1903 def VST3d8Pseudo_UPD : VSTQQWBPseudo<IIC_VST3u>;
1904 def VST3d16Pseudo_UPD : VSTQQWBPseudo<IIC_VST3u>;
1905 def VST3d32Pseudo_UPD : VSTQQWBPseudo<IIC_VST3u>;
1907 // ...with double-spaced registers:
1908 def VST3q8 : VST3D<0b0101, {0,0,0,?}, "8">;
1909 def VST3q16 : VST3D<0b0101, {0,1,0,?}, "16">;
1910 def VST3q32 : VST3D<0b0101, {1,0,0,?}, "32">;
1911 def VST3q8_UPD : VST3DWB<0b0101, {0,0,0,?}, "8">;
1912 def VST3q16_UPD : VST3DWB<0b0101, {0,1,0,?}, "16">;
1913 def VST3q32_UPD : VST3DWB<0b0101, {1,0,0,?}, "32">;
1915 def VST3q8Pseudo_UPD : VSTQQQQWBPseudo<IIC_VST3u>;
1916 def VST3q16Pseudo_UPD : VSTQQQQWBPseudo<IIC_VST3u>;
1917 def VST3q32Pseudo_UPD : VSTQQQQWBPseudo<IIC_VST3u>;
1919 // ...alternate versions to be allocated odd register numbers:
1920 def VST3q8oddPseudo : VSTQQQQPseudo<IIC_VST3>;
1921 def VST3q16oddPseudo : VSTQQQQPseudo<IIC_VST3>;
1922 def VST3q32oddPseudo : VSTQQQQPseudo<IIC_VST3>;
1924 def VST3q8oddPseudo_UPD : VSTQQQQWBPseudo<IIC_VST3u>;
1925 def VST3q16oddPseudo_UPD : VSTQQQQWBPseudo<IIC_VST3u>;
1926 def VST3q32oddPseudo_UPD : VSTQQQQWBPseudo<IIC_VST3u>;
1928 // VST4 : Vector Store (multiple 4-element structures)
1929 class VST4D<bits<4> op11_8, bits<4> op7_4, string Dt>
1930 : NLdSt<0, 0b00, op11_8, op7_4, (outs),
1931 (ins addrmode6:$Rn, DPR:$Vd, DPR:$src2, DPR:$src3, DPR:$src4),
1932 IIC_VST4, "vst4", Dt, "\\{$Vd, $src2, $src3, $src4\\}, $Rn",
1935 let Inst{5-4} = Rn{5-4};
1936 let DecoderMethod = "DecodeVSTInstruction";
1939 def VST4d8 : VST4D<0b0000, {0,0,?,?}, "8">;
1940 def VST4d16 : VST4D<0b0000, {0,1,?,?}, "16">;
1941 def VST4d32 : VST4D<0b0000, {1,0,?,?}, "32">;
1943 def VST4d8Pseudo : VSTQQPseudo<IIC_VST4>;
1944 def VST4d16Pseudo : VSTQQPseudo<IIC_VST4>;
1945 def VST4d32Pseudo : VSTQQPseudo<IIC_VST4>;
1947 // ...with address register writeback:
1948 class VST4DWB<bits<4> op11_8, bits<4> op7_4, string Dt>
1949 : NLdSt<0, 0b00, op11_8, op7_4, (outs GPR:$wb),
1950 (ins addrmode6:$Rn, am6offset:$Rm,
1951 DPR:$Vd, DPR:$src2, DPR:$src3, DPR:$src4), IIC_VST4u,
1952 "vst4", Dt, "\\{$Vd, $src2, $src3, $src4\\}, $Rn$Rm",
1953 "$Rn.addr = $wb", []> {
1954 let Inst{5-4} = Rn{5-4};
1955 let DecoderMethod = "DecodeVSTInstruction";
1958 def VST4d8_UPD : VST4DWB<0b0000, {0,0,?,?}, "8">;
1959 def VST4d16_UPD : VST4DWB<0b0000, {0,1,?,?}, "16">;
1960 def VST4d32_UPD : VST4DWB<0b0000, {1,0,?,?}, "32">;
1962 def VST4d8Pseudo_UPD : VSTQQWBPseudo<IIC_VST4u>;
1963 def VST4d16Pseudo_UPD : VSTQQWBPseudo<IIC_VST4u>;
1964 def VST4d32Pseudo_UPD : VSTQQWBPseudo<IIC_VST4u>;
1966 // ...with double-spaced registers:
1967 def VST4q8 : VST4D<0b0001, {0,0,?,?}, "8">;
1968 def VST4q16 : VST4D<0b0001, {0,1,?,?}, "16">;
1969 def VST4q32 : VST4D<0b0001, {1,0,?,?}, "32">;
1970 def VST4q8_UPD : VST4DWB<0b0001, {0,0,?,?}, "8">;
1971 def VST4q16_UPD : VST4DWB<0b0001, {0,1,?,?}, "16">;
1972 def VST4q32_UPD : VST4DWB<0b0001, {1,0,?,?}, "32">;
1974 def VST4q8Pseudo_UPD : VSTQQQQWBPseudo<IIC_VST4u>;
1975 def VST4q16Pseudo_UPD : VSTQQQQWBPseudo<IIC_VST4u>;
1976 def VST4q32Pseudo_UPD : VSTQQQQWBPseudo<IIC_VST4u>;
1978 // ...alternate versions to be allocated odd register numbers:
1979 def VST4q8oddPseudo : VSTQQQQPseudo<IIC_VST4>;
1980 def VST4q16oddPseudo : VSTQQQQPseudo<IIC_VST4>;
1981 def VST4q32oddPseudo : VSTQQQQPseudo<IIC_VST4>;
1983 def VST4q8oddPseudo_UPD : VSTQQQQWBPseudo<IIC_VST4u>;
1984 def VST4q16oddPseudo_UPD : VSTQQQQWBPseudo<IIC_VST4u>;
1985 def VST4q32oddPseudo_UPD : VSTQQQQWBPseudo<IIC_VST4u>;
1987 } // mayStore = 1, neverHasSideEffects = 1, hasExtraSrcRegAllocReq = 1
1989 // Classes for VST*LN pseudo-instructions with multi-register operands.
1990 // These are expanded to real instructions after register allocation.
1991 class VSTQLNPseudo<InstrItinClass itin>
1992 : PseudoNLdSt<(outs), (ins addrmode6:$addr, QPR:$src, nohash_imm:$lane),
1994 class VSTQLNWBPseudo<InstrItinClass itin>
1995 : PseudoNLdSt<(outs GPR:$wb),
1996 (ins addrmode6:$addr, am6offset:$offset, QPR:$src,
1997 nohash_imm:$lane), itin, "$addr.addr = $wb">;
1998 class VSTQQLNPseudo<InstrItinClass itin>
1999 : PseudoNLdSt<(outs), (ins addrmode6:$addr, QQPR:$src, nohash_imm:$lane),
2001 class VSTQQLNWBPseudo<InstrItinClass itin>
2002 : PseudoNLdSt<(outs GPR:$wb),
2003 (ins addrmode6:$addr, am6offset:$offset, QQPR:$src,
2004 nohash_imm:$lane), itin, "$addr.addr = $wb">;
2005 class VSTQQQQLNPseudo<InstrItinClass itin>
2006 : PseudoNLdSt<(outs), (ins addrmode6:$addr, QQQQPR:$src, nohash_imm:$lane),
2008 class VSTQQQQLNWBPseudo<InstrItinClass itin>
2009 : PseudoNLdSt<(outs GPR:$wb),
2010 (ins addrmode6:$addr, am6offset:$offset, QQQQPR:$src,
2011 nohash_imm:$lane), itin, "$addr.addr = $wb">;
2013 // VST1LN : Vector Store (single element from one lane)
2014 class VST1LN<bits<4> op11_8, bits<4> op7_4, string Dt, ValueType Ty,
2015 PatFrag StoreOp, SDNode ExtractOp>
2016 : NLdStLn<1, 0b00, op11_8, op7_4, (outs),
2017 (ins addrmode6:$Rn, DPR:$Vd, nohash_imm:$lane),
2018 IIC_VST1ln, "vst1", Dt, "\\{$Vd[$lane]\\}, $Rn", "",
2019 [(StoreOp (ExtractOp (Ty DPR:$Vd), imm:$lane), addrmode6:$Rn)]> {
2021 let DecoderMethod = "DecodeVST1LN";
2023 class VST1LN32<bits<4> op11_8, bits<4> op7_4, string Dt, ValueType Ty,
2024 PatFrag StoreOp, SDNode ExtractOp>
2025 : NLdStLn<1, 0b00, op11_8, op7_4, (outs),
2026 (ins addrmode6oneL32:$Rn, DPR:$Vd, nohash_imm:$lane),
2027 IIC_VST1ln, "vst1", Dt, "\\{$Vd[$lane]\\}, $Rn", "",
2028 [(StoreOp (ExtractOp (Ty DPR:$Vd), imm:$lane), addrmode6oneL32:$Rn)]>{
2030 let DecoderMethod = "DecodeVST1LN";
2032 class VST1QLNPseudo<ValueType Ty, PatFrag StoreOp, SDNode ExtractOp>
2033 : VSTQLNPseudo<IIC_VST1ln> {
2034 let Pattern = [(StoreOp (ExtractOp (Ty QPR:$src), imm:$lane),
2038 def VST1LNd8 : VST1LN<0b0000, {?,?,?,0}, "8", v8i8, truncstorei8,
2040 let Inst{7-5} = lane{2-0};
2042 def VST1LNd16 : VST1LN<0b0100, {?,?,0,?}, "16", v4i16, truncstorei16,
2044 let Inst{7-6} = lane{1-0};
2045 let Inst{4} = Rn{5};
2048 def VST1LNd32 : VST1LN32<0b1000, {?,0,?,?}, "32", v2i32, store, extractelt> {
2049 let Inst{7} = lane{0};
2050 let Inst{5-4} = Rn{5-4};
2053 def VST1LNq8Pseudo : VST1QLNPseudo<v16i8, truncstorei8, NEONvgetlaneu>;
2054 def VST1LNq16Pseudo : VST1QLNPseudo<v8i16, truncstorei16, NEONvgetlaneu>;
2055 def VST1LNq32Pseudo : VST1QLNPseudo<v4i32, store, extractelt>;
2057 def : Pat<(store (extractelt (v2f32 DPR:$src), imm:$lane), addrmode6:$addr),
2058 (VST1LNd32 addrmode6:$addr, DPR:$src, imm:$lane)>;
2059 def : Pat<(store (extractelt (v4f32 QPR:$src), imm:$lane), addrmode6:$addr),
2060 (VST1LNq32Pseudo addrmode6:$addr, QPR:$src, imm:$lane)>;
2062 // ...with address register writeback:
2063 class VST1LNWB<bits<4> op11_8, bits<4> op7_4, string Dt, ValueType Ty,
2064 PatFrag StoreOp, SDNode ExtractOp>
2065 : NLdStLn<1, 0b00, op11_8, op7_4, (outs GPR:$wb),
2066 (ins addrmode6:$Rn, am6offset:$Rm,
2067 DPR:$Vd, nohash_imm:$lane), IIC_VST1lnu, "vst1", Dt,
2068 "\\{$Vd[$lane]\\}, $Rn$Rm",
2070 [(set GPR:$wb, (StoreOp (ExtractOp (Ty DPR:$Vd), imm:$lane),
2071 addrmode6:$Rn, am6offset:$Rm))]> {
2072 let DecoderMethod = "DecodeVST1LN";
2074 class VST1QLNWBPseudo<ValueType Ty, PatFrag StoreOp, SDNode ExtractOp>
2075 : VSTQLNWBPseudo<IIC_VST1lnu> {
2076 let Pattern = [(set GPR:$wb, (StoreOp (ExtractOp (Ty QPR:$src), imm:$lane),
2077 addrmode6:$addr, am6offset:$offset))];
2080 def VST1LNd8_UPD : VST1LNWB<0b0000, {?,?,?,0}, "8", v8i8, post_truncsti8,
2082 let Inst{7-5} = lane{2-0};
2084 def VST1LNd16_UPD : VST1LNWB<0b0100, {?,?,0,?}, "16", v4i16, post_truncsti16,
2086 let Inst{7-6} = lane{1-0};
2087 let Inst{4} = Rn{5};
2089 def VST1LNd32_UPD : VST1LNWB<0b1000, {?,0,?,?}, "32", v2i32, post_store,
2091 let Inst{7} = lane{0};
2092 let Inst{5-4} = Rn{5-4};
2095 def VST1LNq8Pseudo_UPD : VST1QLNWBPseudo<v16i8, post_truncsti8, NEONvgetlaneu>;
2096 def VST1LNq16Pseudo_UPD : VST1QLNWBPseudo<v8i16, post_truncsti16,NEONvgetlaneu>;
2097 def VST1LNq32Pseudo_UPD : VST1QLNWBPseudo<v4i32, post_store, extractelt>;
2099 let mayStore = 1, neverHasSideEffects = 1, hasExtraSrcRegAllocReq = 1 in {
2101 // VST2LN : Vector Store (single 2-element structure from one lane)
2102 class VST2LN<bits<4> op11_8, bits<4> op7_4, string Dt>
2103 : NLdStLn<1, 0b00, op11_8, op7_4, (outs),
2104 (ins addrmode6:$Rn, DPR:$Vd, DPR:$src2, nohash_imm:$lane),
2105 IIC_VST2ln, "vst2", Dt, "\\{$Vd[$lane], $src2[$lane]\\}, $Rn",
2108 let Inst{4} = Rn{4};
2109 let DecoderMethod = "DecodeVST2LN";
2112 def VST2LNd8 : VST2LN<0b0001, {?,?,?,?}, "8"> {
2113 let Inst{7-5} = lane{2-0};
2115 def VST2LNd16 : VST2LN<0b0101, {?,?,0,?}, "16"> {
2116 let Inst{7-6} = lane{1-0};
2118 def VST2LNd32 : VST2LN<0b1001, {?,0,0,?}, "32"> {
2119 let Inst{7} = lane{0};
2122 def VST2LNd8Pseudo : VSTQLNPseudo<IIC_VST2ln>;
2123 def VST2LNd16Pseudo : VSTQLNPseudo<IIC_VST2ln>;
2124 def VST2LNd32Pseudo : VSTQLNPseudo<IIC_VST2ln>;
2126 // ...with double-spaced registers:
2127 def VST2LNq16 : VST2LN<0b0101, {?,?,1,?}, "16"> {
2128 let Inst{7-6} = lane{1-0};
2129 let Inst{4} = Rn{4};
2131 def VST2LNq32 : VST2LN<0b1001, {?,1,0,?}, "32"> {
2132 let Inst{7} = lane{0};
2133 let Inst{4} = Rn{4};
2136 def VST2LNq16Pseudo : VSTQQLNPseudo<IIC_VST2ln>;
2137 def VST2LNq32Pseudo : VSTQQLNPseudo<IIC_VST2ln>;
2139 // ...with address register writeback:
2140 class VST2LNWB<bits<4> op11_8, bits<4> op7_4, string Dt>
2141 : NLdStLn<1, 0b00, op11_8, op7_4, (outs GPR:$wb),
2142 (ins addrmode6:$Rn, am6offset:$Rm,
2143 DPR:$Vd, DPR:$src2, nohash_imm:$lane), IIC_VST2lnu, "vst2", Dt,
2144 "\\{$Vd[$lane], $src2[$lane]\\}, $Rn$Rm",
2145 "$Rn.addr = $wb", []> {
2146 let Inst{4} = Rn{4};
2147 let DecoderMethod = "DecodeVST2LN";
2150 def VST2LNd8_UPD : VST2LNWB<0b0001, {?,?,?,?}, "8"> {
2151 let Inst{7-5} = lane{2-0};
2153 def VST2LNd16_UPD : VST2LNWB<0b0101, {?,?,0,?}, "16"> {
2154 let Inst{7-6} = lane{1-0};
2156 def VST2LNd32_UPD : VST2LNWB<0b1001, {?,0,0,?}, "32"> {
2157 let Inst{7} = lane{0};
2160 def VST2LNd8Pseudo_UPD : VSTQLNWBPseudo<IIC_VST2lnu>;
2161 def VST2LNd16Pseudo_UPD : VSTQLNWBPseudo<IIC_VST2lnu>;
2162 def VST2LNd32Pseudo_UPD : VSTQLNWBPseudo<IIC_VST2lnu>;
2164 def VST2LNq16_UPD : VST2LNWB<0b0101, {?,?,1,?}, "16"> {
2165 let Inst{7-6} = lane{1-0};
2167 def VST2LNq32_UPD : VST2LNWB<0b1001, {?,1,0,?}, "32"> {
2168 let Inst{7} = lane{0};
2171 def VST2LNq16Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST2lnu>;
2172 def VST2LNq32Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST2lnu>;
2174 // VST3LN : Vector Store (single 3-element structure from one lane)
2175 class VST3LN<bits<4> op11_8, bits<4> op7_4, string Dt>
2176 : NLdStLn<1, 0b00, op11_8, op7_4, (outs),
2177 (ins addrmode6:$Rn, DPR:$Vd, DPR:$src2, DPR:$src3,
2178 nohash_imm:$lane), IIC_VST3ln, "vst3", Dt,
2179 "\\{$Vd[$lane], $src2[$lane], $src3[$lane]\\}, $Rn", "", []> {
2181 let DecoderMethod = "DecodeVST3LN";
2184 def VST3LNd8 : VST3LN<0b0010, {?,?,?,0}, "8"> {
2185 let Inst{7-5} = lane{2-0};
2187 def VST3LNd16 : VST3LN<0b0110, {?,?,0,0}, "16"> {
2188 let Inst{7-6} = lane{1-0};
2190 def VST3LNd32 : VST3LN<0b1010, {?,0,0,0}, "32"> {
2191 let Inst{7} = lane{0};
2194 def VST3LNd8Pseudo : VSTQQLNPseudo<IIC_VST3ln>;
2195 def VST3LNd16Pseudo : VSTQQLNPseudo<IIC_VST3ln>;
2196 def VST3LNd32Pseudo : VSTQQLNPseudo<IIC_VST3ln>;
2198 // ...with double-spaced registers:
2199 def VST3LNq16 : VST3LN<0b0110, {?,?,1,0}, "16"> {
2200 let Inst{7-6} = lane{1-0};
2202 def VST3LNq32 : VST3LN<0b1010, {?,1,0,0}, "32"> {
2203 let Inst{7} = lane{0};
2206 def VST3LNq16Pseudo : VSTQQQQLNPseudo<IIC_VST3ln>;
2207 def VST3LNq32Pseudo : VSTQQQQLNPseudo<IIC_VST3ln>;
2209 // ...with address register writeback:
2210 class VST3LNWB<bits<4> op11_8, bits<4> op7_4, string Dt>
2211 : NLdStLn<1, 0b00, op11_8, op7_4, (outs GPR:$wb),
2212 (ins addrmode6:$Rn, am6offset:$Rm,
2213 DPR:$Vd, DPR:$src2, DPR:$src3, nohash_imm:$lane),
2214 IIC_VST3lnu, "vst3", Dt,
2215 "\\{$Vd[$lane], $src2[$lane], $src3[$lane]\\}, $Rn$Rm",
2216 "$Rn.addr = $wb", []> {
2217 let DecoderMethod = "DecodeVST3LN";
2220 def VST3LNd8_UPD : VST3LNWB<0b0010, {?,?,?,0}, "8"> {
2221 let Inst{7-5} = lane{2-0};
2223 def VST3LNd16_UPD : VST3LNWB<0b0110, {?,?,0,0}, "16"> {
2224 let Inst{7-6} = lane{1-0};
2226 def VST3LNd32_UPD : VST3LNWB<0b1010, {?,0,0,0}, "32"> {
2227 let Inst{7} = lane{0};
2230 def VST3LNd8Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST3lnu>;
2231 def VST3LNd16Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST3lnu>;
2232 def VST3LNd32Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST3lnu>;
2234 def VST3LNq16_UPD : VST3LNWB<0b0110, {?,?,1,0}, "16"> {
2235 let Inst{7-6} = lane{1-0};
2237 def VST3LNq32_UPD : VST3LNWB<0b1010, {?,1,0,0}, "32"> {
2238 let Inst{7} = lane{0};
2241 def VST3LNq16Pseudo_UPD : VSTQQQQLNWBPseudo<IIC_VST3lnu>;
2242 def VST3LNq32Pseudo_UPD : VSTQQQQLNWBPseudo<IIC_VST3lnu>;
2244 // VST4LN : Vector Store (single 4-element structure from one lane)
2245 class VST4LN<bits<4> op11_8, bits<4> op7_4, string Dt>
2246 : NLdStLn<1, 0b00, op11_8, op7_4, (outs),
2247 (ins addrmode6:$Rn, DPR:$Vd, DPR:$src2, DPR:$src3, DPR:$src4,
2248 nohash_imm:$lane), IIC_VST4ln, "vst4", Dt,
2249 "\\{$Vd[$lane], $src2[$lane], $src3[$lane], $src4[$lane]\\}, $Rn",
2252 let Inst{4} = Rn{4};
2253 let DecoderMethod = "DecodeVST4LN";
2256 def VST4LNd8 : VST4LN<0b0011, {?,?,?,?}, "8"> {
2257 let Inst{7-5} = lane{2-0};
2259 def VST4LNd16 : VST4LN<0b0111, {?,?,0,?}, "16"> {
2260 let Inst{7-6} = lane{1-0};
2262 def VST4LNd32 : VST4LN<0b1011, {?,0,?,?}, "32"> {
2263 let Inst{7} = lane{0};
2264 let Inst{5} = Rn{5};
2267 def VST4LNd8Pseudo : VSTQQLNPseudo<IIC_VST4ln>;
2268 def VST4LNd16Pseudo : VSTQQLNPseudo<IIC_VST4ln>;
2269 def VST4LNd32Pseudo : VSTQQLNPseudo<IIC_VST4ln>;
2271 // ...with double-spaced registers:
2272 def VST4LNq16 : VST4LN<0b0111, {?,?,1,?}, "16"> {
2273 let Inst{7-6} = lane{1-0};
2275 def VST4LNq32 : VST4LN<0b1011, {?,1,?,?}, "32"> {
2276 let Inst{7} = lane{0};
2277 let Inst{5} = Rn{5};
2280 def VST4LNq16Pseudo : VSTQQQQLNPseudo<IIC_VST4ln>;
2281 def VST4LNq32Pseudo : VSTQQQQLNPseudo<IIC_VST4ln>;
2283 // ...with address register writeback:
2284 class VST4LNWB<bits<4> op11_8, bits<4> op7_4, string Dt>
2285 : NLdStLn<1, 0b00, op11_8, op7_4, (outs GPR:$wb),
2286 (ins addrmode6:$Rn, am6offset:$Rm,
2287 DPR:$Vd, DPR:$src2, DPR:$src3, DPR:$src4, nohash_imm:$lane),
2288 IIC_VST4lnu, "vst4", Dt,
2289 "\\{$Vd[$lane], $src2[$lane], $src3[$lane], $src4[$lane]\\}, $Rn$Rm",
2290 "$Rn.addr = $wb", []> {
2291 let Inst{4} = Rn{4};
2292 let DecoderMethod = "DecodeVST4LN";
2295 def VST4LNd8_UPD : VST4LNWB<0b0011, {?,?,?,?}, "8"> {
2296 let Inst{7-5} = lane{2-0};
2298 def VST4LNd16_UPD : VST4LNWB<0b0111, {?,?,0,?}, "16"> {
2299 let Inst{7-6} = lane{1-0};
2301 def VST4LNd32_UPD : VST4LNWB<0b1011, {?,0,?,?}, "32"> {
2302 let Inst{7} = lane{0};
2303 let Inst{5} = Rn{5};
2306 def VST4LNd8Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST4lnu>;
2307 def VST4LNd16Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST4lnu>;
2308 def VST4LNd32Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST4lnu>;
2310 def VST4LNq16_UPD : VST4LNWB<0b0111, {?,?,1,?}, "16"> {
2311 let Inst{7-6} = lane{1-0};
2313 def VST4LNq32_UPD : VST4LNWB<0b1011, {?,1,?,?}, "32"> {
2314 let Inst{7} = lane{0};
2315 let Inst{5} = Rn{5};
2318 def VST4LNq16Pseudo_UPD : VSTQQQQLNWBPseudo<IIC_VST4lnu>;
2319 def VST4LNq32Pseudo_UPD : VSTQQQQLNWBPseudo<IIC_VST4lnu>;
2321 } // mayStore = 1, neverHasSideEffects = 1, hasExtraSrcRegAllocReq = 1
2324 //===----------------------------------------------------------------------===//
2325 // NEON pattern fragments
2326 //===----------------------------------------------------------------------===//
2328 // Extract D sub-registers of Q registers.
2329 def DSubReg_i8_reg : SDNodeXForm<imm, [{
2330 assert(ARM::dsub_7 == ARM::dsub_0+7 && "Unexpected subreg numbering");
2331 return CurDAG->getTargetConstant(ARM::dsub_0 + N->getZExtValue()/8, MVT::i32);
2333 def DSubReg_i16_reg : SDNodeXForm<imm, [{
2334 assert(ARM::dsub_7 == ARM::dsub_0+7 && "Unexpected subreg numbering");
2335 return CurDAG->getTargetConstant(ARM::dsub_0 + N->getZExtValue()/4, MVT::i32);
2337 def DSubReg_i32_reg : SDNodeXForm<imm, [{
2338 assert(ARM::dsub_7 == ARM::dsub_0+7 && "Unexpected subreg numbering");
2339 return CurDAG->getTargetConstant(ARM::dsub_0 + N->getZExtValue()/2, MVT::i32);
2341 def DSubReg_f64_reg : SDNodeXForm<imm, [{
2342 assert(ARM::dsub_7 == ARM::dsub_0+7 && "Unexpected subreg numbering");
2343 return CurDAG->getTargetConstant(ARM::dsub_0 + N->getZExtValue(), MVT::i32);
2346 // Extract S sub-registers of Q/D registers.
2347 def SSubReg_f32_reg : SDNodeXForm<imm, [{
2348 assert(ARM::ssub_3 == ARM::ssub_0+3 && "Unexpected subreg numbering");
2349 return CurDAG->getTargetConstant(ARM::ssub_0 + N->getZExtValue(), MVT::i32);
2352 // Translate lane numbers from Q registers to D subregs.
2353 def SubReg_i8_lane : SDNodeXForm<imm, [{
2354 return CurDAG->getTargetConstant(N->getZExtValue() & 7, MVT::i32);
2356 def SubReg_i16_lane : SDNodeXForm<imm, [{
2357 return CurDAG->getTargetConstant(N->getZExtValue() & 3, MVT::i32);
2359 def SubReg_i32_lane : SDNodeXForm<imm, [{
2360 return CurDAG->getTargetConstant(N->getZExtValue() & 1, MVT::i32);
2363 //===----------------------------------------------------------------------===//
2364 // Instruction Classes
2365 //===----------------------------------------------------------------------===//
2367 // Basic 2-register operations: double- and quad-register.
2368 class N2VD<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18,
2369 bits<2> op17_16, bits<5> op11_7, bit op4, string OpcodeStr,
2370 string Dt, ValueType ResTy, ValueType OpTy, SDNode OpNode>
2371 : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4, (outs DPR:$Vd),
2372 (ins DPR:$Vm), IIC_VUNAD, OpcodeStr, Dt,"$Vd, $Vm", "",
2373 [(set DPR:$Vd, (ResTy (OpNode (OpTy DPR:$Vm))))]>;
2374 class N2VQ<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18,
2375 bits<2> op17_16, bits<5> op11_7, bit op4, string OpcodeStr,
2376 string Dt, ValueType ResTy, ValueType OpTy, SDNode OpNode>
2377 : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 1, op4, (outs QPR:$Vd),
2378 (ins QPR:$Vm), IIC_VUNAQ, OpcodeStr, Dt,"$Vd, $Vm", "",
2379 [(set QPR:$Vd, (ResTy (OpNode (OpTy QPR:$Vm))))]>;
2381 // Basic 2-register intrinsics, both double- and quad-register.
2382 class N2VDInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18,
2383 bits<2> op17_16, bits<5> op11_7, bit op4,
2384 InstrItinClass itin, string OpcodeStr, string Dt,
2385 ValueType ResTy, ValueType OpTy, Intrinsic IntOp>
2386 : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4, (outs DPR:$Vd),
2387 (ins DPR:$Vm), itin, OpcodeStr, Dt, "$Vd, $Vm", "",
2388 [(set DPR:$Vd, (ResTy (IntOp (OpTy DPR:$Vm))))]>;
2389 class N2VQInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18,
2390 bits<2> op17_16, bits<5> op11_7, bit op4,
2391 InstrItinClass itin, string OpcodeStr, string Dt,
2392 ValueType ResTy, ValueType OpTy, Intrinsic IntOp>
2393 : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 1, op4, (outs QPR:$Vd),
2394 (ins QPR:$Vm), itin, OpcodeStr, Dt, "$Vd, $Vm", "",
2395 [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$Vm))))]>;
2397 // Narrow 2-register operations.
2398 class N2VN<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18,
2399 bits<2> op17_16, bits<5> op11_7, bit op6, bit op4,
2400 InstrItinClass itin, string OpcodeStr, string Dt,
2401 ValueType TyD, ValueType TyQ, SDNode OpNode>
2402 : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, op6, op4, (outs DPR:$Vd),
2403 (ins QPR:$Vm), itin, OpcodeStr, Dt, "$Vd, $Vm", "",
2404 [(set DPR:$Vd, (TyD (OpNode (TyQ QPR:$Vm))))]>;
2406 // Narrow 2-register intrinsics.
2407 class N2VNInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18,
2408 bits<2> op17_16, bits<5> op11_7, bit op6, bit op4,
2409 InstrItinClass itin, string OpcodeStr, string Dt,
2410 ValueType TyD, ValueType TyQ, Intrinsic IntOp>
2411 : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, op6, op4, (outs DPR:$Vd),
2412 (ins QPR:$Vm), itin, OpcodeStr, Dt, "$Vd, $Vm", "",
2413 [(set DPR:$Vd, (TyD (IntOp (TyQ QPR:$Vm))))]>;
2415 // Long 2-register operations (currently only used for VMOVL).
2416 class N2VL<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18,
2417 bits<2> op17_16, bits<5> op11_7, bit op6, bit op4,
2418 InstrItinClass itin, string OpcodeStr, string Dt,
2419 ValueType TyQ, ValueType TyD, SDNode OpNode>
2420 : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, op6, op4, (outs QPR:$Vd),
2421 (ins DPR:$Vm), itin, OpcodeStr, Dt, "$Vd, $Vm", "",
2422 [(set QPR:$Vd, (TyQ (OpNode (TyD DPR:$Vm))))]>;
2424 // Long 2-register intrinsics.
2425 class N2VLInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18,
2426 bits<2> op17_16, bits<5> op11_7, bit op6, bit op4,
2427 InstrItinClass itin, string OpcodeStr, string Dt,
2428 ValueType TyQ, ValueType TyD, Intrinsic IntOp>
2429 : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, op6, op4, (outs QPR:$Vd),
2430 (ins DPR:$Vm), itin, OpcodeStr, Dt, "$Vd, $Vm", "",
2431 [(set QPR:$Vd, (TyQ (IntOp (TyD DPR:$Vm))))]>;
2433 // 2-register shuffles (VTRN/VZIP/VUZP), both double- and quad-register.
2434 class N2VDShuffle<bits<2> op19_18, bits<5> op11_7, string OpcodeStr, string Dt>
2435 : N2V<0b11, 0b11, op19_18, 0b10, op11_7, 0, 0, (outs DPR:$Vd, DPR:$Vm),
2436 (ins DPR:$src1, DPR:$src2), IIC_VPERMD,
2437 OpcodeStr, Dt, "$Vd, $Vm",
2438 "$src1 = $Vd, $src2 = $Vm", []>;
2439 class N2VQShuffle<bits<2> op19_18, bits<5> op11_7,
2440 InstrItinClass itin, string OpcodeStr, string Dt>
2441 : N2V<0b11, 0b11, op19_18, 0b10, op11_7, 1, 0, (outs QPR:$Vd, QPR:$Vm),
2442 (ins QPR:$src1, QPR:$src2), itin, OpcodeStr, Dt, "$Vd, $Vm",
2443 "$src1 = $Vd, $src2 = $Vm", []>;
2445 // Basic 3-register operations: double- and quad-register.
2446 class N3VD<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2447 InstrItinClass itin, string OpcodeStr, string Dt,
2448 ValueType ResTy, ValueType OpTy, SDNode OpNode, bit Commutable>
2449 : N3V<op24, op23, op21_20, op11_8, 0, op4,
2450 (outs DPR:$Vd), (ins DPR:$Vn, DPR:$Vm), N3RegFrm, itin,
2451 OpcodeStr, Dt, "$Vd, $Vn, $Vm", "",
2452 [(set DPR:$Vd, (ResTy (OpNode (OpTy DPR:$Vn), (OpTy DPR:$Vm))))]> {
2453 let isCommutable = Commutable;
2455 // Same as N3VD but no data type.
2456 class N3VDX<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2457 InstrItinClass itin, string OpcodeStr,
2458 ValueType ResTy, ValueType OpTy,
2459 SDNode OpNode, bit Commutable>
2460 : N3VX<op24, op23, op21_20, op11_8, 0, op4,
2461 (outs DPR:$Vd), (ins DPR:$Vn, DPR:$Vm), N3RegFrm, itin,
2462 OpcodeStr, "$Vd, $Vn, $Vm", "",
2463 [(set DPR:$Vd, (ResTy (OpNode (OpTy DPR:$Vn), (OpTy DPR:$Vm))))]>{
2464 let isCommutable = Commutable;
2467 class N3VDSL<bits<2> op21_20, bits<4> op11_8,
2468 InstrItinClass itin, string OpcodeStr, string Dt,
2469 ValueType Ty, SDNode ShOp>
2470 : N3VLane32<0, 1, op21_20, op11_8, 1, 0,
2471 (outs DPR:$Vd), (ins DPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane),
2472 NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "",
2474 (Ty (ShOp (Ty DPR:$Vn),
2475 (Ty (NEONvduplane (Ty DPR_VFP2:$Vm),imm:$lane)))))]> {
2476 let isCommutable = 0;
2478 class N3VDSL16<bits<2> op21_20, bits<4> op11_8,
2479 string OpcodeStr, string Dt, ValueType Ty, SDNode ShOp>
2480 : N3VLane16<0, 1, op21_20, op11_8, 1, 0,
2481 (outs DPR:$Vd), (ins DPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane),
2482 NVMulSLFrm, IIC_VMULi16D, OpcodeStr, Dt,"$Vd, $Vn, $Vm$lane","",
2484 (Ty (ShOp (Ty DPR:$Vn),
2485 (Ty (NEONvduplane (Ty DPR_8:$Vm), imm:$lane)))))]> {
2486 let isCommutable = 0;
2489 class N3VQ<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2490 InstrItinClass itin, string OpcodeStr, string Dt,
2491 ValueType ResTy, ValueType OpTy, SDNode OpNode, bit Commutable>
2492 : N3V<op24, op23, op21_20, op11_8, 1, op4,
2493 (outs QPR:$Vd), (ins QPR:$Vn, QPR:$Vm), N3RegFrm, itin,
2494 OpcodeStr, Dt, "$Vd, $Vn, $Vm", "",
2495 [(set QPR:$Vd, (ResTy (OpNode (OpTy QPR:$Vn), (OpTy QPR:$Vm))))]> {
2496 let isCommutable = Commutable;
2498 class N3VQX<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2499 InstrItinClass itin, string OpcodeStr,
2500 ValueType ResTy, ValueType OpTy, SDNode OpNode, bit Commutable>
2501 : N3VX<op24, op23, op21_20, op11_8, 1, op4,
2502 (outs QPR:$Vd), (ins QPR:$Vn, QPR:$Vm), N3RegFrm, itin,
2503 OpcodeStr, "$Vd, $Vn, $Vm", "",
2504 [(set QPR:$Vd, (ResTy (OpNode (OpTy QPR:$Vn), (OpTy QPR:$Vm))))]>{
2505 let isCommutable = Commutable;
2507 class N3VQSL<bits<2> op21_20, bits<4> op11_8,
2508 InstrItinClass itin, string OpcodeStr, string Dt,
2509 ValueType ResTy, ValueType OpTy, SDNode ShOp>
2510 : N3VLane32<1, 1, op21_20, op11_8, 1, 0,
2511 (outs QPR:$Vd), (ins QPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane),
2512 NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "",
2513 [(set (ResTy QPR:$Vd),
2514 (ResTy (ShOp (ResTy QPR:$Vn),
2515 (ResTy (NEONvduplane (OpTy DPR_VFP2:$Vm),
2517 let isCommutable = 0;
2519 class N3VQSL16<bits<2> op21_20, bits<4> op11_8, string OpcodeStr, string Dt,
2520 ValueType ResTy, ValueType OpTy, SDNode ShOp>
2521 : N3VLane16<1, 1, op21_20, op11_8, 1, 0,
2522 (outs QPR:$Vd), (ins QPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane),
2523 NVMulSLFrm, IIC_VMULi16Q, OpcodeStr, Dt,"$Vd, $Vn, $Vm$lane", "",
2524 [(set (ResTy QPR:$Vd),
2525 (ResTy (ShOp (ResTy QPR:$Vn),
2526 (ResTy (NEONvduplane (OpTy DPR_8:$Vm),
2528 let isCommutable = 0;
2531 // Basic 3-register intrinsics, both double- and quad-register.
2532 class N3VDInt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2533 Format f, InstrItinClass itin, string OpcodeStr, string Dt,
2534 ValueType ResTy, ValueType OpTy, Intrinsic IntOp, bit Commutable>
2535 : N3V<op24, op23, op21_20, op11_8, 0, op4,
2536 (outs DPR:$Vd), (ins DPR:$Vn, DPR:$Vm), f, itin,
2537 OpcodeStr, Dt, "$Vd, $Vn, $Vm", "",
2538 [(set DPR:$Vd, (ResTy (IntOp (OpTy DPR:$Vn), (OpTy DPR:$Vm))))]> {
2539 let isCommutable = Commutable;
2541 class N3VDIntSL<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin,
2542 string OpcodeStr, string Dt, ValueType Ty, Intrinsic IntOp>
2543 : N3VLane32<0, 1, op21_20, op11_8, 1, 0,
2544 (outs DPR:$Vd), (ins DPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane),
2545 NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "",
2547 (Ty (IntOp (Ty DPR:$Vn),
2548 (Ty (NEONvduplane (Ty DPR_VFP2:$Vm),
2550 let isCommutable = 0;
2552 class N3VDIntSL16<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin,
2553 string OpcodeStr, string Dt, ValueType Ty, Intrinsic IntOp>
2554 : N3VLane16<0, 1, op21_20, op11_8, 1, 0,
2555 (outs DPR:$Vd), (ins DPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane),
2556 NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "",
2558 (Ty (IntOp (Ty DPR:$Vn),
2559 (Ty (NEONvduplane (Ty DPR_8:$Vm), imm:$lane)))))]> {
2560 let isCommutable = 0;
2562 class N3VDIntSh<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2563 Format f, InstrItinClass itin, string OpcodeStr, string Dt,
2564 ValueType ResTy, ValueType OpTy, Intrinsic IntOp>
2565 : N3V<op24, op23, op21_20, op11_8, 0, op4,
2566 (outs DPR:$Vd), (ins DPR:$Vm, DPR:$Vn), f, itin,
2567 OpcodeStr, Dt, "$Vd, $Vm, $Vn", "",
2568 [(set DPR:$Vd, (ResTy (IntOp (OpTy DPR:$Vm), (OpTy DPR:$Vn))))]> {
2569 let isCommutable = 0;
2572 class N3VQInt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2573 Format f, InstrItinClass itin, string OpcodeStr, string Dt,
2574 ValueType ResTy, ValueType OpTy, Intrinsic IntOp, bit Commutable>
2575 : N3V<op24, op23, op21_20, op11_8, 1, op4,
2576 (outs QPR:$Vd), (ins QPR:$Vn, QPR:$Vm), f, itin,
2577 OpcodeStr, Dt, "$Vd, $Vn, $Vm", "",
2578 [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$Vn), (OpTy QPR:$Vm))))]> {
2579 let isCommutable = Commutable;
2581 class N3VQIntSL<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin,
2582 string OpcodeStr, string Dt,
2583 ValueType ResTy, ValueType OpTy, Intrinsic IntOp>
2584 : N3VLane32<1, 1, op21_20, op11_8, 1, 0,
2585 (outs QPR:$Vd), (ins QPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane),
2586 NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "",
2587 [(set (ResTy QPR:$Vd),
2588 (ResTy (IntOp (ResTy QPR:$Vn),
2589 (ResTy (NEONvduplane (OpTy DPR_VFP2:$Vm),
2591 let isCommutable = 0;
2593 class N3VQIntSL16<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin,
2594 string OpcodeStr, string Dt,
2595 ValueType ResTy, ValueType OpTy, Intrinsic IntOp>
2596 : N3VLane16<1, 1, op21_20, op11_8, 1, 0,
2597 (outs QPR:$Vd), (ins QPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane),
2598 NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "",
2599 [(set (ResTy QPR:$Vd),
2600 (ResTy (IntOp (ResTy QPR:$Vn),
2601 (ResTy (NEONvduplane (OpTy DPR_8:$Vm),
2603 let isCommutable = 0;
2605 class N3VQIntSh<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2606 Format f, InstrItinClass itin, string OpcodeStr, string Dt,
2607 ValueType ResTy, ValueType OpTy, Intrinsic IntOp>
2608 : N3V<op24, op23, op21_20, op11_8, 1, op4,
2609 (outs QPR:$Vd), (ins QPR:$Vm, QPR:$Vn), f, itin,
2610 OpcodeStr, Dt, "$Vd, $Vm, $Vn", "",
2611 [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$Vm), (OpTy QPR:$Vn))))]> {
2612 let isCommutable = 0;
2615 // Multiply-Add/Sub operations: double- and quad-register.
2616 class N3VDMulOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2617 InstrItinClass itin, string OpcodeStr, string Dt,
2618 ValueType Ty, SDPatternOperator MulOp, SDPatternOperator OpNode>
2619 : N3V<op24, op23, op21_20, op11_8, 0, op4,
2620 (outs DPR:$Vd), (ins DPR:$src1, DPR:$Vn, DPR:$Vm), N3RegFrm, itin,
2621 OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd",
2622 [(set DPR:$Vd, (Ty (OpNode DPR:$src1,
2623 (Ty (MulOp DPR:$Vn, DPR:$Vm)))))]>;
2625 class N3VDMulOpSL<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin,
2626 string OpcodeStr, string Dt,
2627 ValueType Ty, SDPatternOperator MulOp, SDPatternOperator ShOp>
2628 : N3VLane32<0, 1, op21_20, op11_8, 1, 0,
2630 (ins DPR:$src1, DPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane),
2632 OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "$src1 = $Vd",
2634 (Ty (ShOp (Ty DPR:$src1),
2636 (Ty (NEONvduplane (Ty DPR_VFP2:$Vm),
2638 class N3VDMulOpSL16<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin,
2639 string OpcodeStr, string Dt,
2640 ValueType Ty, SDNode MulOp, SDNode ShOp>
2641 : N3VLane16<0, 1, op21_20, op11_8, 1, 0,
2643 (ins DPR:$src1, DPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane),
2645 OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "$src1 = $Vd",
2647 (Ty (ShOp (Ty DPR:$src1),
2649 (Ty (NEONvduplane (Ty DPR_8:$Vm),
2652 class N3VQMulOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2653 InstrItinClass itin, string OpcodeStr, string Dt, ValueType Ty,
2654 SDPatternOperator MulOp, SDPatternOperator OpNode>
2655 : N3V<op24, op23, op21_20, op11_8, 1, op4,
2656 (outs QPR:$Vd), (ins QPR:$src1, QPR:$Vn, QPR:$Vm), N3RegFrm, itin,
2657 OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd",
2658 [(set QPR:$Vd, (Ty (OpNode QPR:$src1,
2659 (Ty (MulOp QPR:$Vn, QPR:$Vm)))))]>;
2660 class N3VQMulOpSL<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin,
2661 string OpcodeStr, string Dt, ValueType ResTy, ValueType OpTy,
2662 SDPatternOperator MulOp, SDPatternOperator ShOp>
2663 : N3VLane32<1, 1, op21_20, op11_8, 1, 0,
2665 (ins QPR:$src1, QPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane),
2667 OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "$src1 = $Vd",
2668 [(set (ResTy QPR:$Vd),
2669 (ResTy (ShOp (ResTy QPR:$src1),
2670 (ResTy (MulOp QPR:$Vn,
2671 (ResTy (NEONvduplane (OpTy DPR_VFP2:$Vm),
2673 class N3VQMulOpSL16<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin,
2674 string OpcodeStr, string Dt,
2675 ValueType ResTy, ValueType OpTy,
2676 SDNode MulOp, SDNode ShOp>
2677 : N3VLane16<1, 1, op21_20, op11_8, 1, 0,
2679 (ins QPR:$src1, QPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane),
2681 OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "$src1 = $Vd",
2682 [(set (ResTy QPR:$Vd),
2683 (ResTy (ShOp (ResTy QPR:$src1),
2684 (ResTy (MulOp QPR:$Vn,
2685 (ResTy (NEONvduplane (OpTy DPR_8:$Vm),
2688 // Neon Intrinsic-Op instructions (VABA): double- and quad-register.
2689 class N3VDIntOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2690 InstrItinClass itin, string OpcodeStr, string Dt,
2691 ValueType Ty, Intrinsic IntOp, SDNode OpNode>
2692 : N3V<op24, op23, op21_20, op11_8, 0, op4,
2693 (outs DPR:$Vd), (ins DPR:$src1, DPR:$Vn, DPR:$Vm), N3RegFrm, itin,
2694 OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd",
2695 [(set DPR:$Vd, (Ty (OpNode DPR:$src1,
2696 (Ty (IntOp (Ty DPR:$Vn), (Ty DPR:$Vm))))))]>;
2697 class N3VQIntOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2698 InstrItinClass itin, string OpcodeStr, string Dt,
2699 ValueType Ty, Intrinsic IntOp, SDNode OpNode>
2700 : N3V<op24, op23, op21_20, op11_8, 1, op4,
2701 (outs QPR:$Vd), (ins QPR:$src1, QPR:$Vn, QPR:$Vm), N3RegFrm, itin,
2702 OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd",
2703 [(set QPR:$Vd, (Ty (OpNode QPR:$src1,
2704 (Ty (IntOp (Ty QPR:$Vn), (Ty QPR:$Vm))))))]>;
2706 // Neon 3-argument intrinsics, both double- and quad-register.
2707 // The destination register is also used as the first source operand register.
2708 class N3VDInt3<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2709 InstrItinClass itin, string OpcodeStr, string Dt,
2710 ValueType ResTy, ValueType OpTy, Intrinsic IntOp>
2711 : N3V<op24, op23, op21_20, op11_8, 0, op4,
2712 (outs DPR:$Vd), (ins DPR:$src1, DPR:$Vn, DPR:$Vm), N3RegFrm, itin,
2713 OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd",
2714 [(set DPR:$Vd, (ResTy (IntOp (OpTy DPR:$src1),
2715 (OpTy DPR:$Vn), (OpTy DPR:$Vm))))]>;
2716 class N3VQInt3<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2717 InstrItinClass itin, string OpcodeStr, string Dt,
2718 ValueType ResTy, ValueType OpTy, Intrinsic IntOp>
2719 : N3V<op24, op23, op21_20, op11_8, 1, op4,
2720 (outs QPR:$Vd), (ins QPR:$src1, QPR:$Vn, QPR:$Vm), N3RegFrm, itin,
2721 OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd",
2722 [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$src1),
2723 (OpTy QPR:$Vn), (OpTy QPR:$Vm))))]>;
2725 // Long Multiply-Add/Sub operations.
2726 class N3VLMulOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2727 InstrItinClass itin, string OpcodeStr, string Dt,
2728 ValueType TyQ, ValueType TyD, SDNode MulOp, SDNode OpNode>
2729 : N3V<op24, op23, op21_20, op11_8, 0, op4,
2730 (outs QPR:$Vd), (ins QPR:$src1, DPR:$Vn, DPR:$Vm), N3RegFrm, itin,
2731 OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd",
2732 [(set QPR:$Vd, (OpNode (TyQ QPR:$src1),
2733 (TyQ (MulOp (TyD DPR:$Vn),
2734 (TyD DPR:$Vm)))))]>;
2735 class N3VLMulOpSL<bit op24, bits<2> op21_20, bits<4> op11_8,
2736 InstrItinClass itin, string OpcodeStr, string Dt,
2737 ValueType TyQ, ValueType TyD, SDNode MulOp, SDNode OpNode>
2738 : N3VLane32<op24, 1, op21_20, op11_8, 1, 0, (outs QPR:$Vd),
2739 (ins QPR:$src1, DPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane),
2741 OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "$src1 = $Vd",
2743 (OpNode (TyQ QPR:$src1),
2744 (TyQ (MulOp (TyD DPR:$Vn),
2745 (TyD (NEONvduplane (TyD DPR_VFP2:$Vm),
2747 class N3VLMulOpSL16<bit op24, bits<2> op21_20, bits<4> op11_8,
2748 InstrItinClass itin, string OpcodeStr, string Dt,
2749 ValueType TyQ, ValueType TyD, SDNode MulOp, SDNode OpNode>
2750 : N3VLane16<op24, 1, op21_20, op11_8, 1, 0, (outs QPR:$Vd),
2751 (ins QPR:$src1, DPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane),
2753 OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "$src1 = $Vd",
2755 (OpNode (TyQ QPR:$src1),
2756 (TyQ (MulOp (TyD DPR:$Vn),
2757 (TyD (NEONvduplane (TyD DPR_8:$Vm),
2760 // Long Intrinsic-Op vector operations with explicit extend (VABAL).
2761 class N3VLIntExtOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2762 InstrItinClass itin, string OpcodeStr, string Dt,
2763 ValueType TyQ, ValueType TyD, Intrinsic IntOp, SDNode ExtOp,
2765 : N3V<op24, op23, op21_20, op11_8, 0, op4,
2766 (outs QPR:$Vd), (ins QPR:$src1, DPR:$Vn, DPR:$Vm), N3RegFrm, itin,
2767 OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd",
2768 [(set QPR:$Vd, (OpNode (TyQ QPR:$src1),
2769 (TyQ (ExtOp (TyD (IntOp (TyD DPR:$Vn),
2770 (TyD DPR:$Vm)))))))]>;
2772 // Neon Long 3-argument intrinsic. The destination register is
2773 // a quad-register and is also used as the first source operand register.
2774 class N3VLInt3<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2775 InstrItinClass itin, string OpcodeStr, string Dt,
2776 ValueType TyQ, ValueType TyD, Intrinsic IntOp>
2777 : N3V<op24, op23, op21_20, op11_8, 0, op4,
2778 (outs QPR:$Vd), (ins QPR:$src1, DPR:$Vn, DPR:$Vm), N3RegFrm, itin,
2779 OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd",
2781 (TyQ (IntOp (TyQ QPR:$src1), (TyD DPR:$Vn), (TyD DPR:$Vm))))]>;
2782 class N3VLInt3SL<bit op24, bits<2> op21_20, bits<4> op11_8, InstrItinClass itin,
2783 string OpcodeStr, string Dt,
2784 ValueType ResTy, ValueType OpTy, Intrinsic IntOp>
2785 : N3VLane32<op24, 1, op21_20, op11_8, 1, 0,
2787 (ins QPR:$src1, DPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane),
2789 OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "$src1 = $Vd",
2790 [(set (ResTy QPR:$Vd),
2791 (ResTy (IntOp (ResTy QPR:$src1),
2793 (OpTy (NEONvduplane (OpTy DPR_VFP2:$Vm),
2795 class N3VLInt3SL16<bit op24, bits<2> op21_20, bits<4> op11_8,
2796 InstrItinClass itin, string OpcodeStr, string Dt,
2797 ValueType ResTy, ValueType OpTy, Intrinsic IntOp>
2798 : N3VLane16<op24, 1, op21_20, op11_8, 1, 0,
2800 (ins QPR:$src1, DPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane),
2802 OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "$src1 = $Vd",
2803 [(set (ResTy QPR:$Vd),
2804 (ResTy (IntOp (ResTy QPR:$src1),
2806 (OpTy (NEONvduplane (OpTy DPR_8:$Vm),
2809 // Narrowing 3-register intrinsics.
2810 class N3VNInt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2811 string OpcodeStr, string Dt, ValueType TyD, ValueType TyQ,
2812 Intrinsic IntOp, bit Commutable>
2813 : N3V<op24, op23, op21_20, op11_8, 0, op4,
2814 (outs DPR:$Vd), (ins QPR:$Vn, QPR:$Vm), N3RegFrm, IIC_VBINi4D,
2815 OpcodeStr, Dt, "$Vd, $Vn, $Vm", "",
2816 [(set DPR:$Vd, (TyD (IntOp (TyQ QPR:$Vn), (TyQ QPR:$Vm))))]> {
2817 let isCommutable = Commutable;
2820 // Long 3-register operations.
2821 class N3VL<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2822 InstrItinClass itin, string OpcodeStr, string Dt,
2823 ValueType TyQ, ValueType TyD, SDNode OpNode, bit Commutable>
2824 : N3V<op24, op23, op21_20, op11_8, 0, op4,
2825 (outs QPR:$Vd), (ins DPR:$Vn, DPR:$Vm), N3RegFrm, itin,
2826 OpcodeStr, Dt, "$Vd, $Vn, $Vm", "",
2827 [(set QPR:$Vd, (TyQ (OpNode (TyD DPR:$Vn), (TyD DPR:$Vm))))]> {
2828 let isCommutable = Commutable;
2830 class N3VLSL<bit op24, bits<2> op21_20, bits<4> op11_8,
2831 InstrItinClass itin, string OpcodeStr, string Dt,
2832 ValueType TyQ, ValueType TyD, SDNode OpNode>
2833 : N3VLane32<op24, 1, op21_20, op11_8, 1, 0,
2834 (outs QPR:$Vd), (ins DPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane),
2835 NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "",
2837 (TyQ (OpNode (TyD DPR:$Vn),
2838 (TyD (NEONvduplane (TyD DPR_VFP2:$Vm),imm:$lane)))))]>;
2839 class N3VLSL16<bit op24, bits<2> op21_20, bits<4> op11_8,
2840 InstrItinClass itin, string OpcodeStr, string Dt,
2841 ValueType TyQ, ValueType TyD, SDNode OpNode>
2842 : N3VLane16<op24, 1, op21_20, op11_8, 1, 0,
2843 (outs QPR:$Vd), (ins DPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane),
2844 NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "",
2846 (TyQ (OpNode (TyD DPR:$Vn),
2847 (TyD (NEONvduplane (TyD DPR_8:$Vm), imm:$lane)))))]>;
2849 // Long 3-register operations with explicitly extended operands.
2850 class N3VLExt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2851 InstrItinClass itin, string OpcodeStr, string Dt,
2852 ValueType TyQ, ValueType TyD, SDNode OpNode, SDNode ExtOp,
2854 : N3V<op24, op23, op21_20, op11_8, 0, op4,
2855 (outs QPR:$Vd), (ins DPR:$Vn, DPR:$Vm), N3RegFrm, itin,
2856 OpcodeStr, Dt, "$Vd, $Vn, $Vm", "",
2857 [(set QPR:$Vd, (OpNode (TyQ (ExtOp (TyD DPR:$Vn))),
2858 (TyQ (ExtOp (TyD DPR:$Vm)))))]> {
2859 let isCommutable = Commutable;
2862 // Long 3-register intrinsics with explicit extend (VABDL).
2863 class N3VLIntExt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2864 InstrItinClass itin, string OpcodeStr, string Dt,
2865 ValueType TyQ, ValueType TyD, Intrinsic IntOp, SDNode ExtOp,
2867 : N3V<op24, op23, op21_20, op11_8, 0, op4,
2868 (outs QPR:$Vd), (ins DPR:$Vn, DPR:$Vm), N3RegFrm, itin,
2869 OpcodeStr, Dt, "$Vd, $Vn, $Vm", "",
2870 [(set QPR:$Vd, (TyQ (ExtOp (TyD (IntOp (TyD DPR:$Vn),
2871 (TyD DPR:$Vm))))))]> {
2872 let isCommutable = Commutable;
2875 // Long 3-register intrinsics.
2876 class N3VLInt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2877 InstrItinClass itin, string OpcodeStr, string Dt,
2878 ValueType TyQ, ValueType TyD, Intrinsic IntOp, bit Commutable>
2879 : N3V<op24, op23, op21_20, op11_8, 0, op4,
2880 (outs QPR:$Vd), (ins DPR:$Vn, DPR:$Vm), N3RegFrm, itin,
2881 OpcodeStr, Dt, "$Vd, $Vn, $Vm", "",
2882 [(set QPR:$Vd, (TyQ (IntOp (TyD DPR:$Vn), (TyD DPR:$Vm))))]> {
2883 let isCommutable = Commutable;
2885 class N3VLIntSL<bit op24, bits<2> op21_20, bits<4> op11_8, InstrItinClass itin,
2886 string OpcodeStr, string Dt,
2887 ValueType ResTy, ValueType OpTy, Intrinsic IntOp>
2888 : N3VLane32<op24, 1, op21_20, op11_8, 1, 0,
2889 (outs QPR:$Vd), (ins DPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane),
2890 NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "",
2891 [(set (ResTy QPR:$Vd),
2892 (ResTy (IntOp (OpTy DPR:$Vn),
2893 (OpTy (NEONvduplane (OpTy DPR_VFP2:$Vm),
2895 class N3VLIntSL16<bit op24, bits<2> op21_20, bits<4> op11_8,
2896 InstrItinClass itin, string OpcodeStr, string Dt,
2897 ValueType ResTy, ValueType OpTy, Intrinsic IntOp>
2898 : N3VLane16<op24, 1, op21_20, op11_8, 1, 0,
2899 (outs QPR:$Vd), (ins DPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane),
2900 NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "",
2901 [(set (ResTy QPR:$Vd),
2902 (ResTy (IntOp (OpTy DPR:$Vn),
2903 (OpTy (NEONvduplane (OpTy DPR_8:$Vm),
2906 // Wide 3-register operations.
2907 class N3VW<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2908 string OpcodeStr, string Dt, ValueType TyQ, ValueType TyD,
2909 SDNode OpNode, SDNode ExtOp, bit Commutable>
2910 : N3V<op24, op23, op21_20, op11_8, 0, op4,
2911 (outs QPR:$Vd), (ins QPR:$Vn, DPR:$Vm), N3RegFrm, IIC_VSUBiD,
2912 OpcodeStr, Dt, "$Vd, $Vn, $Vm", "",
2913 [(set QPR:$Vd, (OpNode (TyQ QPR:$Vn),
2914 (TyQ (ExtOp (TyD DPR:$Vm)))))]> {
2915 let isCommutable = Commutable;
2918 // Pairwise long 2-register intrinsics, both double- and quad-register.
2919 class N2VDPLInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18,
2920 bits<2> op17_16, bits<5> op11_7, bit op4,
2921 string OpcodeStr, string Dt,
2922 ValueType ResTy, ValueType OpTy, Intrinsic IntOp>
2923 : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4, (outs DPR:$Vd),
2924 (ins DPR:$Vm), IIC_VSHLiD, OpcodeStr, Dt, "$Vd, $Vm", "",
2925 [(set DPR:$Vd, (ResTy (IntOp (OpTy DPR:$Vm))))]>;
2926 class N2VQPLInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18,
2927 bits<2> op17_16, bits<5> op11_7, bit op4,
2928 string OpcodeStr, string Dt,
2929 ValueType ResTy, ValueType OpTy, Intrinsic IntOp>
2930 : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 1, op4, (outs QPR:$Vd),
2931 (ins QPR:$Vm), IIC_VSHLiD, OpcodeStr, Dt, "$Vd, $Vm", "",
2932 [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$Vm))))]>;
2934 // Pairwise long 2-register accumulate intrinsics,
2935 // both double- and quad-register.
2936 // The destination register is also used as the first source operand register.
2937 class N2VDPLInt2<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18,
2938 bits<2> op17_16, bits<5> op11_7, bit op4,
2939 string OpcodeStr, string Dt,
2940 ValueType ResTy, ValueType OpTy, Intrinsic IntOp>
2941 : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4,
2942 (outs DPR:$Vd), (ins DPR:$src1, DPR:$Vm), IIC_VPALiD,
2943 OpcodeStr, Dt, "$Vd, $Vm", "$src1 = $Vd",
2944 [(set DPR:$Vd, (ResTy (IntOp (ResTy DPR:$src1), (OpTy DPR:$Vm))))]>;
2945 class N2VQPLInt2<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18,
2946 bits<2> op17_16, bits<5> op11_7, bit op4,
2947 string OpcodeStr, string Dt,
2948 ValueType ResTy, ValueType OpTy, Intrinsic IntOp>
2949 : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 1, op4,
2950 (outs QPR:$Vd), (ins QPR:$src1, QPR:$Vm), IIC_VPALiQ,
2951 OpcodeStr, Dt, "$Vd, $Vm", "$src1 = $Vd",
2952 [(set QPR:$Vd, (ResTy (IntOp (ResTy QPR:$src1), (OpTy QPR:$Vm))))]>;
2954 // Shift by immediate,
2955 // both double- and quad-register.
2956 class N2VDSh<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4,
2957 Format f, InstrItinClass itin, Operand ImmTy,
2958 string OpcodeStr, string Dt, ValueType Ty, SDNode OpNode>
2959 : N2VImm<op24, op23, op11_8, op7, 0, op4,
2960 (outs DPR:$Vd), (ins DPR:$Vm, ImmTy:$SIMM), f, itin,
2961 OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "",
2962 [(set DPR:$Vd, (Ty (OpNode (Ty DPR:$Vm), (i32 imm:$SIMM))))]>;
2963 class N2VQSh<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4,
2964 Format f, InstrItinClass itin, Operand ImmTy,
2965 string OpcodeStr, string Dt, ValueType Ty, SDNode OpNode>
2966 : N2VImm<op24, op23, op11_8, op7, 1, op4,
2967 (outs QPR:$Vd), (ins QPR:$Vm, ImmTy:$SIMM), f, itin,
2968 OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "",
2969 [(set QPR:$Vd, (Ty (OpNode (Ty QPR:$Vm), (i32 imm:$SIMM))))]>;
2971 // Long shift by immediate.
2972 class N2VLSh<bit op24, bit op23, bits<4> op11_8, bit op7, bit op6, bit op4,
2973 string OpcodeStr, string Dt,
2974 ValueType ResTy, ValueType OpTy, Operand ImmTy, SDNode OpNode>
2975 : N2VImm<op24, op23, op11_8, op7, op6, op4,
2976 (outs QPR:$Vd), (ins DPR:$Vm, ImmTy:$SIMM), N2RegVShLFrm,
2977 IIC_VSHLiD, OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "",
2978 [(set QPR:$Vd, (ResTy (OpNode (OpTy DPR:$Vm),
2979 (i32 imm:$SIMM))))]>;
2981 // Narrow shift by immediate.
2982 class N2VNSh<bit op24, bit op23, bits<4> op11_8, bit op7, bit op6, bit op4,
2983 InstrItinClass itin, string OpcodeStr, string Dt,
2984 ValueType ResTy, ValueType OpTy, Operand ImmTy, SDNode OpNode>
2985 : N2VImm<op24, op23, op11_8, op7, op6, op4,
2986 (outs DPR:$Vd), (ins QPR:$Vm, ImmTy:$SIMM), N2RegVShRFrm, itin,
2987 OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "",
2988 [(set DPR:$Vd, (ResTy (OpNode (OpTy QPR:$Vm),
2989 (i32 imm:$SIMM))))]>;
2991 // Shift right by immediate and accumulate,
2992 // both double- and quad-register.
2993 class N2VDShAdd<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4,
2994 Operand ImmTy, string OpcodeStr, string Dt,
2995 ValueType Ty, SDNode ShOp>
2996 : N2VImm<op24, op23, op11_8, op7, 0, op4, (outs DPR:$Vd),
2997 (ins DPR:$src1, DPR:$Vm, ImmTy:$SIMM), N2RegVShRFrm, IIC_VPALiD,
2998 OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "$src1 = $Vd",
2999 [(set DPR:$Vd, (Ty (add DPR:$src1,
3000 (Ty (ShOp DPR:$Vm, (i32 imm:$SIMM))))))]>;
3001 class N2VQShAdd<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4,
3002 Operand ImmTy, string OpcodeStr, string Dt,
3003 ValueType Ty, SDNode ShOp>
3004 : N2VImm<op24, op23, op11_8, op7, 1, op4, (outs QPR:$Vd),
3005 (ins QPR:$src1, QPR:$Vm, ImmTy:$SIMM), N2RegVShRFrm, IIC_VPALiD,
3006 OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "$src1 = $Vd",
3007 [(set QPR:$Vd, (Ty (add QPR:$src1,
3008 (Ty (ShOp QPR:$Vm, (i32 imm:$SIMM))))))]>;
3010 // Shift by immediate and insert,
3011 // both double- and quad-register.
3012 class N2VDShIns<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4,
3013 Operand ImmTy, Format f, string OpcodeStr, string Dt,
3014 ValueType Ty,SDNode ShOp>
3015 : N2VImm<op24, op23, op11_8, op7, 0, op4, (outs DPR:$Vd),
3016 (ins DPR:$src1, DPR:$Vm, ImmTy:$SIMM), f, IIC_VSHLiD,
3017 OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "$src1 = $Vd",
3018 [(set DPR:$Vd, (Ty (ShOp DPR:$src1, DPR:$Vm, (i32 imm:$SIMM))))]>;
3019 class N2VQShIns<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4,
3020 Operand ImmTy, Format f, string OpcodeStr, string Dt,
3021 ValueType Ty,SDNode ShOp>
3022 : N2VImm<op24, op23, op11_8, op7, 1, op4, (outs QPR:$Vd),
3023 (ins QPR:$src1, QPR:$Vm, ImmTy:$SIMM), f, IIC_VSHLiQ,
3024 OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "$src1 = $Vd",
3025 [(set QPR:$Vd, (Ty (ShOp QPR:$src1, QPR:$Vm, (i32 imm:$SIMM))))]>;
3027 // Convert, with fractional bits immediate,
3028 // both double- and quad-register.
3029 class N2VCvtD<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4,
3030 string OpcodeStr, string Dt, ValueType ResTy, ValueType OpTy,
3032 : N2VImm<op24, op23, op11_8, op7, 0, op4,
3033 (outs DPR:$Vd), (ins DPR:$Vm, neon_vcvt_imm32:$SIMM), NVCVTFrm,
3034 IIC_VUNAD, OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "",
3035 [(set DPR:$Vd, (ResTy (IntOp (OpTy DPR:$Vm), (i32 imm:$SIMM))))]>;
3036 class N2VCvtQ<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4,
3037 string OpcodeStr, string Dt, ValueType ResTy, ValueType OpTy,
3039 : N2VImm<op24, op23, op11_8, op7, 1, op4,
3040 (outs QPR:$Vd), (ins QPR:$Vm, neon_vcvt_imm32:$SIMM), NVCVTFrm,
3041 IIC_VUNAQ, OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "",
3042 [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$Vm), (i32 imm:$SIMM))))]>;
3044 //===----------------------------------------------------------------------===//
3046 //===----------------------------------------------------------------------===//
3048 // Abbreviations used in multiclass suffixes:
3049 // Q = quarter int (8 bit) elements
3050 // H = half int (16 bit) elements
3051 // S = single int (32 bit) elements
3052 // D = double int (64 bit) elements
3054 // Neon 2-register vector operations and intrinsics.
3056 // Neon 2-register comparisons.
3057 // source operand element sizes of 8, 16 and 32 bits:
3058 multiclass N2V_QHS_cmp<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16,
3059 bits<5> op11_7, bit op4, string opc, string Dt,
3060 string asm, SDNode OpNode> {
3061 // 64-bit vector types.
3062 def v8i8 : N2V<op24_23, op21_20, 0b00, op17_16, op11_7, 0, op4,
3063 (outs DPR:$Vd), (ins DPR:$Vm), NoItinerary,
3064 opc, !strconcat(Dt, "8"), asm, "",
3065 [(set DPR:$Vd, (v8i8 (OpNode (v8i8 DPR:$Vm))))]>;
3066 def v4i16 : N2V<op24_23, op21_20, 0b01, op17_16, op11_7, 0, op4,
3067 (outs DPR:$Vd), (ins DPR:$Vm), NoItinerary,
3068 opc, !strconcat(Dt, "16"), asm, "",
3069 [(set DPR:$Vd, (v4i16 (OpNode (v4i16 DPR:$Vm))))]>;
3070 def v2i32 : N2V<op24_23, op21_20, 0b10, op17_16, op11_7, 0, op4,
3071 (outs DPR:$Vd), (ins DPR:$Vm), NoItinerary,
3072 opc, !strconcat(Dt, "32"), asm, "",
3073 [(set DPR:$Vd, (v2i32 (OpNode (v2i32 DPR:$Vm))))]>;
3074 def v2f32 : N2V<op24_23, op21_20, 0b10, op17_16, op11_7, 0, op4,
3075 (outs DPR:$Vd), (ins DPR:$Vm), NoItinerary,
3076 opc, "f32", asm, "",
3077 [(set DPR:$Vd, (v2i32 (OpNode (v2f32 DPR:$Vm))))]> {
3078 let Inst{10} = 1; // overwrite F = 1
3081 // 128-bit vector types.
3082 def v16i8 : N2V<op24_23, op21_20, 0b00, op17_16, op11_7, 1, op4,
3083 (outs QPR:$Vd), (ins QPR:$Vm), NoItinerary,
3084 opc, !strconcat(Dt, "8"), asm, "",
3085 [(set QPR:$Vd, (v16i8 (OpNode (v16i8 QPR:$Vm))))]>;
3086 def v8i16 : N2V<op24_23, op21_20, 0b01, op17_16, op11_7, 1, op4,
3087 (outs QPR:$Vd), (ins QPR:$Vm), NoItinerary,
3088 opc, !strconcat(Dt, "16"), asm, "",
3089 [(set QPR:$Vd, (v8i16 (OpNode (v8i16 QPR:$Vm))))]>;
3090 def v4i32 : N2V<op24_23, op21_20, 0b10, op17_16, op11_7, 1, op4,
3091 (outs QPR:$Vd), (ins QPR:$Vm), NoItinerary,
3092 opc, !strconcat(Dt, "32"), asm, "",
3093 [(set QPR:$Vd, (v4i32 (OpNode (v4i32 QPR:$Vm))))]>;
3094 def v4f32 : N2V<op24_23, op21_20, 0b10, op17_16, op11_7, 1, op4,
3095 (outs QPR:$Vd), (ins QPR:$Vm), NoItinerary,
3096 opc, "f32", asm, "",
3097 [(set QPR:$Vd, (v4i32 (OpNode (v4f32 QPR:$Vm))))]> {
3098 let Inst{10} = 1; // overwrite F = 1
3103 // Neon 2-register vector intrinsics,
3104 // element sizes of 8, 16 and 32 bits:
3105 multiclass N2VInt_QHS<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16,
3106 bits<5> op11_7, bit op4,
3107 InstrItinClass itinD, InstrItinClass itinQ,
3108 string OpcodeStr, string Dt, Intrinsic IntOp> {
3109 // 64-bit vector types.
3110 def v8i8 : N2VDInt<op24_23, op21_20, 0b00, op17_16, op11_7, op4,
3111 itinD, OpcodeStr, !strconcat(Dt, "8"), v8i8, v8i8, IntOp>;
3112 def v4i16 : N2VDInt<op24_23, op21_20, 0b01, op17_16, op11_7, op4,
3113 itinD, OpcodeStr, !strconcat(Dt, "16"),v4i16,v4i16,IntOp>;
3114 def v2i32 : N2VDInt<op24_23, op21_20, 0b10, op17_16, op11_7, op4,
3115 itinD, OpcodeStr, !strconcat(Dt, "32"),v2i32,v2i32,IntOp>;
3117 // 128-bit vector types.
3118 def v16i8 : N2VQInt<op24_23, op21_20, 0b00, op17_16, op11_7, op4,
3119 itinQ, OpcodeStr, !strconcat(Dt, "8"), v16i8,v16i8,IntOp>;
3120 def v8i16 : N2VQInt<op24_23, op21_20, 0b01, op17_16, op11_7, op4,
3121 itinQ, OpcodeStr, !strconcat(Dt, "16"),v8i16,v8i16,IntOp>;
3122 def v4i32 : N2VQInt<op24_23, op21_20, 0b10, op17_16, op11_7, op4,
3123 itinQ, OpcodeStr, !strconcat(Dt, "32"),v4i32,v4i32,IntOp>;
3127 // Neon Narrowing 2-register vector operations,
3128 // source operand element sizes of 16, 32 and 64 bits:
3129 multiclass N2VN_HSD<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16,
3130 bits<5> op11_7, bit op6, bit op4,
3131 InstrItinClass itin, string OpcodeStr, string Dt,
3133 def v8i8 : N2VN<op24_23, op21_20, 0b00, op17_16, op11_7, op6, op4,
3134 itin, OpcodeStr, !strconcat(Dt, "16"),
3135 v8i8, v8i16, OpNode>;
3136 def v4i16 : N2VN<op24_23, op21_20, 0b01, op17_16, op11_7, op6, op4,
3137 itin, OpcodeStr, !strconcat(Dt, "32"),
3138 v4i16, v4i32, OpNode>;
3139 def v2i32 : N2VN<op24_23, op21_20, 0b10, op17_16, op11_7, op6, op4,
3140 itin, OpcodeStr, !strconcat(Dt, "64"),
3141 v2i32, v2i64, OpNode>;
3144 // Neon Narrowing 2-register vector intrinsics,
3145 // source operand element sizes of 16, 32 and 64 bits:
3146 multiclass N2VNInt_HSD<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16,
3147 bits<5> op11_7, bit op6, bit op4,
3148 InstrItinClass itin, string OpcodeStr, string Dt,
3150 def v8i8 : N2VNInt<op24_23, op21_20, 0b00, op17_16, op11_7, op6, op4,
3151 itin, OpcodeStr, !strconcat(Dt, "16"),
3152 v8i8, v8i16, IntOp>;
3153 def v4i16 : N2VNInt<op24_23, op21_20, 0b01, op17_16, op11_7, op6, op4,
3154 itin, OpcodeStr, !strconcat(Dt, "32"),
3155 v4i16, v4i32, IntOp>;
3156 def v2i32 : N2VNInt<op24_23, op21_20, 0b10, op17_16, op11_7, op6, op4,
3157 itin, OpcodeStr, !strconcat(Dt, "64"),
3158 v2i32, v2i64, IntOp>;
3162 // Neon Lengthening 2-register vector intrinsic (currently specific to VMOVL).
3163 // source operand element sizes of 16, 32 and 64 bits:
3164 multiclass N2VL_QHS<bits<2> op24_23, bits<5> op11_7, bit op6, bit op4,
3165 string OpcodeStr, string Dt, SDNode OpNode> {
3166 def v8i16 : N2VL<op24_23, 0b00, 0b10, 0b00, op11_7, op6, op4, IIC_VQUNAiD,
3167 OpcodeStr, !strconcat(Dt, "8"), v8i16, v8i8, OpNode>;
3168 def v4i32 : N2VL<op24_23, 0b01, 0b00, 0b00, op11_7, op6, op4, IIC_VQUNAiD,
3169 OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16, OpNode>;
3170 def v2i64 : N2VL<op24_23, 0b10, 0b00, 0b00, op11_7, op6, op4, IIC_VQUNAiD,
3171 OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, OpNode>;
3175 // Neon 3-register vector operations.
3177 // First with only element sizes of 8, 16 and 32 bits:
3178 multiclass N3V_QHS<bit op24, bit op23, bits<4> op11_8, bit op4,
3179 InstrItinClass itinD16, InstrItinClass itinD32,
3180 InstrItinClass itinQ16, InstrItinClass itinQ32,
3181 string OpcodeStr, string Dt,
3182 SDNode OpNode, bit Commutable = 0> {
3183 // 64-bit vector types.
3184 def v8i8 : N3VD<op24, op23, 0b00, op11_8, op4, itinD16,
3185 OpcodeStr, !strconcat(Dt, "8"),
3186 v8i8, v8i8, OpNode, Commutable>;
3187 def v4i16 : N3VD<op24, op23, 0b01, op11_8, op4, itinD16,
3188 OpcodeStr, !strconcat(Dt, "16"),
3189 v4i16, v4i16, OpNode, Commutable>;
3190 def v2i32 : N3VD<op24, op23, 0b10, op11_8, op4, itinD32,
3191 OpcodeStr, !strconcat(Dt, "32"),
3192 v2i32, v2i32, OpNode, Commutable>;
3194 // 128-bit vector types.
3195 def v16i8 : N3VQ<op24, op23, 0b00, op11_8, op4, itinQ16,
3196 OpcodeStr, !strconcat(Dt, "8"),
3197 v16i8, v16i8, OpNode, Commutable>;
3198 def v8i16 : N3VQ<op24, op23, 0b01, op11_8, op4, itinQ16,
3199 OpcodeStr, !strconcat(Dt, "16"),
3200 v8i16, v8i16, OpNode, Commutable>;
3201 def v4i32 : N3VQ<op24, op23, 0b10, op11_8, op4, itinQ32,
3202 OpcodeStr, !strconcat(Dt, "32"),
3203 v4i32, v4i32, OpNode, Commutable>;
3206 multiclass N3VSL_HS<bits<4> op11_8, string OpcodeStr, SDNode ShOp> {
3207 def v4i16 : N3VDSL16<0b01, op11_8, OpcodeStr, "i16", v4i16, ShOp>;
3208 def v2i32 : N3VDSL<0b10, op11_8, IIC_VMULi32D, OpcodeStr, "i32", v2i32, ShOp>;
3209 def v8i16 : N3VQSL16<0b01, op11_8, OpcodeStr, "i16", v8i16, v4i16, ShOp>;
3210 def v4i32 : N3VQSL<0b10, op11_8, IIC_VMULi32Q, OpcodeStr, "i32",
3211 v4i32, v2i32, ShOp>;
3214 // ....then also with element size 64 bits:
3215 multiclass N3V_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4,
3216 InstrItinClass itinD, InstrItinClass itinQ,
3217 string OpcodeStr, string Dt,
3218 SDNode OpNode, bit Commutable = 0>
3219 : N3V_QHS<op24, op23, op11_8, op4, itinD, itinD, itinQ, itinQ,
3220 OpcodeStr, Dt, OpNode, Commutable> {
3221 def v1i64 : N3VD<op24, op23, 0b11, op11_8, op4, itinD,
3222 OpcodeStr, !strconcat(Dt, "64"),
3223 v1i64, v1i64, OpNode, Commutable>;
3224 def v2i64 : N3VQ<op24, op23, 0b11, op11_8, op4, itinQ,
3225 OpcodeStr, !strconcat(Dt, "64"),
3226 v2i64, v2i64, OpNode, Commutable>;
3230 // Neon 3-register vector intrinsics.
3232 // First with only element sizes of 16 and 32 bits:
3233 multiclass N3VInt_HS<bit op24, bit op23, bits<4> op11_8, bit op4, Format f,
3234 InstrItinClass itinD16, InstrItinClass itinD32,
3235 InstrItinClass itinQ16, InstrItinClass itinQ32,
3236 string OpcodeStr, string Dt,
3237 Intrinsic IntOp, bit Commutable = 0> {
3238 // 64-bit vector types.
3239 def v4i16 : N3VDInt<op24, op23, 0b01, op11_8, op4, f, itinD16,
3240 OpcodeStr, !strconcat(Dt, "16"),
3241 v4i16, v4i16, IntOp, Commutable>;
3242 def v2i32 : N3VDInt<op24, op23, 0b10, op11_8, op4, f, itinD32,
3243 OpcodeStr, !strconcat(Dt, "32"),
3244 v2i32, v2i32, IntOp, Commutable>;
3246 // 128-bit vector types.
3247 def v8i16 : N3VQInt<op24, op23, 0b01, op11_8, op4, f, itinQ16,
3248 OpcodeStr, !strconcat(Dt, "16"),
3249 v8i16, v8i16, IntOp, Commutable>;
3250 def v4i32 : N3VQInt<op24, op23, 0b10, op11_8, op4, f, itinQ32,
3251 OpcodeStr, !strconcat(Dt, "32"),
3252 v4i32, v4i32, IntOp, Commutable>;
3254 multiclass N3VInt_HSSh<bit op24, bit op23, bits<4> op11_8, bit op4, Format f,
3255 InstrItinClass itinD16, InstrItinClass itinD32,
3256 InstrItinClass itinQ16, InstrItinClass itinQ32,
3257 string OpcodeStr, string Dt,
3259 // 64-bit vector types.
3260 def v4i16 : N3VDIntSh<op24, op23, 0b01, op11_8, op4, f, itinD16,
3261 OpcodeStr, !strconcat(Dt, "16"),
3262 v4i16, v4i16, IntOp>;
3263 def v2i32 : N3VDIntSh<op24, op23, 0b10, op11_8, op4, f, itinD32,
3264 OpcodeStr, !strconcat(Dt, "32"),
3265 v2i32, v2i32, IntOp>;
3267 // 128-bit vector types.
3268 def v8i16 : N3VQIntSh<op24, op23, 0b01, op11_8, op4, f, itinQ16,
3269 OpcodeStr, !strconcat(Dt, "16"),
3270 v8i16, v8i16, IntOp>;
3271 def v4i32 : N3VQIntSh<op24, op23, 0b10, op11_8, op4, f, itinQ32,
3272 OpcodeStr, !strconcat(Dt, "32"),
3273 v4i32, v4i32, IntOp>;
3276 multiclass N3VIntSL_HS<bits<4> op11_8,
3277 InstrItinClass itinD16, InstrItinClass itinD32,
3278 InstrItinClass itinQ16, InstrItinClass itinQ32,
3279 string OpcodeStr, string Dt, Intrinsic IntOp> {
3280 def v4i16 : N3VDIntSL16<0b01, op11_8, itinD16,
3281 OpcodeStr, !strconcat(Dt, "16"), v4i16, IntOp>;
3282 def v2i32 : N3VDIntSL<0b10, op11_8, itinD32,
3283 OpcodeStr, !strconcat(Dt, "32"), v2i32, IntOp>;
3284 def v8i16 : N3VQIntSL16<0b01, op11_8, itinQ16,
3285 OpcodeStr, !strconcat(Dt, "16"), v8i16, v4i16, IntOp>;
3286 def v4i32 : N3VQIntSL<0b10, op11_8, itinQ32,
3287 OpcodeStr, !strconcat(Dt, "32"), v4i32, v2i32, IntOp>;
3290 // ....then also with element size of 8 bits:
3291 multiclass N3VInt_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, Format f,
3292 InstrItinClass itinD16, InstrItinClass itinD32,
3293 InstrItinClass itinQ16, InstrItinClass itinQ32,
3294 string OpcodeStr, string Dt,
3295 Intrinsic IntOp, bit Commutable = 0>
3296 : N3VInt_HS<op24, op23, op11_8, op4, f, itinD16, itinD32, itinQ16, itinQ32,
3297 OpcodeStr, Dt, IntOp, Commutable> {
3298 def v8i8 : N3VDInt<op24, op23, 0b00, op11_8, op4, f, itinD16,
3299 OpcodeStr, !strconcat(Dt, "8"),
3300 v8i8, v8i8, IntOp, Commutable>;
3301 def v16i8 : N3VQInt<op24, op23, 0b00, op11_8, op4, f, itinQ16,
3302 OpcodeStr, !strconcat(Dt, "8"),
3303 v16i8, v16i8, IntOp, Commutable>;
3305 multiclass N3VInt_QHSSh<bit op24, bit op23, bits<4> op11_8, bit op4, Format f,
3306 InstrItinClass itinD16, InstrItinClass itinD32,
3307 InstrItinClass itinQ16, InstrItinClass itinQ32,
3308 string OpcodeStr, string Dt,
3310 : N3VInt_HSSh<op24, op23, op11_8, op4, f, itinD16, itinD32, itinQ16, itinQ32,
3311 OpcodeStr, Dt, IntOp> {
3312 def v8i8 : N3VDIntSh<op24, op23, 0b00, op11_8, op4, f, itinD16,
3313 OpcodeStr, !strconcat(Dt, "8"),
3315 def v16i8 : N3VQIntSh<op24, op23, 0b00, op11_8, op4, f, itinQ16,
3316 OpcodeStr, !strconcat(Dt, "8"),
3317 v16i8, v16i8, IntOp>;
3321 // ....then also with element size of 64 bits:
3322 multiclass N3VInt_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4, Format f,
3323 InstrItinClass itinD16, InstrItinClass itinD32,
3324 InstrItinClass itinQ16, InstrItinClass itinQ32,
3325 string OpcodeStr, string Dt,
3326 Intrinsic IntOp, bit Commutable = 0>
3327 : N3VInt_QHS<op24, op23, op11_8, op4, f, itinD16, itinD32, itinQ16, itinQ32,
3328 OpcodeStr, Dt, IntOp, Commutable> {
3329 def v1i64 : N3VDInt<op24, op23, 0b11, op11_8, op4, f, itinD32,
3330 OpcodeStr, !strconcat(Dt, "64"),
3331 v1i64, v1i64, IntOp, Commutable>;
3332 def v2i64 : N3VQInt<op24, op23, 0b11, op11_8, op4, f, itinQ32,
3333 OpcodeStr, !strconcat(Dt, "64"),
3334 v2i64, v2i64, IntOp, Commutable>;
3336 multiclass N3VInt_QHSDSh<bit op24, bit op23, bits<4> op11_8, bit op4, Format f,
3337 InstrItinClass itinD16, InstrItinClass itinD32,
3338 InstrItinClass itinQ16, InstrItinClass itinQ32,
3339 string OpcodeStr, string Dt,
3341 : N3VInt_QHSSh<op24, op23, op11_8, op4, f, itinD16, itinD32, itinQ16, itinQ32,
3342 OpcodeStr, Dt, IntOp> {
3343 def v1i64 : N3VDIntSh<op24, op23, 0b11, op11_8, op4, f, itinD32,
3344 OpcodeStr, !strconcat(Dt, "64"),
3345 v1i64, v1i64, IntOp>;
3346 def v2i64 : N3VQIntSh<op24, op23, 0b11, op11_8, op4, f, itinQ32,
3347 OpcodeStr, !strconcat(Dt, "64"),
3348 v2i64, v2i64, IntOp>;
3351 // Neon Narrowing 3-register vector intrinsics,
3352 // source operand element sizes of 16, 32 and 64 bits:
3353 multiclass N3VNInt_HSD<bit op24, bit op23, bits<4> op11_8, bit op4,
3354 string OpcodeStr, string Dt,
3355 Intrinsic IntOp, bit Commutable = 0> {
3356 def v8i8 : N3VNInt<op24, op23, 0b00, op11_8, op4,
3357 OpcodeStr, !strconcat(Dt, "16"),
3358 v8i8, v8i16, IntOp, Commutable>;
3359 def v4i16 : N3VNInt<op24, op23, 0b01, op11_8, op4,
3360 OpcodeStr, !strconcat(Dt, "32"),
3361 v4i16, v4i32, IntOp, Commutable>;
3362 def v2i32 : N3VNInt<op24, op23, 0b10, op11_8, op4,
3363 OpcodeStr, !strconcat(Dt, "64"),
3364 v2i32, v2i64, IntOp, Commutable>;
3368 // Neon Long 3-register vector operations.
3370 multiclass N3VL_QHS<bit op24, bit op23, bits<4> op11_8, bit op4,
3371 InstrItinClass itin16, InstrItinClass itin32,
3372 string OpcodeStr, string Dt,
3373 SDNode OpNode, bit Commutable = 0> {
3374 def v8i16 : N3VL<op24, op23, 0b00, op11_8, op4, itin16,
3375 OpcodeStr, !strconcat(Dt, "8"),
3376 v8i16, v8i8, OpNode, Commutable>;
3377 def v4i32 : N3VL<op24, op23, 0b01, op11_8, op4, itin16,
3378 OpcodeStr, !strconcat(Dt, "16"),
3379 v4i32, v4i16, OpNode, Commutable>;
3380 def v2i64 : N3VL<op24, op23, 0b10, op11_8, op4, itin32,
3381 OpcodeStr, !strconcat(Dt, "32"),
3382 v2i64, v2i32, OpNode, Commutable>;
3385 multiclass N3VLSL_HS<bit op24, bits<4> op11_8,
3386 InstrItinClass itin, string OpcodeStr, string Dt,
3388 def v4i16 : N3VLSL16<op24, 0b01, op11_8, itin, OpcodeStr,
3389 !strconcat(Dt, "16"), v4i32, v4i16, OpNode>;
3390 def v2i32 : N3VLSL<op24, 0b10, op11_8, itin, OpcodeStr,
3391 !strconcat(Dt, "32"), v2i64, v2i32, OpNode>;
3394 multiclass N3VLExt_QHS<bit op24, bit op23, bits<4> op11_8, bit op4,
3395 InstrItinClass itin16, InstrItinClass itin32,
3396 string OpcodeStr, string Dt,
3397 SDNode OpNode, SDNode ExtOp, bit Commutable = 0> {
3398 def v8i16 : N3VLExt<op24, op23, 0b00, op11_8, op4, itin16,
3399 OpcodeStr, !strconcat(Dt, "8"),
3400 v8i16, v8i8, OpNode, ExtOp, Commutable>;
3401 def v4i32 : N3VLExt<op24, op23, 0b01, op11_8, op4, itin16,
3402 OpcodeStr, !strconcat(Dt, "16"),
3403 v4i32, v4i16, OpNode, ExtOp, Commutable>;
3404 def v2i64 : N3VLExt<op24, op23, 0b10, op11_8, op4, itin32,
3405 OpcodeStr, !strconcat(Dt, "32"),
3406 v2i64, v2i32, OpNode, ExtOp, Commutable>;
3409 // Neon Long 3-register vector intrinsics.
3411 // First with only element sizes of 16 and 32 bits:
3412 multiclass N3VLInt_HS<bit op24, bit op23, bits<4> op11_8, bit op4,
3413 InstrItinClass itin16, InstrItinClass itin32,
3414 string OpcodeStr, string Dt,
3415 Intrinsic IntOp, bit Commutable = 0> {
3416 def v4i32 : N3VLInt<op24, op23, 0b01, op11_8, op4, itin16,
3417 OpcodeStr, !strconcat(Dt, "16"),
3418 v4i32, v4i16, IntOp, Commutable>;
3419 def v2i64 : N3VLInt<op24, op23, 0b10, op11_8, op4, itin32,
3420 OpcodeStr, !strconcat(Dt, "32"),
3421 v2i64, v2i32, IntOp, Commutable>;
3424 multiclass N3VLIntSL_HS<bit op24, bits<4> op11_8,
3425 InstrItinClass itin, string OpcodeStr, string Dt,
3427 def v4i16 : N3VLIntSL16<op24, 0b01, op11_8, itin,
3428 OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16, IntOp>;
3429 def v2i32 : N3VLIntSL<op24, 0b10, op11_8, itin,
3430 OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, IntOp>;
3433 // ....then also with element size of 8 bits:
3434 multiclass N3VLInt_QHS<bit op24, bit op23, bits<4> op11_8, bit op4,
3435 InstrItinClass itin16, InstrItinClass itin32,
3436 string OpcodeStr, string Dt,
3437 Intrinsic IntOp, bit Commutable = 0>
3438 : N3VLInt_HS<op24, op23, op11_8, op4, itin16, itin32, OpcodeStr, Dt,
3439 IntOp, Commutable> {
3440 def v8i16 : N3VLInt<op24, op23, 0b00, op11_8, op4, itin16,
3441 OpcodeStr, !strconcat(Dt, "8"),
3442 v8i16, v8i8, IntOp, Commutable>;
3445 // ....with explicit extend (VABDL).
3446 multiclass N3VLIntExt_QHS<bit op24, bit op23, bits<4> op11_8, bit op4,
3447 InstrItinClass itin, string OpcodeStr, string Dt,
3448 Intrinsic IntOp, SDNode ExtOp, bit Commutable = 0> {
3449 def v8i16 : N3VLIntExt<op24, op23, 0b00, op11_8, op4, itin,
3450 OpcodeStr, !strconcat(Dt, "8"),
3451 v8i16, v8i8, IntOp, ExtOp, Commutable>;
3452 def v4i32 : N3VLIntExt<op24, op23, 0b01, op11_8, op4, itin,
3453 OpcodeStr, !strconcat(Dt, "16"),
3454 v4i32, v4i16, IntOp, ExtOp, Commutable>;
3455 def v2i64 : N3VLIntExt<op24, op23, 0b10, op11_8, op4, itin,
3456 OpcodeStr, !strconcat(Dt, "32"),
3457 v2i64, v2i32, IntOp, ExtOp, Commutable>;
3461 // Neon Wide 3-register vector intrinsics,
3462 // source operand element sizes of 8, 16 and 32 bits:
3463 multiclass N3VW_QHS<bit op24, bit op23, bits<4> op11_8, bit op4,
3464 string OpcodeStr, string Dt,
3465 SDNode OpNode, SDNode ExtOp, bit Commutable = 0> {
3466 def v8i16 : N3VW<op24, op23, 0b00, op11_8, op4,
3467 OpcodeStr, !strconcat(Dt, "8"),
3468 v8i16, v8i8, OpNode, ExtOp, Commutable>;
3469 def v4i32 : N3VW<op24, op23, 0b01, op11_8, op4,
3470 OpcodeStr, !strconcat(Dt, "16"),
3471 v4i32, v4i16, OpNode, ExtOp, Commutable>;
3472 def v2i64 : N3VW<op24, op23, 0b10, op11_8, op4,
3473 OpcodeStr, !strconcat(Dt, "32"),
3474 v2i64, v2i32, OpNode, ExtOp, Commutable>;
3478 // Neon Multiply-Op vector operations,
3479 // element sizes of 8, 16 and 32 bits:
3480 multiclass N3VMulOp_QHS<bit op24, bit op23, bits<4> op11_8, bit op4,
3481 InstrItinClass itinD16, InstrItinClass itinD32,
3482 InstrItinClass itinQ16, InstrItinClass itinQ32,
3483 string OpcodeStr, string Dt, SDNode OpNode> {
3484 // 64-bit vector types.
3485 def v8i8 : N3VDMulOp<op24, op23, 0b00, op11_8, op4, itinD16,
3486 OpcodeStr, !strconcat(Dt, "8"), v8i8, mul, OpNode>;
3487 def v4i16 : N3VDMulOp<op24, op23, 0b01, op11_8, op4, itinD16,
3488 OpcodeStr, !strconcat(Dt, "16"), v4i16, mul, OpNode>;
3489 def v2i32 : N3VDMulOp<op24, op23, 0b10, op11_8, op4, itinD32,
3490 OpcodeStr, !strconcat(Dt, "32"), v2i32, mul, OpNode>;
3492 // 128-bit vector types.
3493 def v16i8 : N3VQMulOp<op24, op23, 0b00, op11_8, op4, itinQ16,
3494 OpcodeStr, !strconcat(Dt, "8"), v16i8, mul, OpNode>;
3495 def v8i16 : N3VQMulOp<op24, op23, 0b01, op11_8, op4, itinQ16,
3496 OpcodeStr, !strconcat(Dt, "16"), v8i16, mul, OpNode>;
3497 def v4i32 : N3VQMulOp<op24, op23, 0b10, op11_8, op4, itinQ32,
3498 OpcodeStr, !strconcat(Dt, "32"), v4i32, mul, OpNode>;
3501 multiclass N3VMulOpSL_HS<bits<4> op11_8,
3502 InstrItinClass itinD16, InstrItinClass itinD32,
3503 InstrItinClass itinQ16, InstrItinClass itinQ32,
3504 string OpcodeStr, string Dt, SDNode ShOp> {
3505 def v4i16 : N3VDMulOpSL16<0b01, op11_8, itinD16,
3506 OpcodeStr, !strconcat(Dt, "16"), v4i16, mul, ShOp>;
3507 def v2i32 : N3VDMulOpSL<0b10, op11_8, itinD32,
3508 OpcodeStr, !strconcat(Dt, "32"), v2i32, mul, ShOp>;
3509 def v8i16 : N3VQMulOpSL16<0b01, op11_8, itinQ16,
3510 OpcodeStr, !strconcat(Dt, "16"), v8i16, v4i16,
3512 def v4i32 : N3VQMulOpSL<0b10, op11_8, itinQ32,
3513 OpcodeStr, !strconcat(Dt, "32"), v4i32, v2i32,
3517 // Neon Intrinsic-Op vector operations,
3518 // element sizes of 8, 16 and 32 bits:
3519 multiclass N3VIntOp_QHS<bit op24, bit op23, bits<4> op11_8, bit op4,
3520 InstrItinClass itinD, InstrItinClass itinQ,
3521 string OpcodeStr, string Dt, Intrinsic IntOp,
3523 // 64-bit vector types.
3524 def v8i8 : N3VDIntOp<op24, op23, 0b00, op11_8, op4, itinD,
3525 OpcodeStr, !strconcat(Dt, "8"), v8i8, IntOp, OpNode>;
3526 def v4i16 : N3VDIntOp<op24, op23, 0b01, op11_8, op4, itinD,
3527 OpcodeStr, !strconcat(Dt, "16"), v4i16, IntOp, OpNode>;
3528 def v2i32 : N3VDIntOp<op24, op23, 0b10, op11_8, op4, itinD,
3529 OpcodeStr, !strconcat(Dt, "32"), v2i32, IntOp, OpNode>;
3531 // 128-bit vector types.
3532 def v16i8 : N3VQIntOp<op24, op23, 0b00, op11_8, op4, itinQ,
3533 OpcodeStr, !strconcat(Dt, "8"), v16i8, IntOp, OpNode>;
3534 def v8i16 : N3VQIntOp<op24, op23, 0b01, op11_8, op4, itinQ,
3535 OpcodeStr, !strconcat(Dt, "16"), v8i16, IntOp, OpNode>;
3536 def v4i32 : N3VQIntOp<op24, op23, 0b10, op11_8, op4, itinQ,
3537 OpcodeStr, !strconcat(Dt, "32"), v4i32, IntOp, OpNode>;
3540 // Neon 3-argument intrinsics,
3541 // element sizes of 8, 16 and 32 bits:
3542 multiclass N3VInt3_QHS<bit op24, bit op23, bits<4> op11_8, bit op4,
3543 InstrItinClass itinD, InstrItinClass itinQ,
3544 string OpcodeStr, string Dt, Intrinsic IntOp> {
3545 // 64-bit vector types.
3546 def v8i8 : N3VDInt3<op24, op23, 0b00, op11_8, op4, itinD,
3547 OpcodeStr, !strconcat(Dt, "8"), v8i8, v8i8, IntOp>;
3548 def v4i16 : N3VDInt3<op24, op23, 0b01, op11_8, op4, itinD,
3549 OpcodeStr, !strconcat(Dt, "16"), v4i16, v4i16, IntOp>;
3550 def v2i32 : N3VDInt3<op24, op23, 0b10, op11_8, op4, itinD,
3551 OpcodeStr, !strconcat(Dt, "32"), v2i32, v2i32, IntOp>;
3553 // 128-bit vector types.
3554 def v16i8 : N3VQInt3<op24, op23, 0b00, op11_8, op4, itinQ,
3555 OpcodeStr, !strconcat(Dt, "8"), v16i8, v16i8, IntOp>;
3556 def v8i16 : N3VQInt3<op24, op23, 0b01, op11_8, op4, itinQ,
3557 OpcodeStr, !strconcat(Dt, "16"), v8i16, v8i16, IntOp>;
3558 def v4i32 : N3VQInt3<op24, op23, 0b10, op11_8, op4, itinQ,
3559 OpcodeStr, !strconcat(Dt, "32"), v4i32, v4i32, IntOp>;
3563 // Neon Long Multiply-Op vector operations,
3564 // element sizes of 8, 16 and 32 bits:
3565 multiclass N3VLMulOp_QHS<bit op24, bit op23, bits<4> op11_8, bit op4,
3566 InstrItinClass itin16, InstrItinClass itin32,
3567 string OpcodeStr, string Dt, SDNode MulOp,
3569 def v8i16 : N3VLMulOp<op24, op23, 0b00, op11_8, op4, itin16, OpcodeStr,
3570 !strconcat(Dt, "8"), v8i16, v8i8, MulOp, OpNode>;
3571 def v4i32 : N3VLMulOp<op24, op23, 0b01, op11_8, op4, itin16, OpcodeStr,
3572 !strconcat(Dt, "16"), v4i32, v4i16, MulOp, OpNode>;
3573 def v2i64 : N3VLMulOp<op24, op23, 0b10, op11_8, op4, itin32, OpcodeStr,
3574 !strconcat(Dt, "32"), v2i64, v2i32, MulOp, OpNode>;
3577 multiclass N3VLMulOpSL_HS<bit op24, bits<4> op11_8, string OpcodeStr,
3578 string Dt, SDNode MulOp, SDNode OpNode> {
3579 def v4i16 : N3VLMulOpSL16<op24, 0b01, op11_8, IIC_VMACi16D, OpcodeStr,
3580 !strconcat(Dt,"16"), v4i32, v4i16, MulOp, OpNode>;
3581 def v2i32 : N3VLMulOpSL<op24, 0b10, op11_8, IIC_VMACi32D, OpcodeStr,
3582 !strconcat(Dt, "32"), v2i64, v2i32, MulOp, OpNode>;
3586 // Neon Long 3-argument intrinsics.
3588 // First with only element sizes of 16 and 32 bits:
3589 multiclass N3VLInt3_HS<bit op24, bit op23, bits<4> op11_8, bit op4,
3590 InstrItinClass itin16, InstrItinClass itin32,
3591 string OpcodeStr, string Dt, Intrinsic IntOp> {
3592 def v4i32 : N3VLInt3<op24, op23, 0b01, op11_8, op4, itin16,
3593 OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16, IntOp>;
3594 def v2i64 : N3VLInt3<op24, op23, 0b10, op11_8, op4, itin32,
3595 OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, IntOp>;
3598 multiclass N3VLInt3SL_HS<bit op24, bits<4> op11_8,
3599 string OpcodeStr, string Dt, Intrinsic IntOp> {
3600 def v4i16 : N3VLInt3SL16<op24, 0b01, op11_8, IIC_VMACi16D,
3601 OpcodeStr, !strconcat(Dt,"16"), v4i32, v4i16, IntOp>;
3602 def v2i32 : N3VLInt3SL<op24, 0b10, op11_8, IIC_VMACi32D,
3603 OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, IntOp>;
3606 // ....then also with element size of 8 bits:
3607 multiclass N3VLInt3_QHS<bit op24, bit op23, bits<4> op11_8, bit op4,
3608 InstrItinClass itin16, InstrItinClass itin32,
3609 string OpcodeStr, string Dt, Intrinsic IntOp>
3610 : N3VLInt3_HS<op24, op23, op11_8, op4, itin16, itin32, OpcodeStr, Dt, IntOp> {
3611 def v8i16 : N3VLInt3<op24, op23, 0b00, op11_8, op4, itin16,
3612 OpcodeStr, !strconcat(Dt, "8"), v8i16, v8i8, IntOp>;
3615 // ....with explicit extend (VABAL).
3616 multiclass N3VLIntExtOp_QHS<bit op24, bit op23, bits<4> op11_8, bit op4,
3617 InstrItinClass itin, string OpcodeStr, string Dt,
3618 Intrinsic IntOp, SDNode ExtOp, SDNode OpNode> {
3619 def v8i16 : N3VLIntExtOp<op24, op23, 0b00, op11_8, op4, itin,
3620 OpcodeStr, !strconcat(Dt, "8"), v8i16, v8i8,
3621 IntOp, ExtOp, OpNode>;
3622 def v4i32 : N3VLIntExtOp<op24, op23, 0b01, op11_8, op4, itin,
3623 OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16,
3624 IntOp, ExtOp, OpNode>;
3625 def v2i64 : N3VLIntExtOp<op24, op23, 0b10, op11_8, op4, itin,
3626 OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32,
3627 IntOp, ExtOp, OpNode>;
3631 // Neon Pairwise long 2-register intrinsics,
3632 // element sizes of 8, 16 and 32 bits:
3633 multiclass N2VPLInt_QHS<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16,
3634 bits<5> op11_7, bit op4,
3635 string OpcodeStr, string Dt, Intrinsic IntOp> {
3636 // 64-bit vector types.
3637 def v8i8 : N2VDPLInt<op24_23, op21_20, 0b00, op17_16, op11_7, op4,
3638 OpcodeStr, !strconcat(Dt, "8"), v4i16, v8i8, IntOp>;
3639 def v4i16 : N2VDPLInt<op24_23, op21_20, 0b01, op17_16, op11_7, op4,
3640 OpcodeStr, !strconcat(Dt, "16"), v2i32, v4i16, IntOp>;
3641 def v2i32 : N2VDPLInt<op24_23, op21_20, 0b10, op17_16, op11_7, op4,
3642 OpcodeStr, !strconcat(Dt, "32"), v1i64, v2i32, IntOp>;
3644 // 128-bit vector types.
3645 def v16i8 : N2VQPLInt<op24_23, op21_20, 0b00, op17_16, op11_7, op4,
3646 OpcodeStr, !strconcat(Dt, "8"), v8i16, v16i8, IntOp>;
3647 def v8i16 : N2VQPLInt<op24_23, op21_20, 0b01, op17_16, op11_7, op4,
3648 OpcodeStr, !strconcat(Dt, "16"), v4i32, v8i16, IntOp>;
3649 def v4i32 : N2VQPLInt<op24_23, op21_20, 0b10, op17_16, op11_7, op4,
3650 OpcodeStr, !strconcat(Dt, "32"), v2i64, v4i32, IntOp>;
3654 // Neon Pairwise long 2-register accumulate intrinsics,
3655 // element sizes of 8, 16 and 32 bits:
3656 multiclass N2VPLInt2_QHS<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16,
3657 bits<5> op11_7, bit op4,
3658 string OpcodeStr, string Dt, Intrinsic IntOp> {
3659 // 64-bit vector types.
3660 def v8i8 : N2VDPLInt2<op24_23, op21_20, 0b00, op17_16, op11_7, op4,
3661 OpcodeStr, !strconcat(Dt, "8"), v4i16, v8i8, IntOp>;
3662 def v4i16 : N2VDPLInt2<op24_23, op21_20, 0b01, op17_16, op11_7, op4,
3663 OpcodeStr, !strconcat(Dt, "16"), v2i32, v4i16, IntOp>;
3664 def v2i32 : N2VDPLInt2<op24_23, op21_20, 0b10, op17_16, op11_7, op4,
3665 OpcodeStr, !strconcat(Dt, "32"), v1i64, v2i32, IntOp>;
3667 // 128-bit vector types.
3668 def v16i8 : N2VQPLInt2<op24_23, op21_20, 0b00, op17_16, op11_7, op4,
3669 OpcodeStr, !strconcat(Dt, "8"), v8i16, v16i8, IntOp>;
3670 def v8i16 : N2VQPLInt2<op24_23, op21_20, 0b01, op17_16, op11_7, op4,
3671 OpcodeStr, !strconcat(Dt, "16"), v4i32, v8i16, IntOp>;
3672 def v4i32 : N2VQPLInt2<op24_23, op21_20, 0b10, op17_16, op11_7, op4,
3673 OpcodeStr, !strconcat(Dt, "32"), v2i64, v4i32, IntOp>;
3677 // Neon 2-register vector shift by immediate,
3678 // with f of either N2RegVShLFrm or N2RegVShRFrm
3679 // element sizes of 8, 16, 32 and 64 bits:
3680 multiclass N2VShL_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4,
3681 InstrItinClass itin, string OpcodeStr, string Dt,
3683 // 64-bit vector types.
3684 def v8i8 : N2VDSh<op24, op23, op11_8, 0, op4, N2RegVShLFrm, itin, i32imm,
3685 OpcodeStr, !strconcat(Dt, "8"), v8i8, OpNode> {
3686 let Inst{21-19} = 0b001; // imm6 = 001xxx
3688 def v4i16 : N2VDSh<op24, op23, op11_8, 0, op4, N2RegVShLFrm, itin, i32imm,
3689 OpcodeStr, !strconcat(Dt, "16"), v4i16, OpNode> {
3690 let Inst{21-20} = 0b01; // imm6 = 01xxxx
3692 def v2i32 : N2VDSh<op24, op23, op11_8, 0, op4, N2RegVShLFrm, itin, i32imm,
3693 OpcodeStr, !strconcat(Dt, "32"), v2i32, OpNode> {
3694 let Inst{21} = 0b1; // imm6 = 1xxxxx
3696 def v1i64 : N2VDSh<op24, op23, op11_8, 1, op4, N2RegVShLFrm, itin, i32imm,
3697 OpcodeStr, !strconcat(Dt, "64"), v1i64, OpNode>;
3700 // 128-bit vector types.
3701 def v16i8 : N2VQSh<op24, op23, op11_8, 0, op4, N2RegVShLFrm, itin, i32imm,
3702 OpcodeStr, !strconcat(Dt, "8"), v16i8, OpNode> {
3703 let Inst{21-19} = 0b001; // imm6 = 001xxx
3705 def v8i16 : N2VQSh<op24, op23, op11_8, 0, op4, N2RegVShLFrm, itin, i32imm,
3706 OpcodeStr, !strconcat(Dt, "16"), v8i16, OpNode> {
3707 let Inst{21-20} = 0b01; // imm6 = 01xxxx
3709 def v4i32 : N2VQSh<op24, op23, op11_8, 0, op4, N2RegVShLFrm, itin, i32imm,
3710 OpcodeStr, !strconcat(Dt, "32"), v4i32, OpNode> {
3711 let Inst{21} = 0b1; // imm6 = 1xxxxx
3713 def v2i64 : N2VQSh<op24, op23, op11_8, 1, op4, N2RegVShLFrm, itin, i32imm,
3714 OpcodeStr, !strconcat(Dt, "64"), v2i64, OpNode>;
3717 multiclass N2VShR_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4,
3718 InstrItinClass itin, string OpcodeStr, string Dt,
3720 // 64-bit vector types.
3721 def v8i8 : N2VDSh<op24, op23, op11_8, 0, op4, N2RegVShRFrm, itin, shr_imm8,
3722 OpcodeStr, !strconcat(Dt, "8"), v8i8, OpNode> {
3723 let Inst{21-19} = 0b001; // imm6 = 001xxx
3725 def v4i16 : N2VDSh<op24, op23, op11_8, 0, op4, N2RegVShRFrm, itin, shr_imm16,
3726 OpcodeStr, !strconcat(Dt, "16"), v4i16, OpNode> {
3727 let Inst{21-20} = 0b01; // imm6 = 01xxxx
3729 def v2i32 : N2VDSh<op24, op23, op11_8, 0, op4, N2RegVShRFrm, itin, shr_imm32,
3730 OpcodeStr, !strconcat(Dt, "32"), v2i32, OpNode> {
3731 let Inst{21} = 0b1; // imm6 = 1xxxxx
3733 def v1i64 : N2VDSh<op24, op23, op11_8, 1, op4, N2RegVShRFrm, itin, shr_imm64,
3734 OpcodeStr, !strconcat(Dt, "64"), v1i64, OpNode>;
3737 // 128-bit vector types.
3738 def v16i8 : N2VQSh<op24, op23, op11_8, 0, op4, N2RegVShRFrm, itin, shr_imm8,
3739 OpcodeStr, !strconcat(Dt, "8"), v16i8, OpNode> {
3740 let Inst{21-19} = 0b001; // imm6 = 001xxx
3742 def v8i16 : N2VQSh<op24, op23, op11_8, 0, op4, N2RegVShRFrm, itin, shr_imm16,
3743 OpcodeStr, !strconcat(Dt, "16"), v8i16, OpNode> {
3744 let Inst{21-20} = 0b01; // imm6 = 01xxxx
3746 def v4i32 : N2VQSh<op24, op23, op11_8, 0, op4, N2RegVShRFrm, itin, shr_imm32,
3747 OpcodeStr, !strconcat(Dt, "32"), v4i32, OpNode> {
3748 let Inst{21} = 0b1; // imm6 = 1xxxxx
3750 def v2i64 : N2VQSh<op24, op23, op11_8, 1, op4, N2RegVShRFrm, itin, shr_imm64,
3751 OpcodeStr, !strconcat(Dt, "64"), v2i64, OpNode>;
3755 // Neon Shift-Accumulate vector operations,
3756 // element sizes of 8, 16, 32 and 64 bits:
3757 multiclass N2VShAdd_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4,
3758 string OpcodeStr, string Dt, SDNode ShOp> {
3759 // 64-bit vector types.
3760 def v8i8 : N2VDShAdd<op24, op23, op11_8, 0, op4, shr_imm8,
3761 OpcodeStr, !strconcat(Dt, "8"), v8i8, ShOp> {
3762 let Inst{21-19} = 0b001; // imm6 = 001xxx
3764 def v4i16 : N2VDShAdd<op24, op23, op11_8, 0, op4, shr_imm16,
3765 OpcodeStr, !strconcat(Dt, "16"), v4i16, ShOp> {
3766 let Inst{21-20} = 0b01; // imm6 = 01xxxx
3768 def v2i32 : N2VDShAdd<op24, op23, op11_8, 0, op4, shr_imm32,
3769 OpcodeStr, !strconcat(Dt, "32"), v2i32, ShOp> {
3770 let Inst{21} = 0b1; // imm6 = 1xxxxx
3772 def v1i64 : N2VDShAdd<op24, op23, op11_8, 1, op4, shr_imm64,
3773 OpcodeStr, !strconcat(Dt, "64"), v1i64, ShOp>;
3776 // 128-bit vector types.
3777 def v16i8 : N2VQShAdd<op24, op23, op11_8, 0, op4, shr_imm8,
3778 OpcodeStr, !strconcat(Dt, "8"), v16i8, ShOp> {
3779 let Inst{21-19} = 0b001; // imm6 = 001xxx
3781 def v8i16 : N2VQShAdd<op24, op23, op11_8, 0, op4, shr_imm16,
3782 OpcodeStr, !strconcat(Dt, "16"), v8i16, ShOp> {
3783 let Inst{21-20} = 0b01; // imm6 = 01xxxx
3785 def v4i32 : N2VQShAdd<op24, op23, op11_8, 0, op4, shr_imm32,
3786 OpcodeStr, !strconcat(Dt, "32"), v4i32, ShOp> {
3787 let Inst{21} = 0b1; // imm6 = 1xxxxx
3789 def v2i64 : N2VQShAdd<op24, op23, op11_8, 1, op4, shr_imm64,
3790 OpcodeStr, !strconcat(Dt, "64"), v2i64, ShOp>;
3794 // Neon Shift-Insert vector operations,
3795 // with f of either N2RegVShLFrm or N2RegVShRFrm
3796 // element sizes of 8, 16, 32 and 64 bits:
3797 multiclass N2VShInsL_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4,
3799 // 64-bit vector types.
3800 def v8i8 : N2VDShIns<op24, op23, op11_8, 0, op4, i32imm,
3801 N2RegVShLFrm, OpcodeStr, "8", v8i8, NEONvsli> {
3802 let Inst{21-19} = 0b001; // imm6 = 001xxx
3804 def v4i16 : N2VDShIns<op24, op23, op11_8, 0, op4, i32imm,
3805 N2RegVShLFrm, OpcodeStr, "16", v4i16, NEONvsli> {
3806 let Inst{21-20} = 0b01; // imm6 = 01xxxx
3808 def v2i32 : N2VDShIns<op24, op23, op11_8, 0, op4, i32imm,
3809 N2RegVShLFrm, OpcodeStr, "32", v2i32, NEONvsli> {
3810 let Inst{21} = 0b1; // imm6 = 1xxxxx
3812 def v1i64 : N2VDShIns<op24, op23, op11_8, 1, op4, i32imm,
3813 N2RegVShLFrm, OpcodeStr, "64", v1i64, NEONvsli>;
3816 // 128-bit vector types.
3817 def v16i8 : N2VQShIns<op24, op23, op11_8, 0, op4, i32imm,
3818 N2RegVShLFrm, OpcodeStr, "8", v16i8, NEONvsli> {
3819 let Inst{21-19} = 0b001; // imm6 = 001xxx
3821 def v8i16 : N2VQShIns<op24, op23, op11_8, 0, op4, i32imm,
3822 N2RegVShLFrm, OpcodeStr, "16", v8i16, NEONvsli> {
3823 let Inst{21-20} = 0b01; // imm6 = 01xxxx
3825 def v4i32 : N2VQShIns<op24, op23, op11_8, 0, op4, i32imm,
3826 N2RegVShLFrm, OpcodeStr, "32", v4i32, NEONvsli> {
3827 let Inst{21} = 0b1; // imm6 = 1xxxxx
3829 def v2i64 : N2VQShIns<op24, op23, op11_8, 1, op4, i32imm,
3830 N2RegVShLFrm, OpcodeStr, "64", v2i64, NEONvsli>;
3833 multiclass N2VShInsR_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4,
3835 // 64-bit vector types.
3836 def v8i8 : N2VDShIns<op24, op23, op11_8, 0, op4, shr_imm8,
3837 N2RegVShRFrm, OpcodeStr, "8", v8i8, NEONvsri> {
3838 let Inst{21-19} = 0b001; // imm6 = 001xxx
3840 def v4i16 : N2VDShIns<op24, op23, op11_8, 0, op4, shr_imm16,
3841 N2RegVShRFrm, OpcodeStr, "16", v4i16, NEONvsri> {
3842 let Inst{21-20} = 0b01; // imm6 = 01xxxx
3844 def v2i32 : N2VDShIns<op24, op23, op11_8, 0, op4, shr_imm32,
3845 N2RegVShRFrm, OpcodeStr, "32", v2i32, NEONvsri> {
3846 let Inst{21} = 0b1; // imm6 = 1xxxxx
3848 def v1i64 : N2VDShIns<op24, op23, op11_8, 1, op4, shr_imm64,
3849 N2RegVShRFrm, OpcodeStr, "64", v1i64, NEONvsri>;
3852 // 128-bit vector types.
3853 def v16i8 : N2VQShIns<op24, op23, op11_8, 0, op4, shr_imm8,
3854 N2RegVShRFrm, OpcodeStr, "8", v16i8, NEONvsri> {
3855 let Inst{21-19} = 0b001; // imm6 = 001xxx
3857 def v8i16 : N2VQShIns<op24, op23, op11_8, 0, op4, shr_imm16,
3858 N2RegVShRFrm, OpcodeStr, "16", v8i16, NEONvsri> {
3859 let Inst{21-20} = 0b01; // imm6 = 01xxxx
3861 def v4i32 : N2VQShIns<op24, op23, op11_8, 0, op4, shr_imm32,
3862 N2RegVShRFrm, OpcodeStr, "32", v4i32, NEONvsri> {
3863 let Inst{21} = 0b1; // imm6 = 1xxxxx
3865 def v2i64 : N2VQShIns<op24, op23, op11_8, 1, op4, shr_imm64,
3866 N2RegVShRFrm, OpcodeStr, "64", v2i64, NEONvsri>;
3870 // Neon Shift Long operations,
3871 // element sizes of 8, 16, 32 bits:
3872 multiclass N2VLSh_QHS<bit op24, bit op23, bits<4> op11_8, bit op7, bit op6,
3873 bit op4, string OpcodeStr, string Dt, SDNode OpNode> {
3874 def v8i16 : N2VLSh<op24, op23, op11_8, op7, op6, op4,
3875 OpcodeStr, !strconcat(Dt, "8"), v8i16, v8i8, imm1_7, OpNode> {
3876 let Inst{21-19} = 0b001; // imm6 = 001xxx
3878 def v4i32 : N2VLSh<op24, op23, op11_8, op7, op6, op4,
3879 OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16, imm1_15, OpNode> {
3880 let Inst{21-20} = 0b01; // imm6 = 01xxxx
3882 def v2i64 : N2VLSh<op24, op23, op11_8, op7, op6, op4,
3883 OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, imm1_31, OpNode> {
3884 let Inst{21} = 0b1; // imm6 = 1xxxxx
3888 // Neon Shift Narrow operations,
3889 // element sizes of 16, 32, 64 bits:
3890 multiclass N2VNSh_HSD<bit op24, bit op23, bits<4> op11_8, bit op7, bit op6,
3891 bit op4, InstrItinClass itin, string OpcodeStr, string Dt,
3893 def v8i8 : N2VNSh<op24, op23, op11_8, op7, op6, op4, itin,
3894 OpcodeStr, !strconcat(Dt, "16"),
3895 v8i8, v8i16, shr_imm8, OpNode> {
3896 let Inst{21-19} = 0b001; // imm6 = 001xxx
3898 def v4i16 : N2VNSh<op24, op23, op11_8, op7, op6, op4, itin,
3899 OpcodeStr, !strconcat(Dt, "32"),
3900 v4i16, v4i32, shr_imm16, OpNode> {
3901 let Inst{21-20} = 0b01; // imm6 = 01xxxx
3903 def v2i32 : N2VNSh<op24, op23, op11_8, op7, op6, op4, itin,
3904 OpcodeStr, !strconcat(Dt, "64"),
3905 v2i32, v2i64, shr_imm32, OpNode> {
3906 let Inst{21} = 0b1; // imm6 = 1xxxxx
3910 //===----------------------------------------------------------------------===//
3911 // Instruction Definitions.
3912 //===----------------------------------------------------------------------===//
3914 // Vector Add Operations.
3916 // VADD : Vector Add (integer and floating-point)
3917 defm VADD : N3V_QHSD<0, 0, 0b1000, 0, IIC_VBINiD, IIC_VBINiQ, "vadd", "i",
3919 def VADDfd : N3VD<0, 0, 0b00, 0b1101, 0, IIC_VBIND, "vadd", "f32",
3920 v2f32, v2f32, fadd, 1>;
3921 def VADDfq : N3VQ<0, 0, 0b00, 0b1101, 0, IIC_VBINQ, "vadd", "f32",
3922 v4f32, v4f32, fadd, 1>;
3923 // VADDL : Vector Add Long (Q = D + D)
3924 defm VADDLs : N3VLExt_QHS<0,1,0b0000,0, IIC_VSHLiD, IIC_VSHLiD,
3925 "vaddl", "s", add, sext, 1>;
3926 defm VADDLu : N3VLExt_QHS<1,1,0b0000,0, IIC_VSHLiD, IIC_VSHLiD,
3927 "vaddl", "u", add, zext, 1>;
3928 // VADDW : Vector Add Wide (Q = Q + D)
3929 defm VADDWs : N3VW_QHS<0,1,0b0001,0, "vaddw", "s", add, sext, 0>;
3930 defm VADDWu : N3VW_QHS<1,1,0b0001,0, "vaddw", "u", add, zext, 0>;
3931 // VHADD : Vector Halving Add
3932 defm VHADDs : N3VInt_QHS<0, 0, 0b0000, 0, N3RegFrm,
3933 IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, IIC_VBINi4Q,
3934 "vhadd", "s", int_arm_neon_vhadds, 1>;
3935 defm VHADDu : N3VInt_QHS<1, 0, 0b0000, 0, N3RegFrm,
3936 IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, IIC_VBINi4Q,
3937 "vhadd", "u", int_arm_neon_vhaddu, 1>;
3938 // VRHADD : Vector Rounding Halving Add
3939 defm VRHADDs : N3VInt_QHS<0, 0, 0b0001, 0, N3RegFrm,
3940 IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, IIC_VBINi4Q,
3941 "vrhadd", "s", int_arm_neon_vrhadds, 1>;
3942 defm VRHADDu : N3VInt_QHS<1, 0, 0b0001, 0, N3RegFrm,
3943 IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, IIC_VBINi4Q,
3944 "vrhadd", "u", int_arm_neon_vrhaddu, 1>;
3945 // VQADD : Vector Saturating Add
3946 defm VQADDs : N3VInt_QHSD<0, 0, 0b0000, 1, N3RegFrm,
3947 IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, IIC_VBINi4Q,
3948 "vqadd", "s", int_arm_neon_vqadds, 1>;
3949 defm VQADDu : N3VInt_QHSD<1, 0, 0b0000, 1, N3RegFrm,
3950 IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, IIC_VBINi4Q,
3951 "vqadd", "u", int_arm_neon_vqaddu, 1>;
3952 // VADDHN : Vector Add and Narrow Returning High Half (D = Q + Q)
3953 defm VADDHN : N3VNInt_HSD<0,1,0b0100,0, "vaddhn", "i",
3954 int_arm_neon_vaddhn, 1>;
3955 // VRADDHN : Vector Rounding Add and Narrow Returning High Half (D = Q + Q)
3956 defm VRADDHN : N3VNInt_HSD<1,1,0b0100,0, "vraddhn", "i",
3957 int_arm_neon_vraddhn, 1>;
3959 // Vector Multiply Operations.
3961 // VMUL : Vector Multiply (integer, polynomial and floating-point)
3962 defm VMUL : N3V_QHS<0, 0, 0b1001, 1, IIC_VMULi16D, IIC_VMULi32D,
3963 IIC_VMULi16Q, IIC_VMULi32Q, "vmul", "i", mul, 1>;
3964 def VMULpd : N3VDInt<1, 0, 0b00, 0b1001, 1, N3RegFrm, IIC_VMULi16D, "vmul",
3965 "p8", v8i8, v8i8, int_arm_neon_vmulp, 1>;
3966 def VMULpq : N3VQInt<1, 0, 0b00, 0b1001, 1, N3RegFrm, IIC_VMULi16Q, "vmul",
3967 "p8", v16i8, v16i8, int_arm_neon_vmulp, 1>;
3968 def VMULfd : N3VD<1, 0, 0b00, 0b1101, 1, IIC_VFMULD, "vmul", "f32",
3969 v2f32, v2f32, fmul, 1>;
3970 def VMULfq : N3VQ<1, 0, 0b00, 0b1101, 1, IIC_VFMULQ, "vmul", "f32",
3971 v4f32, v4f32, fmul, 1>;
3972 defm VMULsl : N3VSL_HS<0b1000, "vmul", mul>;
3973 def VMULslfd : N3VDSL<0b10, 0b1001, IIC_VBIND, "vmul", "f32", v2f32, fmul>;
3974 def VMULslfq : N3VQSL<0b10, 0b1001, IIC_VBINQ, "vmul", "f32", v4f32,
3977 def : Pat<(v8i16 (mul (v8i16 QPR:$src1),
3978 (v8i16 (NEONvduplane (v8i16 QPR:$src2), imm:$lane)))),
3979 (v8i16 (VMULslv8i16 (v8i16 QPR:$src1),
3980 (v4i16 (EXTRACT_SUBREG QPR:$src2,
3981 (DSubReg_i16_reg imm:$lane))),
3982 (SubReg_i16_lane imm:$lane)))>;
3983 def : Pat<(v4i32 (mul (v4i32 QPR:$src1),
3984 (v4i32 (NEONvduplane (v4i32 QPR:$src2), imm:$lane)))),
3985 (v4i32 (VMULslv4i32 (v4i32 QPR:$src1),
3986 (v2i32 (EXTRACT_SUBREG QPR:$src2,
3987 (DSubReg_i32_reg imm:$lane))),
3988 (SubReg_i32_lane imm:$lane)))>;
3989 def : Pat<(v4f32 (fmul (v4f32 QPR:$src1),
3990 (v4f32 (NEONvduplane (v4f32 QPR:$src2), imm:$lane)))),
3991 (v4f32 (VMULslfq (v4f32 QPR:$src1),
3992 (v2f32 (EXTRACT_SUBREG QPR:$src2,
3993 (DSubReg_i32_reg imm:$lane))),
3994 (SubReg_i32_lane imm:$lane)))>;
3996 // VQDMULH : Vector Saturating Doubling Multiply Returning High Half
3997 defm VQDMULH : N3VInt_HS<0, 0, 0b1011, 0, N3RegFrm, IIC_VMULi16D, IIC_VMULi32D,
3998 IIC_VMULi16Q, IIC_VMULi32Q,
3999 "vqdmulh", "s", int_arm_neon_vqdmulh, 1>;
4000 defm VQDMULHsl: N3VIntSL_HS<0b1100, IIC_VMULi16D, IIC_VMULi32D,
4001 IIC_VMULi16Q, IIC_VMULi32Q,
4002 "vqdmulh", "s", int_arm_neon_vqdmulh>;
4003 def : Pat<(v8i16 (int_arm_neon_vqdmulh (v8i16 QPR:$src1),
4004 (v8i16 (NEONvduplane (v8i16 QPR:$src2),
4006 (v8i16 (VQDMULHslv8i16 (v8i16 QPR:$src1),
4007 (v4i16 (EXTRACT_SUBREG QPR:$src2,
4008 (DSubReg_i16_reg imm:$lane))),
4009 (SubReg_i16_lane imm:$lane)))>;
4010 def : Pat<(v4i32 (int_arm_neon_vqdmulh (v4i32 QPR:$src1),
4011 (v4i32 (NEONvduplane (v4i32 QPR:$src2),
4013 (v4i32 (VQDMULHslv4i32 (v4i32 QPR:$src1),
4014 (v2i32 (EXTRACT_SUBREG QPR:$src2,
4015 (DSubReg_i32_reg imm:$lane))),
4016 (SubReg_i32_lane imm:$lane)))>;
4018 // VQRDMULH : Vector Rounding Saturating Doubling Multiply Returning High Half
4019 defm VQRDMULH : N3VInt_HS<1, 0, 0b1011, 0, N3RegFrm,
4020 IIC_VMULi16D,IIC_VMULi32D,IIC_VMULi16Q,IIC_VMULi32Q,
4021 "vqrdmulh", "s", int_arm_neon_vqrdmulh, 1>;
4022 defm VQRDMULHsl : N3VIntSL_HS<0b1101, IIC_VMULi16D, IIC_VMULi32D,
4023 IIC_VMULi16Q, IIC_VMULi32Q,
4024 "vqrdmulh", "s", int_arm_neon_vqrdmulh>;
4025 def : Pat<(v8i16 (int_arm_neon_vqrdmulh (v8i16 QPR:$src1),
4026 (v8i16 (NEONvduplane (v8i16 QPR:$src2),
4028 (v8i16 (VQRDMULHslv8i16 (v8i16 QPR:$src1),
4029 (v4i16 (EXTRACT_SUBREG QPR:$src2,
4030 (DSubReg_i16_reg imm:$lane))),
4031 (SubReg_i16_lane imm:$lane)))>;
4032 def : Pat<(v4i32 (int_arm_neon_vqrdmulh (v4i32 QPR:$src1),
4033 (v4i32 (NEONvduplane (v4i32 QPR:$src2),
4035 (v4i32 (VQRDMULHslv4i32 (v4i32 QPR:$src1),
4036 (v2i32 (EXTRACT_SUBREG QPR:$src2,
4037 (DSubReg_i32_reg imm:$lane))),
4038 (SubReg_i32_lane imm:$lane)))>;
4040 // VMULL : Vector Multiply Long (integer and polynomial) (Q = D * D)
4041 defm VMULLs : N3VL_QHS<0,1,0b1100,0, IIC_VMULi16D, IIC_VMULi32D,
4042 "vmull", "s", NEONvmulls, 1>;
4043 defm VMULLu : N3VL_QHS<1,1,0b1100,0, IIC_VMULi16D, IIC_VMULi32D,
4044 "vmull", "u", NEONvmullu, 1>;
4045 def VMULLp : N3VLInt<0, 1, 0b00, 0b1110, 0, IIC_VMULi16D, "vmull", "p8",
4046 v8i16, v8i8, int_arm_neon_vmullp, 1>;
4047 defm VMULLsls : N3VLSL_HS<0, 0b1010, IIC_VMULi16D, "vmull", "s", NEONvmulls>;
4048 defm VMULLslu : N3VLSL_HS<1, 0b1010, IIC_VMULi16D, "vmull", "u", NEONvmullu>;
4050 // VQDMULL : Vector Saturating Doubling Multiply Long (Q = D * D)
4051 defm VQDMULL : N3VLInt_HS<0,1,0b1101,0, IIC_VMULi16D, IIC_VMULi32D,
4052 "vqdmull", "s", int_arm_neon_vqdmull, 1>;
4053 defm VQDMULLsl: N3VLIntSL_HS<0, 0b1011, IIC_VMULi16D,
4054 "vqdmull", "s", int_arm_neon_vqdmull>;
4056 // Vector Multiply-Accumulate and Multiply-Subtract Operations.
4058 // VMLA : Vector Multiply Accumulate (integer and floating-point)
4059 defm VMLA : N3VMulOp_QHS<0, 0, 0b1001, 0, IIC_VMACi16D, IIC_VMACi32D,
4060 IIC_VMACi16Q, IIC_VMACi32Q, "vmla", "i", add>;
4061 def VMLAfd : N3VDMulOp<0, 0, 0b00, 0b1101, 1, IIC_VMACD, "vmla", "f32",
4062 v2f32, fmul_su, fadd_mlx>,
4063 Requires<[HasNEON, UseFPVMLx, NoNEONVFP4]>;
4064 def VMLAfq : N3VQMulOp<0, 0, 0b00, 0b1101, 1, IIC_VMACQ, "vmla", "f32",
4065 v4f32, fmul_su, fadd_mlx>,
4066 Requires<[HasNEON, UseFPVMLx, NoNEONVFP4]>;
4067 defm VMLAsl : N3VMulOpSL_HS<0b0000, IIC_VMACi16D, IIC_VMACi32D,
4068 IIC_VMACi16Q, IIC_VMACi32Q, "vmla", "i", add>;
4069 def VMLAslfd : N3VDMulOpSL<0b10, 0b0001, IIC_VMACD, "vmla", "f32",
4070 v2f32, fmul_su, fadd_mlx>,
4071 Requires<[HasNEON, UseFPVMLx]>;
4072 def VMLAslfq : N3VQMulOpSL<0b10, 0b0001, IIC_VMACQ, "vmla", "f32",
4073 v4f32, v2f32, fmul_su, fadd_mlx>,
4074 Requires<[HasNEON, UseFPVMLx]>;
4076 def : Pat<(v8i16 (add (v8i16 QPR:$src1),
4077 (mul (v8i16 QPR:$src2),
4078 (v8i16 (NEONvduplane (v8i16 QPR:$src3), imm:$lane))))),
4079 (v8i16 (VMLAslv8i16 (v8i16 QPR:$src1), (v8i16 QPR:$src2),
4080 (v4i16 (EXTRACT_SUBREG QPR:$src3,
4081 (DSubReg_i16_reg imm:$lane))),
4082 (SubReg_i16_lane imm:$lane)))>;
4084 def : Pat<(v4i32 (add (v4i32 QPR:$src1),
4085 (mul (v4i32 QPR:$src2),
4086 (v4i32 (NEONvduplane (v4i32 QPR:$src3), imm:$lane))))),
4087 (v4i32 (VMLAslv4i32 (v4i32 QPR:$src1), (v4i32 QPR:$src2),
4088 (v2i32 (EXTRACT_SUBREG QPR:$src3,
4089 (DSubReg_i32_reg imm:$lane))),
4090 (SubReg_i32_lane imm:$lane)))>;
4092 def : Pat<(v4f32 (fadd_mlx (v4f32 QPR:$src1),
4093 (fmul_su (v4f32 QPR:$src2),
4094 (v4f32 (NEONvduplane (v4f32 QPR:$src3), imm:$lane))))),
4095 (v4f32 (VMLAslfq (v4f32 QPR:$src1),
4097 (v2f32 (EXTRACT_SUBREG QPR:$src3,
4098 (DSubReg_i32_reg imm:$lane))),
4099 (SubReg_i32_lane imm:$lane)))>,
4100 Requires<[HasNEON, UseFPVMLx]>;
4102 // VMLAL : Vector Multiply Accumulate Long (Q += D * D)
4103 defm VMLALs : N3VLMulOp_QHS<0,1,0b1000,0, IIC_VMACi16D, IIC_VMACi32D,
4104 "vmlal", "s", NEONvmulls, add>;
4105 defm VMLALu : N3VLMulOp_QHS<1,1,0b1000,0, IIC_VMACi16D, IIC_VMACi32D,
4106 "vmlal", "u", NEONvmullu, add>;
4108 defm VMLALsls : N3VLMulOpSL_HS<0, 0b0010, "vmlal", "s", NEONvmulls, add>;
4109 defm VMLALslu : N3VLMulOpSL_HS<1, 0b0010, "vmlal", "u", NEONvmullu, add>;
4111 // VQDMLAL : Vector Saturating Doubling Multiply Accumulate Long (Q += D * D)
4112 defm VQDMLAL : N3VLInt3_HS<0, 1, 0b1001, 0, IIC_VMACi16D, IIC_VMACi32D,
4113 "vqdmlal", "s", int_arm_neon_vqdmlal>;
4114 defm VQDMLALsl: N3VLInt3SL_HS<0, 0b0011, "vqdmlal", "s", int_arm_neon_vqdmlal>;
4116 // VMLS : Vector Multiply Subtract (integer and floating-point)
4117 defm VMLS : N3VMulOp_QHS<1, 0, 0b1001, 0, IIC_VMACi16D, IIC_VMACi32D,
4118 IIC_VMACi16Q, IIC_VMACi32Q, "vmls", "i", sub>;
4119 def VMLSfd : N3VDMulOp<0, 0, 0b10, 0b1101, 1, IIC_VMACD, "vmls", "f32",
4120 v2f32, fmul_su, fsub_mlx>,
4121 Requires<[HasNEON, UseFPVMLx, NoNEONVFP4]>;
4122 def VMLSfq : N3VQMulOp<0, 0, 0b10, 0b1101, 1, IIC_VMACQ, "vmls", "f32",
4123 v4f32, fmul_su, fsub_mlx>,
4124 Requires<[HasNEON, UseFPVMLx, NoNEONVFP4]>;
4125 defm VMLSsl : N3VMulOpSL_HS<0b0100, IIC_VMACi16D, IIC_VMACi32D,
4126 IIC_VMACi16Q, IIC_VMACi32Q, "vmls", "i", sub>;
4127 def VMLSslfd : N3VDMulOpSL<0b10, 0b0101, IIC_VMACD, "vmls", "f32",
4128 v2f32, fmul_su, fsub_mlx>,
4129 Requires<[HasNEON, UseFPVMLx]>;
4130 def VMLSslfq : N3VQMulOpSL<0b10, 0b0101, IIC_VMACQ, "vmls", "f32",
4131 v4f32, v2f32, fmul_su, fsub_mlx>,
4132 Requires<[HasNEON, UseFPVMLx]>;
4134 def : Pat<(v8i16 (sub (v8i16 QPR:$src1),
4135 (mul (v8i16 QPR:$src2),
4136 (v8i16 (NEONvduplane (v8i16 QPR:$src3), imm:$lane))))),
4137 (v8i16 (VMLSslv8i16 (v8i16 QPR:$src1), (v8i16 QPR:$src2),
4138 (v4i16 (EXTRACT_SUBREG QPR:$src3,
4139 (DSubReg_i16_reg imm:$lane))),
4140 (SubReg_i16_lane imm:$lane)))>;
4142 def : Pat<(v4i32 (sub (v4i32 QPR:$src1),
4143 (mul (v4i32 QPR:$src2),
4144 (v4i32 (NEONvduplane (v4i32 QPR:$src3), imm:$lane))))),
4145 (v4i32 (VMLSslv4i32 (v4i32 QPR:$src1), (v4i32 QPR:$src2),
4146 (v2i32 (EXTRACT_SUBREG QPR:$src3,
4147 (DSubReg_i32_reg imm:$lane))),
4148 (SubReg_i32_lane imm:$lane)))>;
4150 def : Pat<(v4f32 (fsub_mlx (v4f32 QPR:$src1),
4151 (fmul_su (v4f32 QPR:$src2),
4152 (v4f32 (NEONvduplane (v4f32 QPR:$src3), imm:$lane))))),
4153 (v4f32 (VMLSslfq (v4f32 QPR:$src1), (v4f32 QPR:$src2),
4154 (v2f32 (EXTRACT_SUBREG QPR:$src3,
4155 (DSubReg_i32_reg imm:$lane))),
4156 (SubReg_i32_lane imm:$lane)))>,
4157 Requires<[HasNEON, UseFPVMLx]>;
4159 // VMLSL : Vector Multiply Subtract Long (Q -= D * D)
4160 defm VMLSLs : N3VLMulOp_QHS<0,1,0b1010,0, IIC_VMACi16D, IIC_VMACi32D,
4161 "vmlsl", "s", NEONvmulls, sub>;
4162 defm VMLSLu : N3VLMulOp_QHS<1,1,0b1010,0, IIC_VMACi16D, IIC_VMACi32D,
4163 "vmlsl", "u", NEONvmullu, sub>;
4165 defm VMLSLsls : N3VLMulOpSL_HS<0, 0b0110, "vmlsl", "s", NEONvmulls, sub>;
4166 defm VMLSLslu : N3VLMulOpSL_HS<1, 0b0110, "vmlsl", "u", NEONvmullu, sub>;
4168 // VQDMLSL : Vector Saturating Doubling Multiply Subtract Long (Q -= D * D)
4169 defm VQDMLSL : N3VLInt3_HS<0, 1, 0b1011, 0, IIC_VMACi16D, IIC_VMACi32D,
4170 "vqdmlsl", "s", int_arm_neon_vqdmlsl>;
4171 defm VQDMLSLsl: N3VLInt3SL_HS<0, 0b111, "vqdmlsl", "s", int_arm_neon_vqdmlsl>;
4174 // Fused Vector Multiply-Accumulate and Fused Multiply-Subtract Operations.
4175 def VFMAfd : N3VDMulOp<0, 0, 0b00, 0b1100, 1, IIC_VFMACD, "vfma", "f32",
4176 v2f32, fmul_su, fadd_mlx>,
4177 Requires<[HasNEONVFP4]>;
4179 def VFMAfq : N3VQMulOp<0, 0, 0b00, 0b1100, 1, IIC_VFMACQ, "vfma", "f32",
4180 v4f32, fmul_su, fadd_mlx>,
4181 Requires<[HasNEONVFP4]>;
4183 // Fused Vector Multiply Subtract (floating-point)
4184 def VFMSfd : N3VDMulOp<0, 0, 0b10, 0b1100, 1, IIC_VFMACD, "vfms", "f32",
4185 v2f32, fmul_su, fsub_mlx>,
4186 Requires<[HasNEONVFP4]>;
4187 def VFMSfq : N3VQMulOp<0, 0, 0b10, 0b1100, 1, IIC_VFMACQ, "vfms", "f32",
4188 v4f32, fmul_su, fsub_mlx>,
4189 Requires<[HasNEONVFP4]>;
4191 // Vector Subtract Operations.
4193 // VSUB : Vector Subtract (integer and floating-point)
4194 defm VSUB : N3V_QHSD<1, 0, 0b1000, 0, IIC_VSUBiD, IIC_VSUBiQ,
4195 "vsub", "i", sub, 0>;
4196 def VSUBfd : N3VD<0, 0, 0b10, 0b1101, 0, IIC_VBIND, "vsub", "f32",
4197 v2f32, v2f32, fsub, 0>;
4198 def VSUBfq : N3VQ<0, 0, 0b10, 0b1101, 0, IIC_VBINQ, "vsub", "f32",
4199 v4f32, v4f32, fsub, 0>;
4200 // VSUBL : Vector Subtract Long (Q = D - D)
4201 defm VSUBLs : N3VLExt_QHS<0,1,0b0010,0, IIC_VSHLiD, IIC_VSHLiD,
4202 "vsubl", "s", sub, sext, 0>;
4203 defm VSUBLu : N3VLExt_QHS<1,1,0b0010,0, IIC_VSHLiD, IIC_VSHLiD,
4204 "vsubl", "u", sub, zext, 0>;
4205 // VSUBW : Vector Subtract Wide (Q = Q - D)
4206 defm VSUBWs : N3VW_QHS<0,1,0b0011,0, "vsubw", "s", sub, sext, 0>;
4207 defm VSUBWu : N3VW_QHS<1,1,0b0011,0, "vsubw", "u", sub, zext, 0>;
4208 // VHSUB : Vector Halving Subtract
4209 defm VHSUBs : N3VInt_QHS<0, 0, 0b0010, 0, N3RegFrm,
4210 IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q,
4211 "vhsub", "s", int_arm_neon_vhsubs, 0>;
4212 defm VHSUBu : N3VInt_QHS<1, 0, 0b0010, 0, N3RegFrm,
4213 IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q,
4214 "vhsub", "u", int_arm_neon_vhsubu, 0>;
4215 // VQSUB : Vector Saturing Subtract
4216 defm VQSUBs : N3VInt_QHSD<0, 0, 0b0010, 1, N3RegFrm,
4217 IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q,
4218 "vqsub", "s", int_arm_neon_vqsubs, 0>;
4219 defm VQSUBu : N3VInt_QHSD<1, 0, 0b0010, 1, N3RegFrm,
4220 IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q,
4221 "vqsub", "u", int_arm_neon_vqsubu, 0>;
4222 // VSUBHN : Vector Subtract and Narrow Returning High Half (D = Q - Q)
4223 defm VSUBHN : N3VNInt_HSD<0,1,0b0110,0, "vsubhn", "i",
4224 int_arm_neon_vsubhn, 0>;
4225 // VRSUBHN : Vector Rounding Subtract and Narrow Returning High Half (D=Q-Q)
4226 defm VRSUBHN : N3VNInt_HSD<1,1,0b0110,0, "vrsubhn", "i",
4227 int_arm_neon_vrsubhn, 0>;
4229 // Vector Comparisons.
4231 // VCEQ : Vector Compare Equal
4232 defm VCEQ : N3V_QHS<1, 0, 0b1000, 1, IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q,
4233 IIC_VSUBi4Q, "vceq", "i", NEONvceq, 1>;
4234 def VCEQfd : N3VD<0,0,0b00,0b1110,0, IIC_VBIND, "vceq", "f32", v2i32, v2f32,
4236 def VCEQfq : N3VQ<0,0,0b00,0b1110,0, IIC_VBINQ, "vceq", "f32", v4i32, v4f32,
4239 defm VCEQz : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00010, 0, "vceq", "i",
4240 "$Vd, $Vm, #0", NEONvceqz>;
4242 // VCGE : Vector Compare Greater Than or Equal
4243 defm VCGEs : N3V_QHS<0, 0, 0b0011, 1, IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q,
4244 IIC_VSUBi4Q, "vcge", "s", NEONvcge, 0>;
4245 defm VCGEu : N3V_QHS<1, 0, 0b0011, 1, IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q,
4246 IIC_VSUBi4Q, "vcge", "u", NEONvcgeu, 0>;
4247 def VCGEfd : N3VD<1,0,0b00,0b1110,0, IIC_VBIND, "vcge", "f32", v2i32, v2f32,
4249 def VCGEfq : N3VQ<1,0,0b00,0b1110,0, IIC_VBINQ, "vcge", "f32", v4i32, v4f32,
4252 defm VCGEz : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00001, 0, "vcge", "s",
4253 "$Vd, $Vm, #0", NEONvcgez>;
4254 defm VCLEz : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00011, 0, "vcle", "s",
4255 "$Vd, $Vm, #0", NEONvclez>;
4257 // VCGT : Vector Compare Greater Than
4258 defm VCGTs : N3V_QHS<0, 0, 0b0011, 0, IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q,
4259 IIC_VSUBi4Q, "vcgt", "s", NEONvcgt, 0>;
4260 defm VCGTu : N3V_QHS<1, 0, 0b0011, 0, IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q,
4261 IIC_VSUBi4Q, "vcgt", "u", NEONvcgtu, 0>;
4262 def VCGTfd : N3VD<1,0,0b10,0b1110,0, IIC_VBIND, "vcgt", "f32", v2i32, v2f32,
4264 def VCGTfq : N3VQ<1,0,0b10,0b1110,0, IIC_VBINQ, "vcgt", "f32", v4i32, v4f32,
4267 defm VCGTz : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00000, 0, "vcgt", "s",
4268 "$Vd, $Vm, #0", NEONvcgtz>;
4269 defm VCLTz : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00100, 0, "vclt", "s",
4270 "$Vd, $Vm, #0", NEONvcltz>;
4272 // VACGE : Vector Absolute Compare Greater Than or Equal (aka VCAGE)
4273 def VACGEd : N3VDInt<1, 0, 0b00, 0b1110, 1, N3RegFrm, IIC_VBIND, "vacge",
4274 "f32", v2i32, v2f32, int_arm_neon_vacged, 0>;
4275 def VACGEq : N3VQInt<1, 0, 0b00, 0b1110, 1, N3RegFrm, IIC_VBINQ, "vacge",
4276 "f32", v4i32, v4f32, int_arm_neon_vacgeq, 0>;
4277 // VACGT : Vector Absolute Compare Greater Than (aka VCAGT)
4278 def VACGTd : N3VDInt<1, 0, 0b10, 0b1110, 1, N3RegFrm, IIC_VBIND, "vacgt",
4279 "f32", v2i32, v2f32, int_arm_neon_vacgtd, 0>;
4280 def VACGTq : N3VQInt<1, 0, 0b10, 0b1110, 1, N3RegFrm, IIC_VBINQ, "vacgt",
4281 "f32", v4i32, v4f32, int_arm_neon_vacgtq, 0>;
4282 // VTST : Vector Test Bits
4283 defm VTST : N3V_QHS<0, 0, 0b1000, 1, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q,
4284 IIC_VBINi4Q, "vtst", "", NEONvtst, 1>;
4286 // Vector Bitwise Operations.
4288 def vnotd : PatFrag<(ops node:$in),
4289 (xor node:$in, (bitconvert (v8i8 NEONimmAllOnesV)))>;
4290 def vnotq : PatFrag<(ops node:$in),
4291 (xor node:$in, (bitconvert (v16i8 NEONimmAllOnesV)))>;
4294 // VAND : Vector Bitwise AND
4295 def VANDd : N3VDX<0, 0, 0b00, 0b0001, 1, IIC_VBINiD, "vand",
4296 v2i32, v2i32, and, 1>;
4297 def VANDq : N3VQX<0, 0, 0b00, 0b0001, 1, IIC_VBINiQ, "vand",
4298 v4i32, v4i32, and, 1>;
4300 // VEOR : Vector Bitwise Exclusive OR
4301 def VEORd : N3VDX<1, 0, 0b00, 0b0001, 1, IIC_VBINiD, "veor",
4302 v2i32, v2i32, xor, 1>;
4303 def VEORq : N3VQX<1, 0, 0b00, 0b0001, 1, IIC_VBINiQ, "veor",
4304 v4i32, v4i32, xor, 1>;
4306 // VORR : Vector Bitwise OR
4307 def VORRd : N3VDX<0, 0, 0b10, 0b0001, 1, IIC_VBINiD, "vorr",
4308 v2i32, v2i32, or, 1>;
4309 def VORRq : N3VQX<0, 0, 0b10, 0b0001, 1, IIC_VBINiQ, "vorr",
4310 v4i32, v4i32, or, 1>;
4312 def VORRiv4i16 : N1ModImm<1, 0b000, {1,0,?,1}, 0, 0, 0, 1,
4313 (outs DPR:$Vd), (ins nImmSplatI16:$SIMM, DPR:$src),
4315 "vorr", "i16", "$Vd, $SIMM", "$src = $Vd",
4317 (v4i16 (NEONvorrImm DPR:$src, timm:$SIMM)))]> {
4318 let Inst{9} = SIMM{9};
4321 def VORRiv2i32 : N1ModImm<1, 0b000, {0,?,?,1}, 0, 0, 0, 1,
4322 (outs DPR:$Vd), (ins nImmSplatI32:$SIMM, DPR:$src),
4324 "vorr", "i32", "$Vd, $SIMM", "$src = $Vd",
4326 (v2i32 (NEONvorrImm DPR:$src, timm:$SIMM)))]> {
4327 let Inst{10-9} = SIMM{10-9};
4330 def VORRiv8i16 : N1ModImm<1, 0b000, {1,0,?,1}, 0, 1, 0, 1,
4331 (outs QPR:$Vd), (ins nImmSplatI16:$SIMM, QPR:$src),
4333 "vorr", "i16", "$Vd, $SIMM", "$src = $Vd",
4335 (v8i16 (NEONvorrImm QPR:$src, timm:$SIMM)))]> {
4336 let Inst{9} = SIMM{9};
4339 def VORRiv4i32 : N1ModImm<1, 0b000, {0,?,?,1}, 0, 1, 0, 1,
4340 (outs QPR:$Vd), (ins nImmSplatI32:$SIMM, QPR:$src),
4342 "vorr", "i32", "$Vd, $SIMM", "$src = $Vd",
4344 (v4i32 (NEONvorrImm QPR:$src, timm:$SIMM)))]> {
4345 let Inst{10-9} = SIMM{10-9};
4349 // VBIC : Vector Bitwise Bit Clear (AND NOT)
4350 def VBICd : N3VX<0, 0, 0b01, 0b0001, 0, 1, (outs DPR:$Vd),
4351 (ins DPR:$Vn, DPR:$Vm), N3RegFrm, IIC_VBINiD,
4352 "vbic", "$Vd, $Vn, $Vm", "",
4353 [(set DPR:$Vd, (v2i32 (and DPR:$Vn,
4354 (vnotd DPR:$Vm))))]>;
4355 def VBICq : N3VX<0, 0, 0b01, 0b0001, 1, 1, (outs QPR:$Vd),
4356 (ins QPR:$Vn, QPR:$Vm), N3RegFrm, IIC_VBINiQ,
4357 "vbic", "$Vd, $Vn, $Vm", "",
4358 [(set QPR:$Vd, (v4i32 (and QPR:$Vn,
4359 (vnotq QPR:$Vm))))]>;
4361 def VBICiv4i16 : N1ModImm<1, 0b000, {1,0,?,1}, 0, 0, 1, 1,
4362 (outs DPR:$Vd), (ins nImmSplatI16:$SIMM, DPR:$src),
4364 "vbic", "i16", "$Vd, $SIMM", "$src = $Vd",
4366 (v4i16 (NEONvbicImm DPR:$src, timm:$SIMM)))]> {
4367 let Inst{9} = SIMM{9};
4370 def VBICiv2i32 : N1ModImm<1, 0b000, {0,?,?,1}, 0, 0, 1, 1,
4371 (outs DPR:$Vd), (ins nImmSplatI32:$SIMM, DPR:$src),
4373 "vbic", "i32", "$Vd, $SIMM", "$src = $Vd",
4375 (v2i32 (NEONvbicImm DPR:$src, timm:$SIMM)))]> {
4376 let Inst{10-9} = SIMM{10-9};
4379 def VBICiv8i16 : N1ModImm<1, 0b000, {1,0,?,1}, 0, 1, 1, 1,
4380 (outs QPR:$Vd), (ins nImmSplatI16:$SIMM, QPR:$src),
4382 "vbic", "i16", "$Vd, $SIMM", "$src = $Vd",
4384 (v8i16 (NEONvbicImm QPR:$src, timm:$SIMM)))]> {
4385 let Inst{9} = SIMM{9};
4388 def VBICiv4i32 : N1ModImm<1, 0b000, {0,?,?,1}, 0, 1, 1, 1,
4389 (outs QPR:$Vd), (ins nImmSplatI32:$SIMM, QPR:$src),
4391 "vbic", "i32", "$Vd, $SIMM", "$src = $Vd",
4393 (v4i32 (NEONvbicImm QPR:$src, timm:$SIMM)))]> {
4394 let Inst{10-9} = SIMM{10-9};
4397 // VORN : Vector Bitwise OR NOT
4398 def VORNd : N3VX<0, 0, 0b11, 0b0001, 0, 1, (outs DPR:$Vd),
4399 (ins DPR:$Vn, DPR:$Vm), N3RegFrm, IIC_VBINiD,
4400 "vorn", "$Vd, $Vn, $Vm", "",
4401 [(set DPR:$Vd, (v2i32 (or DPR:$Vn,
4402 (vnotd DPR:$Vm))))]>;
4403 def VORNq : N3VX<0, 0, 0b11, 0b0001, 1, 1, (outs QPR:$Vd),
4404 (ins QPR:$Vn, QPR:$Vm), N3RegFrm, IIC_VBINiQ,
4405 "vorn", "$Vd, $Vn, $Vm", "",
4406 [(set QPR:$Vd, (v4i32 (or QPR:$Vn,
4407 (vnotq QPR:$Vm))))]>;
4409 // VMVN : Vector Bitwise NOT (Immediate)
4411 let isReMaterializable = 1 in {
4413 def VMVNv4i16 : N1ModImm<1, 0b000, {1,0,?,0}, 0, 0, 1, 1, (outs DPR:$Vd),
4414 (ins nImmSplatI16:$SIMM), IIC_VMOVImm,
4415 "vmvn", "i16", "$Vd, $SIMM", "",
4416 [(set DPR:$Vd, (v4i16 (NEONvmvnImm timm:$SIMM)))]> {
4417 let Inst{9} = SIMM{9};
4420 def VMVNv8i16 : N1ModImm<1, 0b000, {1,0,?,0}, 0, 1, 1, 1, (outs QPR:$Vd),
4421 (ins nImmSplatI16:$SIMM), IIC_VMOVImm,
4422 "vmvn", "i16", "$Vd, $SIMM", "",
4423 [(set QPR:$Vd, (v8i16 (NEONvmvnImm timm:$SIMM)))]> {
4424 let Inst{9} = SIMM{9};
4427 def VMVNv2i32 : N1ModImm<1, 0b000, {?,?,?,?}, 0, 0, 1, 1, (outs DPR:$Vd),
4428 (ins nImmVMOVI32:$SIMM), IIC_VMOVImm,
4429 "vmvn", "i32", "$Vd, $SIMM", "",
4430 [(set DPR:$Vd, (v2i32 (NEONvmvnImm timm:$SIMM)))]> {
4431 let Inst{11-8} = SIMM{11-8};
4434 def VMVNv4i32 : N1ModImm<1, 0b000, {?,?,?,?}, 0, 1, 1, 1, (outs QPR:$Vd),
4435 (ins nImmVMOVI32:$SIMM), IIC_VMOVImm,
4436 "vmvn", "i32", "$Vd, $SIMM", "",
4437 [(set QPR:$Vd, (v4i32 (NEONvmvnImm timm:$SIMM)))]> {
4438 let Inst{11-8} = SIMM{11-8};
4442 // VMVN : Vector Bitwise NOT
4443 def VMVNd : N2VX<0b11, 0b11, 0b00, 0b00, 0b01011, 0, 0,
4444 (outs DPR:$Vd), (ins DPR:$Vm), IIC_VSUBiD,
4445 "vmvn", "$Vd, $Vm", "",
4446 [(set DPR:$Vd, (v2i32 (vnotd DPR:$Vm)))]>;
4447 def VMVNq : N2VX<0b11, 0b11, 0b00, 0b00, 0b01011, 1, 0,
4448 (outs QPR:$Vd), (ins QPR:$Vm), IIC_VSUBiD,
4449 "vmvn", "$Vd, $Vm", "",
4450 [(set QPR:$Vd, (v4i32 (vnotq QPR:$Vm)))]>;
4451 def : Pat<(v2i32 (vnotd DPR:$src)), (VMVNd DPR:$src)>;
4452 def : Pat<(v4i32 (vnotq QPR:$src)), (VMVNq QPR:$src)>;
4454 // VBSL : Vector Bitwise Select
4455 def VBSLd : N3VX<1, 0, 0b01, 0b0001, 0, 1, (outs DPR:$Vd),
4456 (ins DPR:$src1, DPR:$Vn, DPR:$Vm),
4457 N3RegFrm, IIC_VCNTiD,
4458 "vbsl", "$Vd, $Vn, $Vm", "$src1 = $Vd",
4460 (v2i32 (NEONvbsl DPR:$src1, DPR:$Vn, DPR:$Vm)))]>;
4462 def : Pat<(v2i32 (or (and DPR:$Vn, DPR:$Vd),
4463 (and DPR:$Vm, (vnotd DPR:$Vd)))),
4464 (VBSLd DPR:$Vd, DPR:$Vn, DPR:$Vm)>;
4466 def VBSLq : N3VX<1, 0, 0b01, 0b0001, 1, 1, (outs QPR:$Vd),
4467 (ins QPR:$src1, QPR:$Vn, QPR:$Vm),
4468 N3RegFrm, IIC_VCNTiQ,
4469 "vbsl", "$Vd, $Vn, $Vm", "$src1 = $Vd",
4471 (v4i32 (NEONvbsl QPR:$src1, QPR:$Vn, QPR:$Vm)))]>;
4473 def : Pat<(v4i32 (or (and QPR:$Vn, QPR:$Vd),
4474 (and QPR:$Vm, (vnotq QPR:$Vd)))),
4475 (VBSLq QPR:$Vd, QPR:$Vn, QPR:$Vm)>;
4477 // VBIF : Vector Bitwise Insert if False
4478 // like VBSL but with: "vbif $dst, $src3, $src1", "$src2 = $dst",
4479 // FIXME: This instruction's encoding MAY NOT BE correct.
4480 def VBIFd : N3VX<1, 0, 0b11, 0b0001, 0, 1,
4481 (outs DPR:$Vd), (ins DPR:$src1, DPR:$Vn, DPR:$Vm),
4482 N3RegFrm, IIC_VBINiD,
4483 "vbif", "$Vd, $Vn, $Vm", "$src1 = $Vd",
4485 def VBIFq : N3VX<1, 0, 0b11, 0b0001, 1, 1,
4486 (outs QPR:$Vd), (ins QPR:$src1, QPR:$Vn, QPR:$Vm),
4487 N3RegFrm, IIC_VBINiQ,
4488 "vbif", "$Vd, $Vn, $Vm", "$src1 = $Vd",
4491 // VBIT : Vector Bitwise Insert if True
4492 // like VBSL but with: "vbit $dst, $src2, $src1", "$src3 = $dst",
4493 // FIXME: This instruction's encoding MAY NOT BE correct.
4494 def VBITd : N3VX<1, 0, 0b10, 0b0001, 0, 1,
4495 (outs DPR:$Vd), (ins DPR:$src1, DPR:$Vn, DPR:$Vm),
4496 N3RegFrm, IIC_VBINiD,
4497 "vbit", "$Vd, $Vn, $Vm", "$src1 = $Vd",
4499 def VBITq : N3VX<1, 0, 0b10, 0b0001, 1, 1,
4500 (outs QPR:$Vd), (ins QPR:$src1, QPR:$Vn, QPR:$Vm),
4501 N3RegFrm, IIC_VBINiQ,
4502 "vbit", "$Vd, $Vn, $Vm", "$src1 = $Vd",
4505 // VBIT/VBIF are not yet implemented. The TwoAddress pass will not go looking
4506 // for equivalent operations with different register constraints; it just
4509 // Vector Absolute Differences.
4511 // VABD : Vector Absolute Difference
4512 defm VABDs : N3VInt_QHS<0, 0, 0b0111, 0, N3RegFrm,
4513 IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q,
4514 "vabd", "s", int_arm_neon_vabds, 1>;
4515 defm VABDu : N3VInt_QHS<1, 0, 0b0111, 0, N3RegFrm,
4516 IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q,
4517 "vabd", "u", int_arm_neon_vabdu, 1>;
4518 def VABDfd : N3VDInt<1, 0, 0b10, 0b1101, 0, N3RegFrm, IIC_VBIND,
4519 "vabd", "f32", v2f32, v2f32, int_arm_neon_vabds, 1>;
4520 def VABDfq : N3VQInt<1, 0, 0b10, 0b1101, 0, N3RegFrm, IIC_VBINQ,
4521 "vabd", "f32", v4f32, v4f32, int_arm_neon_vabds, 1>;
4523 // VABDL : Vector Absolute Difference Long (Q = | D - D |)
4524 defm VABDLs : N3VLIntExt_QHS<0,1,0b0111,0, IIC_VSUBi4Q,
4525 "vabdl", "s", int_arm_neon_vabds, zext, 1>;
4526 defm VABDLu : N3VLIntExt_QHS<1,1,0b0111,0, IIC_VSUBi4Q,
4527 "vabdl", "u", int_arm_neon_vabdu, zext, 1>;
4529 // VABA : Vector Absolute Difference and Accumulate
4530 defm VABAs : N3VIntOp_QHS<0,0,0b0111,1, IIC_VABAD, IIC_VABAQ,
4531 "vaba", "s", int_arm_neon_vabds, add>;
4532 defm VABAu : N3VIntOp_QHS<1,0,0b0111,1, IIC_VABAD, IIC_VABAQ,
4533 "vaba", "u", int_arm_neon_vabdu, add>;
4535 // VABAL : Vector Absolute Difference and Accumulate Long (Q += | D - D |)
4536 defm VABALs : N3VLIntExtOp_QHS<0,1,0b0101,0, IIC_VABAD,
4537 "vabal", "s", int_arm_neon_vabds, zext, add>;
4538 defm VABALu : N3VLIntExtOp_QHS<1,1,0b0101,0, IIC_VABAD,
4539 "vabal", "u", int_arm_neon_vabdu, zext, add>;
4541 // Vector Maximum and Minimum.
4543 // VMAX : Vector Maximum
4544 defm VMAXs : N3VInt_QHS<0, 0, 0b0110, 0, N3RegFrm,
4545 IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q,
4546 "vmax", "s", int_arm_neon_vmaxs, 1>;
4547 defm VMAXu : N3VInt_QHS<1, 0, 0b0110, 0, N3RegFrm,
4548 IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q,
4549 "vmax", "u", int_arm_neon_vmaxu, 1>;
4550 def VMAXfd : N3VDInt<0, 0, 0b00, 0b1111, 0, N3RegFrm, IIC_VBIND,
4552 v2f32, v2f32, int_arm_neon_vmaxs, 1>;
4553 def VMAXfq : N3VQInt<0, 0, 0b00, 0b1111, 0, N3RegFrm, IIC_VBINQ,
4555 v4f32, v4f32, int_arm_neon_vmaxs, 1>;
4557 // VMIN : Vector Minimum
4558 defm VMINs : N3VInt_QHS<0, 0, 0b0110, 1, N3RegFrm,
4559 IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q,
4560 "vmin", "s", int_arm_neon_vmins, 1>;
4561 defm VMINu : N3VInt_QHS<1, 0, 0b0110, 1, N3RegFrm,
4562 IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q,
4563 "vmin", "u", int_arm_neon_vminu, 1>;
4564 def VMINfd : N3VDInt<0, 0, 0b10, 0b1111, 0, N3RegFrm, IIC_VBIND,
4566 v2f32, v2f32, int_arm_neon_vmins, 1>;
4567 def VMINfq : N3VQInt<0, 0, 0b10, 0b1111, 0, N3RegFrm, IIC_VBINQ,
4569 v4f32, v4f32, int_arm_neon_vmins, 1>;
4571 // Vector Pairwise Operations.
4573 // VPADD : Vector Pairwise Add
4574 def VPADDi8 : N3VDInt<0, 0, 0b00, 0b1011, 1, N3RegFrm, IIC_VSHLiD,
4576 v8i8, v8i8, int_arm_neon_vpadd, 0>;
4577 def VPADDi16 : N3VDInt<0, 0, 0b01, 0b1011, 1, N3RegFrm, IIC_VSHLiD,
4579 v4i16, v4i16, int_arm_neon_vpadd, 0>;
4580 def VPADDi32 : N3VDInt<0, 0, 0b10, 0b1011, 1, N3RegFrm, IIC_VSHLiD,
4582 v2i32, v2i32, int_arm_neon_vpadd, 0>;
4583 def VPADDf : N3VDInt<1, 0, 0b00, 0b1101, 0, N3RegFrm,
4584 IIC_VPBIND, "vpadd", "f32",
4585 v2f32, v2f32, int_arm_neon_vpadd, 0>;
4587 // VPADDL : Vector Pairwise Add Long
4588 defm VPADDLs : N2VPLInt_QHS<0b11, 0b11, 0b00, 0b00100, 0, "vpaddl", "s",
4589 int_arm_neon_vpaddls>;
4590 defm VPADDLu : N2VPLInt_QHS<0b11, 0b11, 0b00, 0b00101, 0, "vpaddl", "u",
4591 int_arm_neon_vpaddlu>;
4593 // VPADAL : Vector Pairwise Add and Accumulate Long
4594 defm VPADALs : N2VPLInt2_QHS<0b11, 0b11, 0b00, 0b01100, 0, "vpadal", "s",
4595 int_arm_neon_vpadals>;
4596 defm VPADALu : N2VPLInt2_QHS<0b11, 0b11, 0b00, 0b01101, 0, "vpadal", "u",
4597 int_arm_neon_vpadalu>;
4599 // VPMAX : Vector Pairwise Maximum
4600 def VPMAXs8 : N3VDInt<0, 0, 0b00, 0b1010, 0, N3RegFrm, IIC_VSUBi4D, "vpmax",
4601 "s8", v8i8, v8i8, int_arm_neon_vpmaxs, 0>;
4602 def VPMAXs16 : N3VDInt<0, 0, 0b01, 0b1010, 0, N3RegFrm, IIC_VSUBi4D, "vpmax",
4603 "s16", v4i16, v4i16, int_arm_neon_vpmaxs, 0>;
4604 def VPMAXs32 : N3VDInt<0, 0, 0b10, 0b1010, 0, N3RegFrm, IIC_VSUBi4D, "vpmax",
4605 "s32", v2i32, v2i32, int_arm_neon_vpmaxs, 0>;
4606 def VPMAXu8 : N3VDInt<1, 0, 0b00, 0b1010, 0, N3RegFrm, IIC_VSUBi4D, "vpmax",
4607 "u8", v8i8, v8i8, int_arm_neon_vpmaxu, 0>;
4608 def VPMAXu16 : N3VDInt<1, 0, 0b01, 0b1010, 0, N3RegFrm, IIC_VSUBi4D, "vpmax",
4609 "u16", v4i16, v4i16, int_arm_neon_vpmaxu, 0>;
4610 def VPMAXu32 : N3VDInt<1, 0, 0b10, 0b1010, 0, N3RegFrm, IIC_VSUBi4D, "vpmax",
4611 "u32", v2i32, v2i32, int_arm_neon_vpmaxu, 0>;
4612 def VPMAXf : N3VDInt<1, 0, 0b00, 0b1111, 0, N3RegFrm, IIC_VPBIND, "vpmax",
4613 "f32", v2f32, v2f32, int_arm_neon_vpmaxs, 0>;
4615 // VPMIN : Vector Pairwise Minimum
4616 def VPMINs8 : N3VDInt<0, 0, 0b00, 0b1010, 1, N3RegFrm, IIC_VSUBi4D, "vpmin",
4617 "s8", v8i8, v8i8, int_arm_neon_vpmins, 0>;
4618 def VPMINs16 : N3VDInt<0, 0, 0b01, 0b1010, 1, N3RegFrm, IIC_VSUBi4D, "vpmin",
4619 "s16", v4i16, v4i16, int_arm_neon_vpmins, 0>;
4620 def VPMINs32 : N3VDInt<0, 0, 0b10, 0b1010, 1, N3RegFrm, IIC_VSUBi4D, "vpmin",
4621 "s32", v2i32, v2i32, int_arm_neon_vpmins, 0>;
4622 def VPMINu8 : N3VDInt<1, 0, 0b00, 0b1010, 1, N3RegFrm, IIC_VSUBi4D, "vpmin",
4623 "u8", v8i8, v8i8, int_arm_neon_vpminu, 0>;
4624 def VPMINu16 : N3VDInt<1, 0, 0b01, 0b1010, 1, N3RegFrm, IIC_VSUBi4D, "vpmin",
4625 "u16", v4i16, v4i16, int_arm_neon_vpminu, 0>;
4626 def VPMINu32 : N3VDInt<1, 0, 0b10, 0b1010, 1, N3RegFrm, IIC_VSUBi4D, "vpmin",
4627 "u32", v2i32, v2i32, int_arm_neon_vpminu, 0>;
4628 def VPMINf : N3VDInt<1, 0, 0b10, 0b1111, 0, N3RegFrm, IIC_VPBIND, "vpmin",
4629 "f32", v2f32, v2f32, int_arm_neon_vpmins, 0>;
4631 // Vector Reciprocal and Reciprocal Square Root Estimate and Step.
4633 // VRECPE : Vector Reciprocal Estimate
4634 def VRECPEd : N2VDInt<0b11, 0b11, 0b10, 0b11, 0b01000, 0,
4635 IIC_VUNAD, "vrecpe", "u32",
4636 v2i32, v2i32, int_arm_neon_vrecpe>;
4637 def VRECPEq : N2VQInt<0b11, 0b11, 0b10, 0b11, 0b01000, 0,
4638 IIC_VUNAQ, "vrecpe", "u32",
4639 v4i32, v4i32, int_arm_neon_vrecpe>;
4640 def VRECPEfd : N2VDInt<0b11, 0b11, 0b10, 0b11, 0b01010, 0,
4641 IIC_VUNAD, "vrecpe", "f32",
4642 v2f32, v2f32, int_arm_neon_vrecpe>;
4643 def VRECPEfq : N2VQInt<0b11, 0b11, 0b10, 0b11, 0b01010, 0,
4644 IIC_VUNAQ, "vrecpe", "f32",
4645 v4f32, v4f32, int_arm_neon_vrecpe>;
4647 // VRECPS : Vector Reciprocal Step
4648 def VRECPSfd : N3VDInt<0, 0, 0b00, 0b1111, 1, N3RegFrm,
4649 IIC_VRECSD, "vrecps", "f32",
4650 v2f32, v2f32, int_arm_neon_vrecps, 1>;
4651 def VRECPSfq : N3VQInt<0, 0, 0b00, 0b1111, 1, N3RegFrm,
4652 IIC_VRECSQ, "vrecps", "f32",
4653 v4f32, v4f32, int_arm_neon_vrecps, 1>;
4655 // VRSQRTE : Vector Reciprocal Square Root Estimate
4656 def VRSQRTEd : N2VDInt<0b11, 0b11, 0b10, 0b11, 0b01001, 0,
4657 IIC_VUNAD, "vrsqrte", "u32",
4658 v2i32, v2i32, int_arm_neon_vrsqrte>;
4659 def VRSQRTEq : N2VQInt<0b11, 0b11, 0b10, 0b11, 0b01001, 0,
4660 IIC_VUNAQ, "vrsqrte", "u32",
4661 v4i32, v4i32, int_arm_neon_vrsqrte>;
4662 def VRSQRTEfd : N2VDInt<0b11, 0b11, 0b10, 0b11, 0b01011, 0,
4663 IIC_VUNAD, "vrsqrte", "f32",
4664 v2f32, v2f32, int_arm_neon_vrsqrte>;
4665 def VRSQRTEfq : N2VQInt<0b11, 0b11, 0b10, 0b11, 0b01011, 0,
4666 IIC_VUNAQ, "vrsqrte", "f32",
4667 v4f32, v4f32, int_arm_neon_vrsqrte>;
4669 // VRSQRTS : Vector Reciprocal Square Root Step
4670 def VRSQRTSfd : N3VDInt<0, 0, 0b10, 0b1111, 1, N3RegFrm,
4671 IIC_VRECSD, "vrsqrts", "f32",
4672 v2f32, v2f32, int_arm_neon_vrsqrts, 1>;
4673 def VRSQRTSfq : N3VQInt<0, 0, 0b10, 0b1111, 1, N3RegFrm,
4674 IIC_VRECSQ, "vrsqrts", "f32",
4675 v4f32, v4f32, int_arm_neon_vrsqrts, 1>;
4679 // VSHL : Vector Shift
4680 defm VSHLs : N3VInt_QHSDSh<0, 0, 0b0100, 0, N3RegVShFrm,
4681 IIC_VSHLiD, IIC_VSHLiD, IIC_VSHLiQ, IIC_VSHLiQ,
4682 "vshl", "s", int_arm_neon_vshifts>;
4683 defm VSHLu : N3VInt_QHSDSh<1, 0, 0b0100, 0, N3RegVShFrm,
4684 IIC_VSHLiD, IIC_VSHLiD, IIC_VSHLiQ, IIC_VSHLiQ,
4685 "vshl", "u", int_arm_neon_vshiftu>;
4687 // VSHL : Vector Shift Left (Immediate)
4688 defm VSHLi : N2VShL_QHSD<0, 1, 0b0101, 1, IIC_VSHLiD, "vshl", "i", NEONvshl>;
4690 // VSHR : Vector Shift Right (Immediate)
4691 defm VSHRs : N2VShR_QHSD<0, 1, 0b0000, 1, IIC_VSHLiD, "vshr", "s",NEONvshrs>;
4692 defm VSHRu : N2VShR_QHSD<1, 1, 0b0000, 1, IIC_VSHLiD, "vshr", "u",NEONvshru>;
4694 // VSHLL : Vector Shift Left Long
4695 defm VSHLLs : N2VLSh_QHS<0, 1, 0b1010, 0, 0, 1, "vshll", "s", NEONvshlls>;
4696 defm VSHLLu : N2VLSh_QHS<1, 1, 0b1010, 0, 0, 1, "vshll", "u", NEONvshllu>;
4698 // VSHLL : Vector Shift Left Long (with maximum shift count)
4699 class N2VLShMax<bit op24, bit op23, bits<6> op21_16, bits<4> op11_8, bit op7,
4700 bit op6, bit op4, string OpcodeStr, string Dt, ValueType ResTy,
4701 ValueType OpTy, Operand ImmTy, SDNode OpNode>
4702 : N2VLSh<op24, op23, op11_8, op7, op6, op4, OpcodeStr, Dt,
4703 ResTy, OpTy, ImmTy, OpNode> {
4704 let Inst{21-16} = op21_16;
4705 let DecoderMethod = "DecodeVSHLMaxInstruction";
4707 def VSHLLi8 : N2VLShMax<1, 1, 0b110010, 0b0011, 0, 0, 0, "vshll", "i8",
4708 v8i16, v8i8, imm8, NEONvshlli>;
4709 def VSHLLi16 : N2VLShMax<1, 1, 0b110110, 0b0011, 0, 0, 0, "vshll", "i16",
4710 v4i32, v4i16, imm16, NEONvshlli>;
4711 def VSHLLi32 : N2VLShMax<1, 1, 0b111010, 0b0011, 0, 0, 0, "vshll", "i32",
4712 v2i64, v2i32, imm32, NEONvshlli>;
4714 // VSHRN : Vector Shift Right and Narrow
4715 defm VSHRN : N2VNSh_HSD<0,1,0b1000,0,0,1, IIC_VSHLiD, "vshrn", "i",
4718 // VRSHL : Vector Rounding Shift
4719 defm VRSHLs : N3VInt_QHSDSh<0, 0, 0b0101, 0, N3RegVShFrm,
4720 IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, IIC_VSHLi4Q,
4721 "vrshl", "s", int_arm_neon_vrshifts>;
4722 defm VRSHLu : N3VInt_QHSDSh<1, 0, 0b0101, 0, N3RegVShFrm,
4723 IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, IIC_VSHLi4Q,
4724 "vrshl", "u", int_arm_neon_vrshiftu>;
4725 // VRSHR : Vector Rounding Shift Right
4726 defm VRSHRs : N2VShR_QHSD<0,1,0b0010,1, IIC_VSHLi4D, "vrshr", "s",NEONvrshrs>;
4727 defm VRSHRu : N2VShR_QHSD<1,1,0b0010,1, IIC_VSHLi4D, "vrshr", "u",NEONvrshru>;
4729 // VRSHRN : Vector Rounding Shift Right and Narrow
4730 defm VRSHRN : N2VNSh_HSD<0, 1, 0b1000, 0, 1, 1, IIC_VSHLi4D, "vrshrn", "i",
4733 // VQSHL : Vector Saturating Shift
4734 defm VQSHLs : N3VInt_QHSDSh<0, 0, 0b0100, 1, N3RegVShFrm,
4735 IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, IIC_VSHLi4Q,
4736 "vqshl", "s", int_arm_neon_vqshifts>;
4737 defm VQSHLu : N3VInt_QHSDSh<1, 0, 0b0100, 1, N3RegVShFrm,
4738 IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, IIC_VSHLi4Q,
4739 "vqshl", "u", int_arm_neon_vqshiftu>;
4740 // VQSHL : Vector Saturating Shift Left (Immediate)
4741 defm VQSHLsi : N2VShL_QHSD<0,1,0b0111,1, IIC_VSHLi4D, "vqshl", "s",NEONvqshls>;
4742 defm VQSHLui : N2VShL_QHSD<1,1,0b0111,1, IIC_VSHLi4D, "vqshl", "u",NEONvqshlu>;
4744 // VQSHLU : Vector Saturating Shift Left (Immediate, Unsigned)
4745 defm VQSHLsu : N2VShL_QHSD<1,1,0b0110,1, IIC_VSHLi4D,"vqshlu","s",NEONvqshlsu>;
4747 // VQSHRN : Vector Saturating Shift Right and Narrow
4748 defm VQSHRNs : N2VNSh_HSD<0, 1, 0b1001, 0, 0, 1, IIC_VSHLi4D, "vqshrn", "s",
4750 defm VQSHRNu : N2VNSh_HSD<1, 1, 0b1001, 0, 0, 1, IIC_VSHLi4D, "vqshrn", "u",
4753 // VQSHRUN : Vector Saturating Shift Right and Narrow (Unsigned)
4754 defm VQSHRUN : N2VNSh_HSD<1, 1, 0b1000, 0, 0, 1, IIC_VSHLi4D, "vqshrun", "s",
4757 // VQRSHL : Vector Saturating Rounding Shift
4758 defm VQRSHLs : N3VInt_QHSDSh<0, 0, 0b0101, 1, N3RegVShFrm,
4759 IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, IIC_VSHLi4Q,
4760 "vqrshl", "s", int_arm_neon_vqrshifts>;
4761 defm VQRSHLu : N3VInt_QHSDSh<1, 0, 0b0101, 1, N3RegVShFrm,
4762 IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, IIC_VSHLi4Q,
4763 "vqrshl", "u", int_arm_neon_vqrshiftu>;
4765 // VQRSHRN : Vector Saturating Rounding Shift Right and Narrow
4766 defm VQRSHRNs : N2VNSh_HSD<0, 1, 0b1001, 0, 1, 1, IIC_VSHLi4D, "vqrshrn", "s",
4768 defm VQRSHRNu : N2VNSh_HSD<1, 1, 0b1001, 0, 1, 1, IIC_VSHLi4D, "vqrshrn", "u",
4771 // VQRSHRUN : Vector Saturating Rounding Shift Right and Narrow (Unsigned)
4772 defm VQRSHRUN : N2VNSh_HSD<1, 1, 0b1000, 0, 1, 1, IIC_VSHLi4D, "vqrshrun", "s",
4775 // VSRA : Vector Shift Right and Accumulate
4776 defm VSRAs : N2VShAdd_QHSD<0, 1, 0b0001, 1, "vsra", "s", NEONvshrs>;
4777 defm VSRAu : N2VShAdd_QHSD<1, 1, 0b0001, 1, "vsra", "u", NEONvshru>;
4778 // VRSRA : Vector Rounding Shift Right and Accumulate
4779 defm VRSRAs : N2VShAdd_QHSD<0, 1, 0b0011, 1, "vrsra", "s", NEONvrshrs>;
4780 defm VRSRAu : N2VShAdd_QHSD<1, 1, 0b0011, 1, "vrsra", "u", NEONvrshru>;
4782 // VSLI : Vector Shift Left and Insert
4783 defm VSLI : N2VShInsL_QHSD<1, 1, 0b0101, 1, "vsli">;
4785 // VSRI : Vector Shift Right and Insert
4786 defm VSRI : N2VShInsR_QHSD<1, 1, 0b0100, 1, "vsri">;
4788 // Vector Absolute and Saturating Absolute.
4790 // VABS : Vector Absolute Value
4791 defm VABS : N2VInt_QHS<0b11, 0b11, 0b01, 0b00110, 0,
4792 IIC_VUNAiD, IIC_VUNAiQ, "vabs", "s",
4794 def VABSfd : N2VDInt<0b11, 0b11, 0b10, 0b01, 0b01110, 0,
4795 IIC_VUNAD, "vabs", "f32",
4796 v2f32, v2f32, int_arm_neon_vabs>;
4797 def VABSfq : N2VQInt<0b11, 0b11, 0b10, 0b01, 0b01110, 0,
4798 IIC_VUNAQ, "vabs", "f32",
4799 v4f32, v4f32, int_arm_neon_vabs>;
4801 // VQABS : Vector Saturating Absolute Value
4802 defm VQABS : N2VInt_QHS<0b11, 0b11, 0b00, 0b01110, 0,
4803 IIC_VQUNAiD, IIC_VQUNAiQ, "vqabs", "s",
4804 int_arm_neon_vqabs>;
4808 def vnegd : PatFrag<(ops node:$in),
4809 (sub (bitconvert (v2i32 NEONimmAllZerosV)), node:$in)>;
4810 def vnegq : PatFrag<(ops node:$in),
4811 (sub (bitconvert (v4i32 NEONimmAllZerosV)), node:$in)>;
4813 class VNEGD<bits<2> size, string OpcodeStr, string Dt, ValueType Ty>
4814 : N2V<0b11, 0b11, size, 0b01, 0b00111, 0, 0, (outs DPR:$Vd), (ins DPR:$Vm),
4815 IIC_VSHLiD, OpcodeStr, Dt, "$Vd, $Vm", "",
4816 [(set DPR:$Vd, (Ty (vnegd DPR:$Vm)))]>;
4817 class VNEGQ<bits<2> size, string OpcodeStr, string Dt, ValueType Ty>
4818 : N2V<0b11, 0b11, size, 0b01, 0b00111, 1, 0, (outs QPR:$Vd), (ins QPR:$Vm),
4819 IIC_VSHLiQ, OpcodeStr, Dt, "$Vd, $Vm", "",
4820 [(set QPR:$Vd, (Ty (vnegq QPR:$Vm)))]>;
4822 // VNEG : Vector Negate (integer)
4823 def VNEGs8d : VNEGD<0b00, "vneg", "s8", v8i8>;
4824 def VNEGs16d : VNEGD<0b01, "vneg", "s16", v4i16>;
4825 def VNEGs32d : VNEGD<0b10, "vneg", "s32", v2i32>;
4826 def VNEGs8q : VNEGQ<0b00, "vneg", "s8", v16i8>;
4827 def VNEGs16q : VNEGQ<0b01, "vneg", "s16", v8i16>;
4828 def VNEGs32q : VNEGQ<0b10, "vneg", "s32", v4i32>;
4830 // VNEG : Vector Negate (floating-point)
4831 def VNEGfd : N2V<0b11, 0b11, 0b10, 0b01, 0b01111, 0, 0,
4832 (outs DPR:$Vd), (ins DPR:$Vm), IIC_VUNAD,
4833 "vneg", "f32", "$Vd, $Vm", "",
4834 [(set DPR:$Vd, (v2f32 (fneg DPR:$Vm)))]>;
4835 def VNEGf32q : N2V<0b11, 0b11, 0b10, 0b01, 0b01111, 1, 0,
4836 (outs QPR:$Vd), (ins QPR:$Vm), IIC_VUNAQ,
4837 "vneg", "f32", "$Vd, $Vm", "",
4838 [(set QPR:$Vd, (v4f32 (fneg QPR:$Vm)))]>;
4840 def : Pat<(v8i8 (vnegd DPR:$src)), (VNEGs8d DPR:$src)>;
4841 def : Pat<(v4i16 (vnegd DPR:$src)), (VNEGs16d DPR:$src)>;
4842 def : Pat<(v2i32 (vnegd DPR:$src)), (VNEGs32d DPR:$src)>;
4843 def : Pat<(v16i8 (vnegq QPR:$src)), (VNEGs8q QPR:$src)>;
4844 def : Pat<(v8i16 (vnegq QPR:$src)), (VNEGs16q QPR:$src)>;
4845 def : Pat<(v4i32 (vnegq QPR:$src)), (VNEGs32q QPR:$src)>;
4847 // VQNEG : Vector Saturating Negate
4848 defm VQNEG : N2VInt_QHS<0b11, 0b11, 0b00, 0b01111, 0,
4849 IIC_VQUNAiD, IIC_VQUNAiQ, "vqneg", "s",
4850 int_arm_neon_vqneg>;
4852 // Vector Bit Counting Operations.
4854 // VCLS : Vector Count Leading Sign Bits
4855 defm VCLS : N2VInt_QHS<0b11, 0b11, 0b00, 0b01000, 0,
4856 IIC_VCNTiD, IIC_VCNTiQ, "vcls", "s",
4858 // VCLZ : Vector Count Leading Zeros
4859 defm VCLZ : N2VInt_QHS<0b11, 0b11, 0b00, 0b01001, 0,
4860 IIC_VCNTiD, IIC_VCNTiQ, "vclz", "i",
4862 // VCNT : Vector Count One Bits
4863 def VCNTd : N2VDInt<0b11, 0b11, 0b00, 0b00, 0b01010, 0,
4864 IIC_VCNTiD, "vcnt", "8",
4865 v8i8, v8i8, int_arm_neon_vcnt>;
4866 def VCNTq : N2VQInt<0b11, 0b11, 0b00, 0b00, 0b01010, 0,
4867 IIC_VCNTiQ, "vcnt", "8",
4868 v16i8, v16i8, int_arm_neon_vcnt>;
4871 def VSWPd : N2VX<0b11, 0b11, 0b00, 0b10, 0b00000, 0, 0,
4872 (outs DPR:$Vd, DPR:$Vd1), (ins DPR:$Vm, DPR:$Vm1),
4873 NoItinerary, "vswp", "$Vd, $Vm", "$Vm = $Vd, $Vm1 = $Vd1",
4875 def VSWPq : N2VX<0b11, 0b11, 0b00, 0b10, 0b00000, 1, 0,
4876 (outs QPR:$Vd, QPR:$Vd1), (ins QPR:$Vm, QPR:$Vm1),
4877 NoItinerary, "vswp", "$Vd, $Vm", "$Vm = $Vd, $Vm1 = $Vd1",
4880 // Vector Move Operations.
4882 // VMOV : Vector Move (Register)
4883 def : InstAlias<"vmov${p} $Vd, $Vm",
4884 (VORRd DPR:$Vd, DPR:$Vm, DPR:$Vm, pred:$p)>;
4885 def : InstAlias<"vmov${p} $Vd, $Vm",
4886 (VORRq QPR:$Vd, QPR:$Vm, QPR:$Vm, pred:$p)>;
4888 // VMOV : Vector Move (Immediate)
4890 let isReMaterializable = 1 in {
4891 def VMOVv8i8 : N1ModImm<1, 0b000, 0b1110, 0, 0, 0, 1, (outs DPR:$Vd),
4892 (ins nImmSplatI8:$SIMM), IIC_VMOVImm,
4893 "vmov", "i8", "$Vd, $SIMM", "",
4894 [(set DPR:$Vd, (v8i8 (NEONvmovImm timm:$SIMM)))]>;
4895 def VMOVv16i8 : N1ModImm<1, 0b000, 0b1110, 0, 1, 0, 1, (outs QPR:$Vd),
4896 (ins nImmSplatI8:$SIMM), IIC_VMOVImm,
4897 "vmov", "i8", "$Vd, $SIMM", "",
4898 [(set QPR:$Vd, (v16i8 (NEONvmovImm timm:$SIMM)))]>;
4900 def VMOVv4i16 : N1ModImm<1, 0b000, {1,0,?,0}, 0, 0, 0, 1, (outs DPR:$Vd),
4901 (ins nImmSplatI16:$SIMM), IIC_VMOVImm,
4902 "vmov", "i16", "$Vd, $SIMM", "",
4903 [(set DPR:$Vd, (v4i16 (NEONvmovImm timm:$SIMM)))]> {
4904 let Inst{9} = SIMM{9};
4907 def VMOVv8i16 : N1ModImm<1, 0b000, {1,0,?,0}, 0, 1, 0, 1, (outs QPR:$Vd),
4908 (ins nImmSplatI16:$SIMM), IIC_VMOVImm,
4909 "vmov", "i16", "$Vd, $SIMM", "",
4910 [(set QPR:$Vd, (v8i16 (NEONvmovImm timm:$SIMM)))]> {
4911 let Inst{9} = SIMM{9};
4914 def VMOVv2i32 : N1ModImm<1, 0b000, {?,?,?,?}, 0, 0, 0, 1, (outs DPR:$Vd),
4915 (ins nImmVMOVI32:$SIMM), IIC_VMOVImm,
4916 "vmov", "i32", "$Vd, $SIMM", "",
4917 [(set DPR:$Vd, (v2i32 (NEONvmovImm timm:$SIMM)))]> {
4918 let Inst{11-8} = SIMM{11-8};
4921 def VMOVv4i32 : N1ModImm<1, 0b000, {?,?,?,?}, 0, 1, 0, 1, (outs QPR:$Vd),
4922 (ins nImmVMOVI32:$SIMM), IIC_VMOVImm,
4923 "vmov", "i32", "$Vd, $SIMM", "",
4924 [(set QPR:$Vd, (v4i32 (NEONvmovImm timm:$SIMM)))]> {
4925 let Inst{11-8} = SIMM{11-8};
4928 def VMOVv1i64 : N1ModImm<1, 0b000, 0b1110, 0, 0, 1, 1, (outs DPR:$Vd),
4929 (ins nImmSplatI64:$SIMM), IIC_VMOVImm,
4930 "vmov", "i64", "$Vd, $SIMM", "",
4931 [(set DPR:$Vd, (v1i64 (NEONvmovImm timm:$SIMM)))]>;
4932 def VMOVv2i64 : N1ModImm<1, 0b000, 0b1110, 0, 1, 1, 1, (outs QPR:$Vd),
4933 (ins nImmSplatI64:$SIMM), IIC_VMOVImm,
4934 "vmov", "i64", "$Vd, $SIMM", "",
4935 [(set QPR:$Vd, (v2i64 (NEONvmovImm timm:$SIMM)))]>;
4937 def VMOVv2f32 : N1ModImm<1, 0b000, 0b1111, 0, 0, 0, 1, (outs DPR:$Vd),
4938 (ins nImmVMOVF32:$SIMM), IIC_VMOVImm,
4939 "vmov", "f32", "$Vd, $SIMM", "",
4940 [(set DPR:$Vd, (v2f32 (NEONvmovFPImm timm:$SIMM)))]>;
4941 def VMOVv4f32 : N1ModImm<1, 0b000, 0b1111, 0, 1, 0, 1, (outs QPR:$Vd),
4942 (ins nImmVMOVF32:$SIMM), IIC_VMOVImm,
4943 "vmov", "f32", "$Vd, $SIMM", "",
4944 [(set QPR:$Vd, (v4f32 (NEONvmovFPImm timm:$SIMM)))]>;
4945 } // isReMaterializable
4947 // VMOV : Vector Get Lane (move scalar to ARM core register)
4949 def VGETLNs8 : NVGetLane<{1,1,1,0,0,1,?,1}, 0b1011, {?,?},
4950 (outs GPR:$R), (ins DPR:$V, VectorIndex8:$lane),
4951 IIC_VMOVSI, "vmov", "s8", "$R, $V$lane",
4952 [(set GPR:$R, (NEONvgetlanes (v8i8 DPR:$V),
4954 let Inst{21} = lane{2};
4955 let Inst{6-5} = lane{1-0};
4957 def VGETLNs16 : NVGetLane<{1,1,1,0,0,0,?,1}, 0b1011, {?,1},
4958 (outs GPR:$R), (ins DPR:$V, VectorIndex16:$lane),
4959 IIC_VMOVSI, "vmov", "s16", "$R, $V$lane",
4960 [(set GPR:$R, (NEONvgetlanes (v4i16 DPR:$V),
4962 let Inst{21} = lane{1};
4963 let Inst{6} = lane{0};
4965 def VGETLNu8 : NVGetLane<{1,1,1,0,1,1,?,1}, 0b1011, {?,?},
4966 (outs GPR:$R), (ins DPR:$V, VectorIndex8:$lane),
4967 IIC_VMOVSI, "vmov", "u8", "$R, $V$lane",
4968 [(set GPR:$R, (NEONvgetlaneu (v8i8 DPR:$V),
4970 let Inst{21} = lane{2};
4971 let Inst{6-5} = lane{1-0};
4973 def VGETLNu16 : NVGetLane<{1,1,1,0,1,0,?,1}, 0b1011, {?,1},
4974 (outs GPR:$R), (ins DPR:$V, VectorIndex16:$lane),
4975 IIC_VMOVSI, "vmov", "u16", "$R, $V$lane",
4976 [(set GPR:$R, (NEONvgetlaneu (v4i16 DPR:$V),
4978 let Inst{21} = lane{1};
4979 let Inst{6} = lane{0};
4981 def VGETLNi32 : NVGetLane<{1,1,1,0,0,0,?,1}, 0b1011, 0b00,
4982 (outs GPR:$R), (ins DPR:$V, VectorIndex32:$lane),
4983 IIC_VMOVSI, "vmov", "32", "$R, $V$lane",
4984 [(set GPR:$R, (extractelt (v2i32 DPR:$V),
4986 let Inst{21} = lane{0};
4988 // def VGETLNf32: see FMRDH and FMRDL in ARMInstrVFP.td
4989 def : Pat<(NEONvgetlanes (v16i8 QPR:$src), imm:$lane),
4990 (VGETLNs8 (v8i8 (EXTRACT_SUBREG QPR:$src,
4991 (DSubReg_i8_reg imm:$lane))),
4992 (SubReg_i8_lane imm:$lane))>;
4993 def : Pat<(NEONvgetlanes (v8i16 QPR:$src), imm:$lane),
4994 (VGETLNs16 (v4i16 (EXTRACT_SUBREG QPR:$src,
4995 (DSubReg_i16_reg imm:$lane))),
4996 (SubReg_i16_lane imm:$lane))>;
4997 def : Pat<(NEONvgetlaneu (v16i8 QPR:$src), imm:$lane),
4998 (VGETLNu8 (v8i8 (EXTRACT_SUBREG QPR:$src,
4999 (DSubReg_i8_reg imm:$lane))),
5000 (SubReg_i8_lane imm:$lane))>;
5001 def : Pat<(NEONvgetlaneu (v8i16 QPR:$src), imm:$lane),
5002 (VGETLNu16 (v4i16 (EXTRACT_SUBREG QPR:$src,
5003 (DSubReg_i16_reg imm:$lane))),
5004 (SubReg_i16_lane imm:$lane))>;
5005 def : Pat<(extractelt (v4i32 QPR:$src), imm:$lane),
5006 (VGETLNi32 (v2i32 (EXTRACT_SUBREG QPR:$src,
5007 (DSubReg_i32_reg imm:$lane))),
5008 (SubReg_i32_lane imm:$lane))>;
5009 def : Pat<(extractelt (v2f32 DPR:$src1), imm:$src2),
5010 (EXTRACT_SUBREG (v2f32 (COPY_TO_REGCLASS (v2f32 DPR:$src1),DPR_VFP2)),
5011 (SSubReg_f32_reg imm:$src2))>;
5012 def : Pat<(extractelt (v4f32 QPR:$src1), imm:$src2),
5013 (EXTRACT_SUBREG (v4f32 (COPY_TO_REGCLASS (v4f32 QPR:$src1),QPR_VFP2)),
5014 (SSubReg_f32_reg imm:$src2))>;
5015 //def : Pat<(extractelt (v2i64 QPR:$src1), imm:$src2),
5016 // (EXTRACT_SUBREG QPR:$src1, (DSubReg_f64_reg imm:$src2))>;
5017 def : Pat<(extractelt (v2f64 QPR:$src1), imm:$src2),
5018 (EXTRACT_SUBREG QPR:$src1, (DSubReg_f64_reg imm:$src2))>;
5021 // VMOV : Vector Set Lane (move ARM core register to scalar)
5023 let Constraints = "$src1 = $V" in {
5024 def VSETLNi8 : NVSetLane<{1,1,1,0,0,1,?,0}, 0b1011, {?,?}, (outs DPR:$V),
5025 (ins DPR:$src1, GPR:$R, VectorIndex8:$lane),
5026 IIC_VMOVISL, "vmov", "8", "$V$lane, $R",
5027 [(set DPR:$V, (vector_insert (v8i8 DPR:$src1),
5028 GPR:$R, imm:$lane))]> {
5029 let Inst{21} = lane{2};
5030 let Inst{6-5} = lane{1-0};
5032 def VSETLNi16 : NVSetLane<{1,1,1,0,0,0,?,0}, 0b1011, {?,1}, (outs DPR:$V),
5033 (ins DPR:$src1, GPR:$R, VectorIndex16:$lane),
5034 IIC_VMOVISL, "vmov", "16", "$V$lane, $R",
5035 [(set DPR:$V, (vector_insert (v4i16 DPR:$src1),
5036 GPR:$R, imm:$lane))]> {
5037 let Inst{21} = lane{1};
5038 let Inst{6} = lane{0};
5040 def VSETLNi32 : NVSetLane<{1,1,1,0,0,0,?,0}, 0b1011, 0b00, (outs DPR:$V),
5041 (ins DPR:$src1, GPR:$R, VectorIndex32:$lane),
5042 IIC_VMOVISL, "vmov", "32", "$V$lane, $R",
5043 [(set DPR:$V, (insertelt (v2i32 DPR:$src1),
5044 GPR:$R, imm:$lane))]> {
5045 let Inst{21} = lane{0};
5048 def : Pat<(vector_insert (v16i8 QPR:$src1), GPR:$src2, imm:$lane),
5049 (v16i8 (INSERT_SUBREG QPR:$src1,
5050 (v8i8 (VSETLNi8 (v8i8 (EXTRACT_SUBREG QPR:$src1,
5051 (DSubReg_i8_reg imm:$lane))),
5052 GPR:$src2, (SubReg_i8_lane imm:$lane))),
5053 (DSubReg_i8_reg imm:$lane)))>;
5054 def : Pat<(vector_insert (v8i16 QPR:$src1), GPR:$src2, imm:$lane),
5055 (v8i16 (INSERT_SUBREG QPR:$src1,
5056 (v4i16 (VSETLNi16 (v4i16 (EXTRACT_SUBREG QPR:$src1,
5057 (DSubReg_i16_reg imm:$lane))),
5058 GPR:$src2, (SubReg_i16_lane imm:$lane))),
5059 (DSubReg_i16_reg imm:$lane)))>;
5060 def : Pat<(insertelt (v4i32 QPR:$src1), GPR:$src2, imm:$lane),
5061 (v4i32 (INSERT_SUBREG QPR:$src1,
5062 (v2i32 (VSETLNi32 (v2i32 (EXTRACT_SUBREG QPR:$src1,
5063 (DSubReg_i32_reg imm:$lane))),
5064 GPR:$src2, (SubReg_i32_lane imm:$lane))),
5065 (DSubReg_i32_reg imm:$lane)))>;
5067 def : Pat<(v2f32 (insertelt DPR:$src1, SPR:$src2, imm:$src3)),
5068 (INSERT_SUBREG (v2f32 (COPY_TO_REGCLASS DPR:$src1, DPR_VFP2)),
5069 SPR:$src2, (SSubReg_f32_reg imm:$src3))>;
5070 def : Pat<(v4f32 (insertelt QPR:$src1, SPR:$src2, imm:$src3)),
5071 (INSERT_SUBREG (v4f32 (COPY_TO_REGCLASS QPR:$src1, QPR_VFP2)),
5072 SPR:$src2, (SSubReg_f32_reg imm:$src3))>;
5074 //def : Pat<(v2i64 (insertelt QPR:$src1, DPR:$src2, imm:$src3)),
5075 // (INSERT_SUBREG QPR:$src1, DPR:$src2, (DSubReg_f64_reg imm:$src3))>;
5076 def : Pat<(v2f64 (insertelt QPR:$src1, DPR:$src2, imm:$src3)),
5077 (INSERT_SUBREG QPR:$src1, DPR:$src2, (DSubReg_f64_reg imm:$src3))>;
5079 def : Pat<(v2f32 (scalar_to_vector SPR:$src)),
5080 (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), SPR:$src, ssub_0)>;
5081 def : Pat<(v2f64 (scalar_to_vector (f64 DPR:$src))),
5082 (INSERT_SUBREG (v2f64 (IMPLICIT_DEF)), DPR:$src, dsub_0)>;
5083 def : Pat<(v4f32 (scalar_to_vector SPR:$src)),
5084 (INSERT_SUBREG (v4f32 (IMPLICIT_DEF)), SPR:$src, ssub_0)>;
5086 def : Pat<(v8i8 (scalar_to_vector GPR:$src)),
5087 (VSETLNi8 (v8i8 (IMPLICIT_DEF)), GPR:$src, (i32 0))>;
5088 def : Pat<(v4i16 (scalar_to_vector GPR:$src)),
5089 (VSETLNi16 (v4i16 (IMPLICIT_DEF)), GPR:$src, (i32 0))>;
5090 def : Pat<(v2i32 (scalar_to_vector GPR:$src)),
5091 (VSETLNi32 (v2i32 (IMPLICIT_DEF)), GPR:$src, (i32 0))>;
5093 def : Pat<(v16i8 (scalar_to_vector GPR:$src)),
5094 (INSERT_SUBREG (v16i8 (IMPLICIT_DEF)),
5095 (VSETLNi8 (v8i8 (IMPLICIT_DEF)), GPR:$src, (i32 0)),
5097 def : Pat<(v8i16 (scalar_to_vector GPR:$src)),
5098 (INSERT_SUBREG (v8i16 (IMPLICIT_DEF)),
5099 (VSETLNi16 (v4i16 (IMPLICIT_DEF)), GPR:$src, (i32 0)),
5101 def : Pat<(v4i32 (scalar_to_vector GPR:$src)),
5102 (INSERT_SUBREG (v4i32 (IMPLICIT_DEF)),
5103 (VSETLNi32 (v2i32 (IMPLICIT_DEF)), GPR:$src, (i32 0)),
5106 // VDUP : Vector Duplicate (from ARM core register to all elements)
5108 class VDUPD<bits<8> opcod1, bits<2> opcod3, string Dt, ValueType Ty>
5109 : NVDup<opcod1, 0b1011, opcod3, (outs DPR:$V), (ins GPR:$R),
5110 IIC_VMOVIS, "vdup", Dt, "$V, $R",
5111 [(set DPR:$V, (Ty (NEONvdup (i32 GPR:$R))))]>;
5112 class VDUPQ<bits<8> opcod1, bits<2> opcod3, string Dt, ValueType Ty>
5113 : NVDup<opcod1, 0b1011, opcod3, (outs QPR:$V), (ins GPR:$R),
5114 IIC_VMOVIS, "vdup", Dt, "$V, $R",
5115 [(set QPR:$V, (Ty (NEONvdup (i32 GPR:$R))))]>;
5117 def VDUP8d : VDUPD<0b11101100, 0b00, "8", v8i8>;
5118 def VDUP16d : VDUPD<0b11101000, 0b01, "16", v4i16>;
5119 def VDUP32d : VDUPD<0b11101000, 0b00, "32", v2i32>;
5120 def VDUP8q : VDUPQ<0b11101110, 0b00, "8", v16i8>;
5121 def VDUP16q : VDUPQ<0b11101010, 0b01, "16", v8i16>;
5122 def VDUP32q : VDUPQ<0b11101010, 0b00, "32", v4i32>;
5124 def : Pat<(v2f32 (NEONvdup (f32 (bitconvert GPR:$R)))), (VDUP32d GPR:$R)>;
5125 def : Pat<(v4f32 (NEONvdup (f32 (bitconvert GPR:$R)))), (VDUP32q GPR:$R)>;
5127 // VDUP : Vector Duplicate Lane (from scalar to all elements)
5129 class VDUPLND<bits<4> op19_16, string OpcodeStr, string Dt,
5130 ValueType Ty, Operand IdxTy>
5131 : NVDupLane<op19_16, 0, (outs DPR:$Vd), (ins DPR:$Vm, IdxTy:$lane),
5132 IIC_VMOVD, OpcodeStr, Dt, "$Vd, $Vm$lane",
5133 [(set DPR:$Vd, (Ty (NEONvduplane (Ty DPR:$Vm), imm:$lane)))]>;
5135 class VDUPLNQ<bits<4> op19_16, string OpcodeStr, string Dt,
5136 ValueType ResTy, ValueType OpTy, Operand IdxTy>
5137 : NVDupLane<op19_16, 1, (outs QPR:$Vd), (ins DPR:$Vm, IdxTy:$lane),
5138 IIC_VMOVQ, OpcodeStr, Dt, "$Vd, $Vm$lane",
5139 [(set QPR:$Vd, (ResTy (NEONvduplane (OpTy DPR:$Vm),
5140 VectorIndex32:$lane)))]>;
5142 // Inst{19-16} is partially specified depending on the element size.
5144 def VDUPLN8d : VDUPLND<{?,?,?,1}, "vdup", "8", v8i8, VectorIndex8> {
5146 let Inst{19-17} = lane{2-0};
5148 def VDUPLN16d : VDUPLND<{?,?,1,0}, "vdup", "16", v4i16, VectorIndex16> {
5150 let Inst{19-18} = lane{1-0};
5152 def VDUPLN32d : VDUPLND<{?,1,0,0}, "vdup", "32", v2i32, VectorIndex32> {
5154 let Inst{19} = lane{0};
5156 def VDUPLN8q : VDUPLNQ<{?,?,?,1}, "vdup", "8", v16i8, v8i8, VectorIndex8> {
5158 let Inst{19-17} = lane{2-0};
5160 def VDUPLN16q : VDUPLNQ<{?,?,1,0}, "vdup", "16", v8i16, v4i16, VectorIndex16> {
5162 let Inst{19-18} = lane{1-0};
5164 def VDUPLN32q : VDUPLNQ<{?,1,0,0}, "vdup", "32", v4i32, v2i32, VectorIndex32> {
5166 let Inst{19} = lane{0};
5169 def : Pat<(v2f32 (NEONvduplane (v2f32 DPR:$Vm), imm:$lane)),
5170 (VDUPLN32d DPR:$Vm, imm:$lane)>;
5172 def : Pat<(v4f32 (NEONvduplane (v2f32 DPR:$Vm), imm:$lane)),
5173 (VDUPLN32q DPR:$Vm, imm:$lane)>;
5175 def : Pat<(v16i8 (NEONvduplane (v16i8 QPR:$src), imm:$lane)),
5176 (v16i8 (VDUPLN8q (v8i8 (EXTRACT_SUBREG QPR:$src,
5177 (DSubReg_i8_reg imm:$lane))),
5178 (SubReg_i8_lane imm:$lane)))>;
5179 def : Pat<(v8i16 (NEONvduplane (v8i16 QPR:$src), imm:$lane)),
5180 (v8i16 (VDUPLN16q (v4i16 (EXTRACT_SUBREG QPR:$src,
5181 (DSubReg_i16_reg imm:$lane))),
5182 (SubReg_i16_lane imm:$lane)))>;
5183 def : Pat<(v4i32 (NEONvduplane (v4i32 QPR:$src), imm:$lane)),
5184 (v4i32 (VDUPLN32q (v2i32 (EXTRACT_SUBREG QPR:$src,
5185 (DSubReg_i32_reg imm:$lane))),
5186 (SubReg_i32_lane imm:$lane)))>;
5187 def : Pat<(v4f32 (NEONvduplane (v4f32 QPR:$src), imm:$lane)),
5188 (v4f32 (VDUPLN32q (v2f32 (EXTRACT_SUBREG QPR:$src,
5189 (DSubReg_i32_reg imm:$lane))),
5190 (SubReg_i32_lane imm:$lane)))>;
5192 def VDUPfdf : PseudoNeonI<(outs DPR:$dst), (ins SPR:$src), IIC_VMOVD, "",
5193 [(set DPR:$dst, (v2f32 (NEONvdup (f32 SPR:$src))))]>;
5194 def VDUPfqf : PseudoNeonI<(outs QPR:$dst), (ins SPR:$src), IIC_VMOVD, "",
5195 [(set QPR:$dst, (v4f32 (NEONvdup (f32 SPR:$src))))]>;
5197 // VMOVN : Vector Narrowing Move
5198 defm VMOVN : N2VN_HSD<0b11,0b11,0b10,0b00100,0,0, IIC_VMOVN,
5199 "vmovn", "i", trunc>;
5200 // VQMOVN : Vector Saturating Narrowing Move
5201 defm VQMOVNs : N2VNInt_HSD<0b11,0b11,0b10,0b00101,0,0, IIC_VQUNAiD,
5202 "vqmovn", "s", int_arm_neon_vqmovns>;
5203 defm VQMOVNu : N2VNInt_HSD<0b11,0b11,0b10,0b00101,1,0, IIC_VQUNAiD,
5204 "vqmovn", "u", int_arm_neon_vqmovnu>;
5205 defm VQMOVNsu : N2VNInt_HSD<0b11,0b11,0b10,0b00100,1,0, IIC_VQUNAiD,
5206 "vqmovun", "s", int_arm_neon_vqmovnsu>;
5207 // VMOVL : Vector Lengthening Move
5208 defm VMOVLs : N2VL_QHS<0b01,0b10100,0,1, "vmovl", "s", sext>;
5209 defm VMOVLu : N2VL_QHS<0b11,0b10100,0,1, "vmovl", "u", zext>;
5210 def : Pat<(v8i16 (anyext (v8i8 DPR:$Vm))), (VMOVLuv8i16 DPR:$Vm)>;
5211 def : Pat<(v4i32 (anyext (v4i16 DPR:$Vm))), (VMOVLuv4i32 DPR:$Vm)>;
5212 def : Pat<(v2i64 (anyext (v2i32 DPR:$Vm))), (VMOVLuv2i64 DPR:$Vm)>;
5214 // Vector Conversions.
5216 // VCVT : Vector Convert Between Floating-Point and Integers
5217 def VCVTf2sd : N2VD<0b11, 0b11, 0b10, 0b11, 0b01110, 0, "vcvt", "s32.f32",
5218 v2i32, v2f32, fp_to_sint>;
5219 def VCVTf2ud : N2VD<0b11, 0b11, 0b10, 0b11, 0b01111, 0, "vcvt", "u32.f32",
5220 v2i32, v2f32, fp_to_uint>;
5221 def VCVTs2fd : N2VD<0b11, 0b11, 0b10, 0b11, 0b01100, 0, "vcvt", "f32.s32",
5222 v2f32, v2i32, sint_to_fp>;
5223 def VCVTu2fd : N2VD<0b11, 0b11, 0b10, 0b11, 0b01101, 0, "vcvt", "f32.u32",
5224 v2f32, v2i32, uint_to_fp>;
5226 def VCVTf2sq : N2VQ<0b11, 0b11, 0b10, 0b11, 0b01110, 0, "vcvt", "s32.f32",
5227 v4i32, v4f32, fp_to_sint>;
5228 def VCVTf2uq : N2VQ<0b11, 0b11, 0b10, 0b11, 0b01111, 0, "vcvt", "u32.f32",
5229 v4i32, v4f32, fp_to_uint>;
5230 def VCVTs2fq : N2VQ<0b11, 0b11, 0b10, 0b11, 0b01100, 0, "vcvt", "f32.s32",
5231 v4f32, v4i32, sint_to_fp>;
5232 def VCVTu2fq : N2VQ<0b11, 0b11, 0b10, 0b11, 0b01101, 0, "vcvt", "f32.u32",
5233 v4f32, v4i32, uint_to_fp>;
5235 // VCVT : Vector Convert Between Floating-Point and Fixed-Point.
5236 let DecoderMethod = "DecodeVCVTD" in {
5237 def VCVTf2xsd : N2VCvtD<0, 1, 0b1111, 0, 1, "vcvt", "s32.f32",
5238 v2i32, v2f32, int_arm_neon_vcvtfp2fxs>;
5239 def VCVTf2xud : N2VCvtD<1, 1, 0b1111, 0, 1, "vcvt", "u32.f32",
5240 v2i32, v2f32, int_arm_neon_vcvtfp2fxu>;
5241 def VCVTxs2fd : N2VCvtD<0, 1, 0b1110, 0, 1, "vcvt", "f32.s32",
5242 v2f32, v2i32, int_arm_neon_vcvtfxs2fp>;
5243 def VCVTxu2fd : N2VCvtD<1, 1, 0b1110, 0, 1, "vcvt", "f32.u32",
5244 v2f32, v2i32, int_arm_neon_vcvtfxu2fp>;
5247 let DecoderMethod = "DecodeVCVTQ" in {
5248 def VCVTf2xsq : N2VCvtQ<0, 1, 0b1111, 0, 1, "vcvt", "s32.f32",
5249 v4i32, v4f32, int_arm_neon_vcvtfp2fxs>;
5250 def VCVTf2xuq : N2VCvtQ<1, 1, 0b1111, 0, 1, "vcvt", "u32.f32",
5251 v4i32, v4f32, int_arm_neon_vcvtfp2fxu>;
5252 def VCVTxs2fq : N2VCvtQ<0, 1, 0b1110, 0, 1, "vcvt", "f32.s32",
5253 v4f32, v4i32, int_arm_neon_vcvtfxs2fp>;
5254 def VCVTxu2fq : N2VCvtQ<1, 1, 0b1110, 0, 1, "vcvt", "f32.u32",
5255 v4f32, v4i32, int_arm_neon_vcvtfxu2fp>;
5258 // VCVT : Vector Convert Between Half-Precision and Single-Precision.
5259 def VCVTf2h : N2VNInt<0b11, 0b11, 0b01, 0b10, 0b01100, 0, 0,
5260 IIC_VUNAQ, "vcvt", "f16.f32",
5261 v4i16, v4f32, int_arm_neon_vcvtfp2hf>,
5262 Requires<[HasNEON, HasFP16]>;
5263 def VCVTh2f : N2VLInt<0b11, 0b11, 0b01, 0b10, 0b01110, 0, 0,
5264 IIC_VUNAQ, "vcvt", "f32.f16",
5265 v4f32, v4i16, int_arm_neon_vcvthf2fp>,
5266 Requires<[HasNEON, HasFP16]>;
5270 // VREV64 : Vector Reverse elements within 64-bit doublewords
5272 class VREV64D<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty>
5273 : N2V<0b11, 0b11, op19_18, 0b00, 0b00000, 0, 0, (outs DPR:$Vd),
5274 (ins DPR:$Vm), IIC_VMOVD,
5275 OpcodeStr, Dt, "$Vd, $Vm", "",
5276 [(set DPR:$Vd, (Ty (NEONvrev64 (Ty DPR:$Vm))))]>;
5277 class VREV64Q<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty>
5278 : N2V<0b11, 0b11, op19_18, 0b00, 0b00000, 1, 0, (outs QPR:$Vd),
5279 (ins QPR:$Vm), IIC_VMOVQ,
5280 OpcodeStr, Dt, "$Vd, $Vm", "",
5281 [(set QPR:$Vd, (Ty (NEONvrev64 (Ty QPR:$Vm))))]>;
5283 def VREV64d8 : VREV64D<0b00, "vrev64", "8", v8i8>;
5284 def VREV64d16 : VREV64D<0b01, "vrev64", "16", v4i16>;
5285 def VREV64d32 : VREV64D<0b10, "vrev64", "32", v2i32>;
5286 def : Pat<(v2f32 (NEONvrev64 (v2f32 DPR:$Vm))), (VREV64d32 DPR:$Vm)>;
5288 def VREV64q8 : VREV64Q<0b00, "vrev64", "8", v16i8>;
5289 def VREV64q16 : VREV64Q<0b01, "vrev64", "16", v8i16>;
5290 def VREV64q32 : VREV64Q<0b10, "vrev64", "32", v4i32>;
5291 def : Pat<(v4f32 (NEONvrev64 (v4f32 QPR:$Vm))), (VREV64q32 QPR:$Vm)>;
5293 // VREV32 : Vector Reverse elements within 32-bit words
5295 class VREV32D<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty>
5296 : N2V<0b11, 0b11, op19_18, 0b00, 0b00001, 0, 0, (outs DPR:$Vd),
5297 (ins DPR:$Vm), IIC_VMOVD,
5298 OpcodeStr, Dt, "$Vd, $Vm", "",
5299 [(set DPR:$Vd, (Ty (NEONvrev32 (Ty DPR:$Vm))))]>;
5300 class VREV32Q<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty>
5301 : N2V<0b11, 0b11, op19_18, 0b00, 0b00001, 1, 0, (outs QPR:$Vd),
5302 (ins QPR:$Vm), IIC_VMOVQ,
5303 OpcodeStr, Dt, "$Vd, $Vm", "",
5304 [(set QPR:$Vd, (Ty (NEONvrev32 (Ty QPR:$Vm))))]>;
5306 def VREV32d8 : VREV32D<0b00, "vrev32", "8", v8i8>;
5307 def VREV32d16 : VREV32D<0b01, "vrev32", "16", v4i16>;
5309 def VREV32q8 : VREV32Q<0b00, "vrev32", "8", v16i8>;
5310 def VREV32q16 : VREV32Q<0b01, "vrev32", "16", v8i16>;
5312 // VREV16 : Vector Reverse elements within 16-bit halfwords
5314 class VREV16D<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty>
5315 : N2V<0b11, 0b11, op19_18, 0b00, 0b00010, 0, 0, (outs DPR:$Vd),
5316 (ins DPR:$Vm), IIC_VMOVD,
5317 OpcodeStr, Dt, "$Vd, $Vm", "",
5318 [(set DPR:$Vd, (Ty (NEONvrev16 (Ty DPR:$Vm))))]>;
5319 class VREV16Q<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty>
5320 : N2V<0b11, 0b11, op19_18, 0b00, 0b00010, 1, 0, (outs QPR:$Vd),
5321 (ins QPR:$Vm), IIC_VMOVQ,
5322 OpcodeStr, Dt, "$Vd, $Vm", "",
5323 [(set QPR:$Vd, (Ty (NEONvrev16 (Ty QPR:$Vm))))]>;
5325 def VREV16d8 : VREV16D<0b00, "vrev16", "8", v8i8>;
5326 def VREV16q8 : VREV16Q<0b00, "vrev16", "8", v16i8>;
5328 // Other Vector Shuffles.
5330 // Aligned extractions: really just dropping registers
5332 class AlignedVEXTq<ValueType DestTy, ValueType SrcTy, SDNodeXForm LaneCVT>
5333 : Pat<(DestTy (vector_extract_subvec (SrcTy QPR:$src), (i32 imm:$start))),
5334 (EXTRACT_SUBREG (SrcTy QPR:$src), (LaneCVT imm:$start))>;
5336 def : AlignedVEXTq<v8i8, v16i8, DSubReg_i8_reg>;
5338 def : AlignedVEXTq<v4i16, v8i16, DSubReg_i16_reg>;
5340 def : AlignedVEXTq<v2i32, v4i32, DSubReg_i32_reg>;
5342 def : AlignedVEXTq<v1i64, v2i64, DSubReg_f64_reg>;
5344 def : AlignedVEXTq<v2f32, v4f32, DSubReg_i32_reg>;
5347 // VEXT : Vector Extract
5349 class VEXTd<string OpcodeStr, string Dt, ValueType Ty, Operand immTy>
5350 : N3V<0,1,0b11,{?,?,?,?},0,0, (outs DPR:$Vd),
5351 (ins DPR:$Vn, DPR:$Vm, immTy:$index), NVExtFrm,
5352 IIC_VEXTD, OpcodeStr, Dt, "$Vd, $Vn, $Vm, $index", "",
5353 [(set DPR:$Vd, (Ty (NEONvext (Ty DPR:$Vn),
5354 (Ty DPR:$Vm), imm:$index)))]> {
5356 let Inst{11-8} = index{3-0};
5359 class VEXTq<string OpcodeStr, string Dt, ValueType Ty, Operand immTy>
5360 : N3V<0,1,0b11,{?,?,?,?},1,0, (outs QPR:$Vd),
5361 (ins QPR:$Vn, QPR:$Vm, imm0_15:$index), NVExtFrm,
5362 IIC_VEXTQ, OpcodeStr, Dt, "$Vd, $Vn, $Vm, $index", "",
5363 [(set QPR:$Vd, (Ty (NEONvext (Ty QPR:$Vn),
5364 (Ty QPR:$Vm), imm:$index)))]> {
5366 let Inst{11-8} = index{3-0};
5369 def VEXTd8 : VEXTd<"vext", "8", v8i8, imm0_7> {
5370 let Inst{11-8} = index{3-0};
5372 def VEXTd16 : VEXTd<"vext", "16", v4i16, imm0_3> {
5373 let Inst{11-9} = index{2-0};
5376 def VEXTd32 : VEXTd<"vext", "32", v2i32, imm0_1> {
5377 let Inst{11-10} = index{1-0};
5378 let Inst{9-8} = 0b00;
5380 def : Pat<(v2f32 (NEONvext (v2f32 DPR:$Vn),
5383 (VEXTd32 DPR:$Vn, DPR:$Vm, imm:$index)>;
5385 def VEXTq8 : VEXTq<"vext", "8", v16i8, imm0_15> {
5386 let Inst{11-8} = index{3-0};
5388 def VEXTq16 : VEXTq<"vext", "16", v8i16, imm0_7> {
5389 let Inst{11-9} = index{2-0};
5392 def VEXTq32 : VEXTq<"vext", "32", v4i32, imm0_3> {
5393 let Inst{11-10} = index{1-0};
5394 let Inst{9-8} = 0b00;
5396 def VEXTq64 : VEXTq<"vext", "64", v2i64, imm0_1> {
5397 let Inst{11} = index{0};
5398 let Inst{10-8} = 0b000;
5400 def : Pat<(v4f32 (NEONvext (v4f32 QPR:$Vn),
5403 (VEXTq32 QPR:$Vn, QPR:$Vm, imm:$index)>;
5405 // VTRN : Vector Transpose
5407 def VTRNd8 : N2VDShuffle<0b00, 0b00001, "vtrn", "8">;
5408 def VTRNd16 : N2VDShuffle<0b01, 0b00001, "vtrn", "16">;
5409 def VTRNd32 : N2VDShuffle<0b10, 0b00001, "vtrn", "32">;
5411 def VTRNq8 : N2VQShuffle<0b00, 0b00001, IIC_VPERMQ, "vtrn", "8">;
5412 def VTRNq16 : N2VQShuffle<0b01, 0b00001, IIC_VPERMQ, "vtrn", "16">;
5413 def VTRNq32 : N2VQShuffle<0b10, 0b00001, IIC_VPERMQ, "vtrn", "32">;
5415 // VUZP : Vector Unzip (Deinterleave)
5417 def VUZPd8 : N2VDShuffle<0b00, 0b00010, "vuzp", "8">;
5418 def VUZPd16 : N2VDShuffle<0b01, 0b00010, "vuzp", "16">;
5419 def VUZPd32 : N2VDShuffle<0b10, 0b00010, "vuzp", "32">;
5421 def VUZPq8 : N2VQShuffle<0b00, 0b00010, IIC_VPERMQ3, "vuzp", "8">;
5422 def VUZPq16 : N2VQShuffle<0b01, 0b00010, IIC_VPERMQ3, "vuzp", "16">;
5423 def VUZPq32 : N2VQShuffle<0b10, 0b00010, IIC_VPERMQ3, "vuzp", "32">;
5425 // VZIP : Vector Zip (Interleave)
5427 def VZIPd8 : N2VDShuffle<0b00, 0b00011, "vzip", "8">;
5428 def VZIPd16 : N2VDShuffle<0b01, 0b00011, "vzip", "16">;
5429 def VZIPd32 : N2VDShuffle<0b10, 0b00011, "vzip", "32">;
5431 def VZIPq8 : N2VQShuffle<0b00, 0b00011, IIC_VPERMQ3, "vzip", "8">;
5432 def VZIPq16 : N2VQShuffle<0b01, 0b00011, IIC_VPERMQ3, "vzip", "16">;
5433 def VZIPq32 : N2VQShuffle<0b10, 0b00011, IIC_VPERMQ3, "vzip", "32">;
5435 // Vector Table Lookup and Table Extension.
5437 // VTBL : Vector Table Lookup
5438 let DecoderMethod = "DecodeTBLInstruction" in {
5440 : N3V<1,1,0b11,0b1000,0,0, (outs DPR:$Vd),
5441 (ins VecListOneD:$Vn, DPR:$Vm), NVTBLFrm, IIC_VTB1,
5442 "vtbl", "8", "$Vd, $Vn, $Vm", "",
5443 [(set DPR:$Vd, (v8i8 (int_arm_neon_vtbl1 VecListOneD:$Vn, DPR:$Vm)))]>;
5444 let hasExtraSrcRegAllocReq = 1 in {
5446 : N3V<1,1,0b11,0b1001,0,0, (outs DPR:$Vd),
5447 (ins VecListTwoD:$Vn, DPR:$Vm), NVTBLFrm, IIC_VTB2,
5448 "vtbl", "8", "$Vd, $Vn, $Vm", "", []>;
5450 : N3V<1,1,0b11,0b1010,0,0, (outs DPR:$Vd),
5451 (ins VecListThreeD:$Vn, DPR:$Vm), NVTBLFrm, IIC_VTB3,
5452 "vtbl", "8", "$Vd, $Vn, $Vm", "", []>;
5454 : N3V<1,1,0b11,0b1011,0,0, (outs DPR:$Vd),
5455 (ins VecListFourD:$Vn, DPR:$Vm),
5457 "vtbl", "8", "$Vd, $Vn, $Vm", "", []>;
5458 } // hasExtraSrcRegAllocReq = 1
5461 : PseudoNeonI<(outs DPR:$dst), (ins QPR:$tbl, DPR:$src), IIC_VTB2, "", []>;
5463 : PseudoNeonI<(outs DPR:$dst), (ins QQPR:$tbl, DPR:$src), IIC_VTB3, "", []>;
5465 : PseudoNeonI<(outs DPR:$dst), (ins QQPR:$tbl, DPR:$src), IIC_VTB4, "", []>;
5467 // VTBX : Vector Table Extension
5469 : N3V<1,1,0b11,0b1000,1,0, (outs DPR:$Vd),
5470 (ins DPR:$orig, VecListOneD:$Vn, DPR:$Vm), NVTBLFrm, IIC_VTBX1,
5471 "vtbx", "8", "$Vd, $Vn, $Vm", "$orig = $Vd",
5472 [(set DPR:$Vd, (v8i8 (int_arm_neon_vtbx1
5473 DPR:$orig, VecListOneD:$Vn, DPR:$Vm)))]>;
5474 let hasExtraSrcRegAllocReq = 1 in {
5476 : N3V<1,1,0b11,0b1001,1,0, (outs DPR:$Vd),
5477 (ins DPR:$orig, VecListTwoD:$Vn, DPR:$Vm), NVTBLFrm, IIC_VTBX2,
5478 "vtbx", "8", "$Vd, $Vn, $Vm", "$orig = $Vd", []>;
5480 : N3V<1,1,0b11,0b1010,1,0, (outs DPR:$Vd),
5481 (ins DPR:$orig, VecListThreeD:$Vn, DPR:$Vm),
5482 NVTBLFrm, IIC_VTBX3,
5483 "vtbx", "8", "$Vd, $Vn, $Vm",
5486 : N3V<1,1,0b11,0b1011,1,0, (outs DPR:$Vd),
5487 (ins DPR:$orig, VecListFourD:$Vn, DPR:$Vm), NVTBLFrm, IIC_VTBX4,
5488 "vtbx", "8", "$Vd, $Vn, $Vm",
5490 } // hasExtraSrcRegAllocReq = 1
5493 : PseudoNeonI<(outs DPR:$dst), (ins DPR:$orig, QPR:$tbl, DPR:$src),
5494 IIC_VTBX2, "$orig = $dst", []>;
5496 : PseudoNeonI<(outs DPR:$dst), (ins DPR:$orig, QQPR:$tbl, DPR:$src),
5497 IIC_VTBX3, "$orig = $dst", []>;
5499 : PseudoNeonI<(outs DPR:$dst), (ins DPR:$orig, QQPR:$tbl, DPR:$src),
5500 IIC_VTBX4, "$orig = $dst", []>;
5501 } // DecoderMethod = "DecodeTBLInstruction"
5503 //===----------------------------------------------------------------------===//
5504 // NEON instructions for single-precision FP math
5505 //===----------------------------------------------------------------------===//
5507 class N2VSPat<SDNode OpNode, NeonI Inst>
5508 : NEONFPPat<(f32 (OpNode SPR:$a)),
5510 (v2f32 (COPY_TO_REGCLASS (Inst
5512 (v2f32 (COPY_TO_REGCLASS (v2f32 (IMPLICIT_DEF)), DPR_VFP2)),
5513 SPR:$a, ssub_0)), DPR_VFP2)), ssub_0)>;
5515 class N3VSPat<SDNode OpNode, NeonI Inst>
5516 : NEONFPPat<(f32 (OpNode SPR:$a, SPR:$b)),
5518 (v2f32 (COPY_TO_REGCLASS (Inst
5520 (v2f32 (COPY_TO_REGCLASS (v2f32 (IMPLICIT_DEF)), DPR_VFP2)),
5523 (v2f32 (COPY_TO_REGCLASS (v2f32 (IMPLICIT_DEF)), DPR_VFP2)),
5524 SPR:$b, ssub_0)), DPR_VFP2)), ssub_0)>;
5526 class N3VSMulOpPat<SDNode MulNode, SDNode OpNode, NeonI Inst>
5527 : NEONFPPat<(f32 (OpNode SPR:$acc, (f32 (MulNode SPR:$a, SPR:$b)))),
5529 (v2f32 (COPY_TO_REGCLASS (Inst
5531 (v2f32 (COPY_TO_REGCLASS (v2f32 (IMPLICIT_DEF)), DPR_VFP2)),
5534 (v2f32 (COPY_TO_REGCLASS (v2f32 (IMPLICIT_DEF)), DPR_VFP2)),
5537 (v2f32 (COPY_TO_REGCLASS (v2f32 (IMPLICIT_DEF)), DPR_VFP2)),
5538 SPR:$b, ssub_0)), DPR_VFP2)), ssub_0)>;
5540 def : N3VSPat<fadd, VADDfd>;
5541 def : N3VSPat<fsub, VSUBfd>;
5542 def : N3VSPat<fmul, VMULfd>;
5543 def : N3VSMulOpPat<fmul, fadd, VMLAfd>,
5544 Requires<[HasNEON, UseNEONForFP, UseFPVMLx, NoNEONVFP4]>;
5545 def : N3VSMulOpPat<fmul, fsub, VMLSfd>,
5546 Requires<[HasNEON, UseNEONForFP, UseFPVMLx, NoNEONVFP4]>;
5547 def : N3VSMulOpPat<fmul, fadd, VFMAfd>,
5548 Requires<[HasNEONVFP4, UseNEONForFP]>;
5549 def : N3VSMulOpPat<fmul, fsub, VFMSfd>,
5550 Requires<[HasNEONVFP4, UseNEONForFP]>;
5551 def : N2VSPat<fabs, VABSfd>;
5552 def : N2VSPat<fneg, VNEGfd>;
5553 def : N3VSPat<NEONfmax, VMAXfd>;
5554 def : N3VSPat<NEONfmin, VMINfd>;
5555 def : N2VSPat<arm_ftosi, VCVTf2sd>;
5556 def : N2VSPat<arm_ftoui, VCVTf2ud>;
5557 def : N2VSPat<arm_sitof, VCVTs2fd>;
5558 def : N2VSPat<arm_uitof, VCVTu2fd>;
5560 //===----------------------------------------------------------------------===//
5561 // Non-Instruction Patterns
5562 //===----------------------------------------------------------------------===//
5565 def : Pat<(v1i64 (bitconvert (v2i32 DPR:$src))), (v1i64 DPR:$src)>;
5566 def : Pat<(v1i64 (bitconvert (v4i16 DPR:$src))), (v1i64 DPR:$src)>;
5567 def : Pat<(v1i64 (bitconvert (v8i8 DPR:$src))), (v1i64 DPR:$src)>;
5568 def : Pat<(v1i64 (bitconvert (f64 DPR:$src))), (v1i64 DPR:$src)>;
5569 def : Pat<(v1i64 (bitconvert (v2f32 DPR:$src))), (v1i64 DPR:$src)>;
5570 def : Pat<(v2i32 (bitconvert (v1i64 DPR:$src))), (v2i32 DPR:$src)>;
5571 def : Pat<(v2i32 (bitconvert (v4i16 DPR:$src))), (v2i32 DPR:$src)>;
5572 def : Pat<(v2i32 (bitconvert (v8i8 DPR:$src))), (v2i32 DPR:$src)>;
5573 def : Pat<(v2i32 (bitconvert (f64 DPR:$src))), (v2i32 DPR:$src)>;
5574 def : Pat<(v2i32 (bitconvert (v2f32 DPR:$src))), (v2i32 DPR:$src)>;
5575 def : Pat<(v4i16 (bitconvert (v1i64 DPR:$src))), (v4i16 DPR:$src)>;
5576 def : Pat<(v4i16 (bitconvert (v2i32 DPR:$src))), (v4i16 DPR:$src)>;
5577 def : Pat<(v4i16 (bitconvert (v8i8 DPR:$src))), (v4i16 DPR:$src)>;
5578 def : Pat<(v4i16 (bitconvert (f64 DPR:$src))), (v4i16 DPR:$src)>;
5579 def : Pat<(v4i16 (bitconvert (v2f32 DPR:$src))), (v4i16 DPR:$src)>;
5580 def : Pat<(v8i8 (bitconvert (v1i64 DPR:$src))), (v8i8 DPR:$src)>;
5581 def : Pat<(v8i8 (bitconvert (v2i32 DPR:$src))), (v8i8 DPR:$src)>;
5582 def : Pat<(v8i8 (bitconvert (v4i16 DPR:$src))), (v8i8 DPR:$src)>;
5583 def : Pat<(v8i8 (bitconvert (f64 DPR:$src))), (v8i8 DPR:$src)>;
5584 def : Pat<(v8i8 (bitconvert (v2f32 DPR:$src))), (v8i8 DPR:$src)>;
5585 def : Pat<(f64 (bitconvert (v1i64 DPR:$src))), (f64 DPR:$src)>;
5586 def : Pat<(f64 (bitconvert (v2i32 DPR:$src))), (f64 DPR:$src)>;
5587 def : Pat<(f64 (bitconvert (v4i16 DPR:$src))), (f64 DPR:$src)>;
5588 def : Pat<(f64 (bitconvert (v8i8 DPR:$src))), (f64 DPR:$src)>;
5589 def : Pat<(f64 (bitconvert (v2f32 DPR:$src))), (f64 DPR:$src)>;
5590 def : Pat<(v2f32 (bitconvert (f64 DPR:$src))), (v2f32 DPR:$src)>;
5591 def : Pat<(v2f32 (bitconvert (v1i64 DPR:$src))), (v2f32 DPR:$src)>;
5592 def : Pat<(v2f32 (bitconvert (v2i32 DPR:$src))), (v2f32 DPR:$src)>;
5593 def : Pat<(v2f32 (bitconvert (v4i16 DPR:$src))), (v2f32 DPR:$src)>;
5594 def : Pat<(v2f32 (bitconvert (v8i8 DPR:$src))), (v2f32 DPR:$src)>;
5596 def : Pat<(v2i64 (bitconvert (v4i32 QPR:$src))), (v2i64 QPR:$src)>;
5597 def : Pat<(v2i64 (bitconvert (v8i16 QPR:$src))), (v2i64 QPR:$src)>;
5598 def : Pat<(v2i64 (bitconvert (v16i8 QPR:$src))), (v2i64 QPR:$src)>;
5599 def : Pat<(v2i64 (bitconvert (v2f64 QPR:$src))), (v2i64 QPR:$src)>;
5600 def : Pat<(v2i64 (bitconvert (v4f32 QPR:$src))), (v2i64 QPR:$src)>;
5601 def : Pat<(v4i32 (bitconvert (v2i64 QPR:$src))), (v4i32 QPR:$src)>;
5602 def : Pat<(v4i32 (bitconvert (v8i16 QPR:$src))), (v4i32 QPR:$src)>;
5603 def : Pat<(v4i32 (bitconvert (v16i8 QPR:$src))), (v4i32 QPR:$src)>;
5604 def : Pat<(v4i32 (bitconvert (v2f64 QPR:$src))), (v4i32 QPR:$src)>;
5605 def : Pat<(v4i32 (bitconvert (v4f32 QPR:$src))), (v4i32 QPR:$src)>;
5606 def : Pat<(v8i16 (bitconvert (v2i64 QPR:$src))), (v8i16 QPR:$src)>;
5607 def : Pat<(v8i16 (bitconvert (v4i32 QPR:$src))), (v8i16 QPR:$src)>;
5608 def : Pat<(v8i16 (bitconvert (v16i8 QPR:$src))), (v8i16 QPR:$src)>;
5609 def : Pat<(v8i16 (bitconvert (v2f64 QPR:$src))), (v8i16 QPR:$src)>;
5610 def : Pat<(v8i16 (bitconvert (v4f32 QPR:$src))), (v8i16 QPR:$src)>;
5611 def : Pat<(v16i8 (bitconvert (v2i64 QPR:$src))), (v16i8 QPR:$src)>;
5612 def : Pat<(v16i8 (bitconvert (v4i32 QPR:$src))), (v16i8 QPR:$src)>;
5613 def : Pat<(v16i8 (bitconvert (v8i16 QPR:$src))), (v16i8 QPR:$src)>;
5614 def : Pat<(v16i8 (bitconvert (v2f64 QPR:$src))), (v16i8 QPR:$src)>;
5615 def : Pat<(v16i8 (bitconvert (v4f32 QPR:$src))), (v16i8 QPR:$src)>;
5616 def : Pat<(v4f32 (bitconvert (v2i64 QPR:$src))), (v4f32 QPR:$src)>;
5617 def : Pat<(v4f32 (bitconvert (v4i32 QPR:$src))), (v4f32 QPR:$src)>;
5618 def : Pat<(v4f32 (bitconvert (v8i16 QPR:$src))), (v4f32 QPR:$src)>;
5619 def : Pat<(v4f32 (bitconvert (v16i8 QPR:$src))), (v4f32 QPR:$src)>;
5620 def : Pat<(v4f32 (bitconvert (v2f64 QPR:$src))), (v4f32 QPR:$src)>;
5621 def : Pat<(v2f64 (bitconvert (v2i64 QPR:$src))), (v2f64 QPR:$src)>;
5622 def : Pat<(v2f64 (bitconvert (v4i32 QPR:$src))), (v2f64 QPR:$src)>;
5623 def : Pat<(v2f64 (bitconvert (v8i16 QPR:$src))), (v2f64 QPR:$src)>;
5624 def : Pat<(v2f64 (bitconvert (v16i8 QPR:$src))), (v2f64 QPR:$src)>;
5625 def : Pat<(v2f64 (bitconvert (v4f32 QPR:$src))), (v2f64 QPR:$src)>;
5628 //===----------------------------------------------------------------------===//
5629 // Assembler aliases
5632 def : VFP2InstAlias<"fmdhr${p} $Dd, $Rn",
5633 (VSETLNi32 DPR:$Dd, GPR:$Rn, 1, pred:$p)>;
5634 def : VFP2InstAlias<"fmdlr${p} $Dd, $Rn",
5635 (VSETLNi32 DPR:$Dd, GPR:$Rn, 0, pred:$p)>;
5638 // VADD two-operand aliases.
5639 def : NEONInstAlias<"vadd${p}.i8 $Vdn, $Vm",
5640 (VADDv16i8 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5641 def : NEONInstAlias<"vadd${p}.i16 $Vdn, $Vm",
5642 (VADDv8i16 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5643 def : NEONInstAlias<"vadd${p}.i32 $Vdn, $Vm",
5644 (VADDv4i32 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5645 def : NEONInstAlias<"vadd${p}.i64 $Vdn, $Vm",
5646 (VADDv2i64 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5648 def : NEONInstAlias<"vadd${p}.i8 $Vdn, $Vm",
5649 (VADDv8i8 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5650 def : NEONInstAlias<"vadd${p}.i16 $Vdn, $Vm",
5651 (VADDv4i16 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5652 def : NEONInstAlias<"vadd${p}.i32 $Vdn, $Vm",
5653 (VADDv2i32 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5654 def : NEONInstAlias<"vadd${p}.i64 $Vdn, $Vm",
5655 (VADDv1i64 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5657 def : NEONInstAlias<"vadd${p}.f32 $Vdn, $Vm",
5658 (VADDfd DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5659 def : NEONInstAlias<"vadd${p}.f32 $Vdn, $Vm",
5660 (VADDfq QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5662 // VSUB two-operand aliases.
5663 def : NEONInstAlias<"vsub${p}.i8 $Vdn, $Vm",
5664 (VSUBv16i8 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5665 def : NEONInstAlias<"vsub${p}.i16 $Vdn, $Vm",
5666 (VSUBv8i16 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5667 def : NEONInstAlias<"vsub${p}.i32 $Vdn, $Vm",
5668 (VSUBv4i32 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5669 def : NEONInstAlias<"vsub${p}.i64 $Vdn, $Vm",
5670 (VSUBv2i64 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5672 def : NEONInstAlias<"vsub${p}.i8 $Vdn, $Vm",
5673 (VSUBv8i8 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5674 def : NEONInstAlias<"vsub${p}.i16 $Vdn, $Vm",
5675 (VSUBv4i16 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5676 def : NEONInstAlias<"vsub${p}.i32 $Vdn, $Vm",
5677 (VSUBv2i32 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5678 def : NEONInstAlias<"vsub${p}.i64 $Vdn, $Vm",
5679 (VSUBv1i64 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5681 def : NEONInstAlias<"vsub${p}.f32 $Vdn, $Vm",
5682 (VSUBfd DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5683 def : NEONInstAlias<"vsub${p}.f32 $Vdn, $Vm",
5684 (VSUBfq QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5686 // VADDW two-operand aliases.
5687 def : NEONInstAlias<"vaddw${p}.s8 $Vdn, $Vm",
5688 (VADDWsv8i16 QPR:$Vdn, QPR:$Vdn, DPR:$Vm, pred:$p)>;
5689 def : NEONInstAlias<"vaddw${p}.s16 $Vdn, $Vm",
5690 (VADDWsv4i32 QPR:$Vdn, QPR:$Vdn, DPR:$Vm, pred:$p)>;
5691 def : NEONInstAlias<"vaddw${p}.s32 $Vdn, $Vm",
5692 (VADDWsv2i64 QPR:$Vdn, QPR:$Vdn, DPR:$Vm, pred:$p)>;
5693 def : NEONInstAlias<"vaddw${p}.u8 $Vdn, $Vm",
5694 (VADDWuv8i16 QPR:$Vdn, QPR:$Vdn, DPR:$Vm, pred:$p)>;
5695 def : NEONInstAlias<"vaddw${p}.u16 $Vdn, $Vm",
5696 (VADDWuv4i32 QPR:$Vdn, QPR:$Vdn, DPR:$Vm, pred:$p)>;
5697 def : NEONInstAlias<"vaddw${p}.u32 $Vdn, $Vm",
5698 (VADDWuv2i64 QPR:$Vdn, QPR:$Vdn, DPR:$Vm, pred:$p)>;
5700 // VAND/VBIC/VEOR/VORR accept but do not require a type suffix.
5701 defm : NEONDTAnyInstAlias<"vand${p}", "$Vd, $Vn, $Vm",
5702 (VANDd DPR:$Vd, DPR:$Vn, DPR:$Vm, pred:$p)>;
5703 defm : NEONDTAnyInstAlias<"vand${p}", "$Vd, $Vn, $Vm",
5704 (VANDq QPR:$Vd, QPR:$Vn, QPR:$Vm, pred:$p)>;
5705 defm : NEONDTAnyInstAlias<"vbic${p}", "$Vd, $Vn, $Vm",
5706 (VBICd DPR:$Vd, DPR:$Vn, DPR:$Vm, pred:$p)>;
5707 defm : NEONDTAnyInstAlias<"vbic${p}", "$Vd, $Vn, $Vm",
5708 (VBICq QPR:$Vd, QPR:$Vn, QPR:$Vm, pred:$p)>;
5709 defm : NEONDTAnyInstAlias<"veor${p}", "$Vd, $Vn, $Vm",
5710 (VEORd DPR:$Vd, DPR:$Vn, DPR:$Vm, pred:$p)>;
5711 defm : NEONDTAnyInstAlias<"veor${p}", "$Vd, $Vn, $Vm",
5712 (VEORq QPR:$Vd, QPR:$Vn, QPR:$Vm, pred:$p)>;
5713 defm : NEONDTAnyInstAlias<"vorr${p}", "$Vd, $Vn, $Vm",
5714 (VORRd DPR:$Vd, DPR:$Vn, DPR:$Vm, pred:$p)>;
5715 defm : NEONDTAnyInstAlias<"vorr${p}", "$Vd, $Vn, $Vm",
5716 (VORRq QPR:$Vd, QPR:$Vn, QPR:$Vm, pred:$p)>;
5717 // ... two-operand aliases
5718 def : NEONInstAlias<"vand${p} $Vdn, $Vm",
5719 (VANDd DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5720 def : NEONInstAlias<"vand${p} $Vdn, $Vm",
5721 (VANDq QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5722 def : NEONInstAlias<"vbic${p} $Vdn, $Vm",
5723 (VBICd DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5724 def : NEONInstAlias<"vbic${p} $Vdn, $Vm",
5725 (VBICq QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5726 def : NEONInstAlias<"veor${p} $Vdn, $Vm",
5727 (VEORd DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5728 def : NEONInstAlias<"veor${p} $Vdn, $Vm",
5729 (VEORq QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5730 def : NEONInstAlias<"vorr${p} $Vdn, $Vm",
5731 (VORRd DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5732 def : NEONInstAlias<"vorr${p} $Vdn, $Vm",
5733 (VORRq QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5735 defm : NEONDTAnyInstAlias<"vand${p}", "$Vdn, $Vm",
5736 (VANDd DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5737 defm : NEONDTAnyInstAlias<"vand${p}", "$Vdn, $Vm",
5738 (VANDq QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5739 defm : NEONDTAnyInstAlias<"veor${p}", "$Vdn, $Vm",
5740 (VEORd DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5741 defm : NEONDTAnyInstAlias<"veor${p}", "$Vdn, $Vm",
5742 (VEORq QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5743 defm : NEONDTAnyInstAlias<"vorr${p}", "$Vdn, $Vm",
5744 (VORRd DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5745 defm : NEONDTAnyInstAlias<"vorr${p}", "$Vdn, $Vm",
5746 (VORRq QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5748 // VMUL two-operand aliases.
5749 def : NEONInstAlias<"vmul${p}.p8 $Qdn, $Qm",
5750 (VMULpq QPR:$Qdn, QPR:$Qdn, QPR:$Qm, pred:$p)>;
5751 def : NEONInstAlias<"vmul${p}.i8 $Qdn, $Qm",
5752 (VMULv16i8 QPR:$Qdn, QPR:$Qdn, QPR:$Qm, pred:$p)>;
5753 def : NEONInstAlias<"vmul${p}.i16 $Qdn, $Qm",
5754 (VMULv8i16 QPR:$Qdn, QPR:$Qdn, QPR:$Qm, pred:$p)>;
5755 def : NEONInstAlias<"vmul${p}.i32 $Qdn, $Qm",
5756 (VMULv4i32 QPR:$Qdn, QPR:$Qdn, QPR:$Qm, pred:$p)>;
5758 def : NEONInstAlias<"vmul${p}.p8 $Ddn, $Dm",
5759 (VMULpd DPR:$Ddn, DPR:$Ddn, DPR:$Dm, pred:$p)>;
5760 def : NEONInstAlias<"vmul${p}.i8 $Ddn, $Dm",
5761 (VMULv8i8 DPR:$Ddn, DPR:$Ddn, DPR:$Dm, pred:$p)>;
5762 def : NEONInstAlias<"vmul${p}.i16 $Ddn, $Dm",
5763 (VMULv4i16 DPR:$Ddn, DPR:$Ddn, DPR:$Dm, pred:$p)>;
5764 def : NEONInstAlias<"vmul${p}.i32 $Ddn, $Dm",
5765 (VMULv2i32 DPR:$Ddn, DPR:$Ddn, DPR:$Dm, pred:$p)>;
5767 def : NEONInstAlias<"vmul${p}.f32 $Qdn, $Qm",
5768 (VMULfq QPR:$Qdn, QPR:$Qdn, QPR:$Qm, pred:$p)>;
5769 def : NEONInstAlias<"vmul${p}.f32 $Ddn, $Dm",
5770 (VMULfd DPR:$Ddn, DPR:$Ddn, DPR:$Dm, pred:$p)>;
5772 def : NEONInstAlias<"vmul${p}.i16 $Ddn, $Dm$lane",
5773 (VMULslv4i16 DPR:$Ddn, DPR:$Ddn, DPR_8:$Dm,
5774 VectorIndex16:$lane, pred:$p)>;
5775 def : NEONInstAlias<"vmul${p}.i16 $Qdn, $Dm$lane",
5776 (VMULslv8i16 QPR:$Qdn, QPR:$Qdn, DPR_8:$Dm,
5777 VectorIndex16:$lane, pred:$p)>;
5779 def : NEONInstAlias<"vmul${p}.i32 $Ddn, $Dm$lane",
5780 (VMULslv2i32 DPR:$Ddn, DPR:$Ddn, DPR_VFP2:$Dm,
5781 VectorIndex32:$lane, pred:$p)>;
5782 def : NEONInstAlias<"vmul${p}.i32 $Qdn, $Dm$lane",
5783 (VMULslv4i32 QPR:$Qdn, QPR:$Qdn, DPR_VFP2:$Dm,
5784 VectorIndex32:$lane, pred:$p)>;
5786 def : NEONInstAlias<"vmul${p}.f32 $Ddn, $Dm$lane",
5787 (VMULslfd DPR:$Ddn, DPR:$Ddn, DPR_VFP2:$Dm,
5788 VectorIndex32:$lane, pred:$p)>;
5789 def : NEONInstAlias<"vmul${p}.f32 $Qdn, $Dm$lane",
5790 (VMULslfq QPR:$Qdn, QPR:$Qdn, DPR_VFP2:$Dm,
5791 VectorIndex32:$lane, pred:$p)>;
5793 // VQADD (register) two-operand aliases.
5794 def : NEONInstAlias<"vqadd${p}.s8 $Vdn, $Vm",
5795 (VQADDsv8i8 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5796 def : NEONInstAlias<"vqadd${p}.s16 $Vdn, $Vm",
5797 (VQADDsv4i16 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5798 def : NEONInstAlias<"vqadd${p}.s32 $Vdn, $Vm",
5799 (VQADDsv2i32 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5800 def : NEONInstAlias<"vqadd${p}.s64 $Vdn, $Vm",
5801 (VQADDsv1i64 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5802 def : NEONInstAlias<"vqadd${p}.u8 $Vdn, $Vm",
5803 (VQADDuv8i8 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5804 def : NEONInstAlias<"vqadd${p}.u16 $Vdn, $Vm",
5805 (VQADDuv4i16 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5806 def : NEONInstAlias<"vqadd${p}.u32 $Vdn, $Vm",
5807 (VQADDuv2i32 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5808 def : NEONInstAlias<"vqadd${p}.u64 $Vdn, $Vm",
5809 (VQADDuv1i64 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5811 def : NEONInstAlias<"vqadd${p}.s8 $Vdn, $Vm",
5812 (VQADDsv16i8 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5813 def : NEONInstAlias<"vqadd${p}.s16 $Vdn, $Vm",
5814 (VQADDsv8i16 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5815 def : NEONInstAlias<"vqadd${p}.s32 $Vdn, $Vm",
5816 (VQADDsv4i32 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5817 def : NEONInstAlias<"vqadd${p}.s64 $Vdn, $Vm",
5818 (VQADDsv2i64 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5819 def : NEONInstAlias<"vqadd${p}.u8 $Vdn, $Vm",
5820 (VQADDuv16i8 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5821 def : NEONInstAlias<"vqadd${p}.u16 $Vdn, $Vm",
5822 (VQADDuv8i16 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5823 def : NEONInstAlias<"vqadd${p}.u32 $Vdn, $Vm",
5824 (VQADDuv4i32 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5825 def : NEONInstAlias<"vqadd${p}.u64 $Vdn, $Vm",
5826 (VQADDuv2i64 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5828 // VSHL (immediate) two-operand aliases.
5829 def : NEONInstAlias<"vshl${p}.i8 $Vdn, $imm",
5830 (VSHLiv8i8 DPR:$Vdn, DPR:$Vdn, imm0_7:$imm, pred:$p)>;
5831 def : NEONInstAlias<"vshl${p}.i16 $Vdn, $imm",
5832 (VSHLiv4i16 DPR:$Vdn, DPR:$Vdn, imm0_15:$imm, pred:$p)>;
5833 def : NEONInstAlias<"vshl${p}.i32 $Vdn, $imm",
5834 (VSHLiv2i32 DPR:$Vdn, DPR:$Vdn, imm0_31:$imm, pred:$p)>;
5835 def : NEONInstAlias<"vshl${p}.i64 $Vdn, $imm",
5836 (VSHLiv1i64 DPR:$Vdn, DPR:$Vdn, imm0_63:$imm, pred:$p)>;
5838 def : NEONInstAlias<"vshl${p}.i8 $Vdn, $imm",
5839 (VSHLiv16i8 QPR:$Vdn, QPR:$Vdn, imm0_7:$imm, pred:$p)>;
5840 def : NEONInstAlias<"vshl${p}.i16 $Vdn, $imm",
5841 (VSHLiv8i16 QPR:$Vdn, QPR:$Vdn, imm0_15:$imm, pred:$p)>;
5842 def : NEONInstAlias<"vshl${p}.i32 $Vdn, $imm",
5843 (VSHLiv4i32 QPR:$Vdn, QPR:$Vdn, imm0_31:$imm, pred:$p)>;
5844 def : NEONInstAlias<"vshl${p}.i64 $Vdn, $imm",
5845 (VSHLiv2i64 QPR:$Vdn, QPR:$Vdn, imm0_63:$imm, pred:$p)>;
5847 // VSHL (register) two-operand aliases.
5848 def : NEONInstAlias<"vshl${p}.s8 $Vdn, $Vm",
5849 (VSHLsv8i8 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5850 def : NEONInstAlias<"vshl${p}.s16 $Vdn, $Vm",
5851 (VSHLsv4i16 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5852 def : NEONInstAlias<"vshl${p}.s32 $Vdn, $Vm",
5853 (VSHLsv2i32 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5854 def : NEONInstAlias<"vshl${p}.s64 $Vdn, $Vm",
5855 (VSHLsv1i64 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5856 def : NEONInstAlias<"vshl${p}.u8 $Vdn, $Vm",
5857 (VSHLuv8i8 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5858 def : NEONInstAlias<"vshl${p}.u16 $Vdn, $Vm",
5859 (VSHLuv4i16 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5860 def : NEONInstAlias<"vshl${p}.u32 $Vdn, $Vm",
5861 (VSHLuv2i32 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5862 def : NEONInstAlias<"vshl${p}.u64 $Vdn, $Vm",
5863 (VSHLuv1i64 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
5865 def : NEONInstAlias<"vshl${p}.s8 $Vdn, $Vm",
5866 (VSHLsv16i8 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5867 def : NEONInstAlias<"vshl${p}.s16 $Vdn, $Vm",
5868 (VSHLsv8i16 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5869 def : NEONInstAlias<"vshl${p}.s32 $Vdn, $Vm",
5870 (VSHLsv4i32 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5871 def : NEONInstAlias<"vshl${p}.s64 $Vdn, $Vm",
5872 (VSHLsv2i64 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5873 def : NEONInstAlias<"vshl${p}.u8 $Vdn, $Vm",
5874 (VSHLuv16i8 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5875 def : NEONInstAlias<"vshl${p}.u16 $Vdn, $Vm",
5876 (VSHLuv8i16 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5877 def : NEONInstAlias<"vshl${p}.u32 $Vdn, $Vm",
5878 (VSHLuv4i32 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5879 def : NEONInstAlias<"vshl${p}.u64 $Vdn, $Vm",
5880 (VSHLuv2i64 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
5882 // VSHL (immediate) two-operand aliases.
5883 def : NEONInstAlias<"vshr${p}.s8 $Vdn, $imm",
5884 (VSHRsv8i8 DPR:$Vdn, DPR:$Vdn, shr_imm8:$imm, pred:$p)>;
5885 def : NEONInstAlias<"vshr${p}.s16 $Vdn, $imm",
5886 (VSHRsv4i16 DPR:$Vdn, DPR:$Vdn, shr_imm16:$imm, pred:$p)>;
5887 def : NEONInstAlias<"vshr${p}.s32 $Vdn, $imm",
5888 (VSHRsv2i32 DPR:$Vdn, DPR:$Vdn, shr_imm32:$imm, pred:$p)>;
5889 def : NEONInstAlias<"vshr${p}.s64 $Vdn, $imm",
5890 (VSHRsv1i64 DPR:$Vdn, DPR:$Vdn, shr_imm64:$imm, pred:$p)>;
5892 def : NEONInstAlias<"vshr${p}.s8 $Vdn, $imm",
5893 (VSHRsv16i8 QPR:$Vdn, QPR:$Vdn, shr_imm8:$imm, pred:$p)>;
5894 def : NEONInstAlias<"vshr${p}.s16 $Vdn, $imm",
5895 (VSHRsv8i16 QPR:$Vdn, QPR:$Vdn, shr_imm16:$imm, pred:$p)>;
5896 def : NEONInstAlias<"vshr${p}.s32 $Vdn, $imm",
5897 (VSHRsv4i32 QPR:$Vdn, QPR:$Vdn, shr_imm32:$imm, pred:$p)>;
5898 def : NEONInstAlias<"vshr${p}.s64 $Vdn, $imm",
5899 (VSHRsv2i64 QPR:$Vdn, QPR:$Vdn, shr_imm64:$imm, pred:$p)>;
5901 def : NEONInstAlias<"vshr${p}.u8 $Vdn, $imm",
5902 (VSHRuv8i8 DPR:$Vdn, DPR:$Vdn, shr_imm8:$imm, pred:$p)>;
5903 def : NEONInstAlias<"vshr${p}.u16 $Vdn, $imm",
5904 (VSHRuv4i16 DPR:$Vdn, DPR:$Vdn, shr_imm16:$imm, pred:$p)>;
5905 def : NEONInstAlias<"vshr${p}.u32 $Vdn, $imm",
5906 (VSHRuv2i32 DPR:$Vdn, DPR:$Vdn, shr_imm32:$imm, pred:$p)>;
5907 def : NEONInstAlias<"vshr${p}.u64 $Vdn, $imm",
5908 (VSHRuv1i64 DPR:$Vdn, DPR:$Vdn, shr_imm64:$imm, pred:$p)>;
5910 def : NEONInstAlias<"vshr${p}.u8 $Vdn, $imm",
5911 (VSHRuv16i8 QPR:$Vdn, QPR:$Vdn, shr_imm8:$imm, pred:$p)>;
5912 def : NEONInstAlias<"vshr${p}.u16 $Vdn, $imm",
5913 (VSHRuv8i16 QPR:$Vdn, QPR:$Vdn, shr_imm16:$imm, pred:$p)>;
5914 def : NEONInstAlias<"vshr${p}.u32 $Vdn, $imm",
5915 (VSHRuv4i32 QPR:$Vdn, QPR:$Vdn, shr_imm32:$imm, pred:$p)>;
5916 def : NEONInstAlias<"vshr${p}.u64 $Vdn, $imm",
5917 (VSHRuv2i64 QPR:$Vdn, QPR:$Vdn, shr_imm64:$imm, pred:$p)>;
5919 // VLD1 single-lane pseudo-instructions. These need special handling for
5920 // the lane index that an InstAlias can't handle, so we use these instead.
5921 def VLD1LNdAsm_8 : NEONDataTypeAsmPseudoInst<"vld1${p}", ".8", "$list, $addr",
5922 (ins VecListOneDByteIndexed:$list, addrmode6:$addr, pred:$p)>;
5923 def VLD1LNdAsm_16 : NEONDataTypeAsmPseudoInst<"vld1${p}", ".16", "$list, $addr",
5924 (ins VecListOneDHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
5925 def VLD1LNdAsm_32 : NEONDataTypeAsmPseudoInst<"vld1${p}", ".32", "$list, $addr",
5926 (ins VecListOneDWordIndexed:$list, addrmode6:$addr, pred:$p)>;
5928 def VLD1LNdWB_fixed_Asm_8 :
5929 NEONDataTypeAsmPseudoInst<"vld1${p}", ".8", "$list, $addr!",
5930 (ins VecListOneDByteIndexed:$list, addrmode6:$addr, pred:$p)>;
5931 def VLD1LNdWB_fixed_Asm_16 :
5932 NEONDataTypeAsmPseudoInst<"vld1${p}", ".16", "$list, $addr!",
5933 (ins VecListOneDHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
5934 def VLD1LNdWB_fixed_Asm_32 :
5935 NEONDataTypeAsmPseudoInst<"vld1${p}", ".32", "$list, $addr!",
5936 (ins VecListOneDWordIndexed:$list, addrmode6:$addr, pred:$p)>;
5937 def VLD1LNdWB_register_Asm_8 :
5938 NEONDataTypeAsmPseudoInst<"vld1${p}", ".8", "$list, $addr, $Rm",
5939 (ins VecListOneDByteIndexed:$list, addrmode6:$addr,
5940 rGPR:$Rm, pred:$p)>;
5941 def VLD1LNdWB_register_Asm_16 :
5942 NEONDataTypeAsmPseudoInst<"vld1${p}", ".16", "$list, $addr, $Rm",
5943 (ins VecListOneDHWordIndexed:$list, addrmode6:$addr,
5944 rGPR:$Rm, pred:$p)>;
5945 def VLD1LNdWB_register_Asm_32 :
5946 NEONDataTypeAsmPseudoInst<"vld1${p}", ".32", "$list, $addr, $Rm",
5947 (ins VecListOneDWordIndexed:$list, addrmode6:$addr,
5948 rGPR:$Rm, pred:$p)>;
5951 // VST1 single-lane pseudo-instructions. These need special handling for
5952 // the lane index that an InstAlias can't handle, so we use these instead.
5953 def VST1LNdAsm_8 : NEONDataTypeAsmPseudoInst<"vst1${p}", ".8", "$list, $addr",
5954 (ins VecListOneDByteIndexed:$list, addrmode6:$addr, pred:$p)>;
5955 def VST1LNdAsm_16 : NEONDataTypeAsmPseudoInst<"vst1${p}", ".16", "$list, $addr",
5956 (ins VecListOneDHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
5957 def VST1LNdAsm_32 : NEONDataTypeAsmPseudoInst<"vst1${p}", ".32", "$list, $addr",
5958 (ins VecListOneDWordIndexed:$list, addrmode6:$addr, pred:$p)>;
5960 def VST1LNdWB_fixed_Asm_8 :
5961 NEONDataTypeAsmPseudoInst<"vst1${p}", ".8", "$list, $addr!",
5962 (ins VecListOneDByteIndexed:$list, addrmode6:$addr, pred:$p)>;
5963 def VST1LNdWB_fixed_Asm_16 :
5964 NEONDataTypeAsmPseudoInst<"vst1${p}", ".16", "$list, $addr!",
5965 (ins VecListOneDHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
5966 def VST1LNdWB_fixed_Asm_32 :
5967 NEONDataTypeAsmPseudoInst<"vst1${p}", ".32", "$list, $addr!",
5968 (ins VecListOneDWordIndexed:$list, addrmode6:$addr, pred:$p)>;
5969 def VST1LNdWB_register_Asm_8 :
5970 NEONDataTypeAsmPseudoInst<"vst1${p}", ".8", "$list, $addr, $Rm",
5971 (ins VecListOneDByteIndexed:$list, addrmode6:$addr,
5972 rGPR:$Rm, pred:$p)>;
5973 def VST1LNdWB_register_Asm_16 :
5974 NEONDataTypeAsmPseudoInst<"vst1${p}", ".16", "$list, $addr, $Rm",
5975 (ins VecListOneDHWordIndexed:$list, addrmode6:$addr,
5976 rGPR:$Rm, pred:$p)>;
5977 def VST1LNdWB_register_Asm_32 :
5978 NEONDataTypeAsmPseudoInst<"vst1${p}", ".32", "$list, $addr, $Rm",
5979 (ins VecListOneDWordIndexed:$list, addrmode6:$addr,
5980 rGPR:$Rm, pred:$p)>;
5982 // VLD2 single-lane pseudo-instructions. These need special handling for
5983 // the lane index that an InstAlias can't handle, so we use these instead.
5984 def VLD2LNdAsm_8 : NEONDataTypeAsmPseudoInst<"vld2${p}", ".8", "$list, $addr",
5985 (ins VecListTwoDByteIndexed:$list, addrmode6:$addr, pred:$p)>;
5986 def VLD2LNdAsm_16 : NEONDataTypeAsmPseudoInst<"vld2${p}", ".16", "$list, $addr",
5987 (ins VecListTwoDHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
5988 def VLD2LNdAsm_32 : NEONDataTypeAsmPseudoInst<"vld2${p}", ".32", "$list, $addr",
5989 (ins VecListTwoDWordIndexed:$list, addrmode6:$addr, pred:$p)>;
5990 def VLD2LNqAsm_16 : NEONDataTypeAsmPseudoInst<"vld2${p}", ".16", "$list, $addr",
5991 (ins VecListTwoQHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
5992 def VLD2LNqAsm_32 : NEONDataTypeAsmPseudoInst<"vld2${p}", ".32", "$list, $addr",
5993 (ins VecListTwoQWordIndexed:$list, addrmode6:$addr, pred:$p)>;
5995 def VLD2LNdWB_fixed_Asm_8 :
5996 NEONDataTypeAsmPseudoInst<"vld2${p}", ".8", "$list, $addr!",
5997 (ins VecListTwoDByteIndexed:$list, addrmode6:$addr, pred:$p)>;
5998 def VLD2LNdWB_fixed_Asm_16 :
5999 NEONDataTypeAsmPseudoInst<"vld2${p}", ".16", "$list, $addr!",
6000 (ins VecListTwoDHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6001 def VLD2LNdWB_fixed_Asm_32 :
6002 NEONDataTypeAsmPseudoInst<"vld2${p}", ".32", "$list, $addr!",
6003 (ins VecListTwoDWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6004 def VLD2LNqWB_fixed_Asm_16 :
6005 NEONDataTypeAsmPseudoInst<"vld2${p}", ".16", "$list, $addr!",
6006 (ins VecListTwoQHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6007 def VLD2LNqWB_fixed_Asm_32 :
6008 NEONDataTypeAsmPseudoInst<"vld2${p}", ".32", "$list, $addr!",
6009 (ins VecListTwoQWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6010 def VLD2LNdWB_register_Asm_8 :
6011 NEONDataTypeAsmPseudoInst<"vld2${p}", ".8", "$list, $addr, $Rm",
6012 (ins VecListTwoDByteIndexed:$list, addrmode6:$addr,
6013 rGPR:$Rm, pred:$p)>;
6014 def VLD2LNdWB_register_Asm_16 :
6015 NEONDataTypeAsmPseudoInst<"vld2${p}", ".16", "$list, $addr, $Rm",
6016 (ins VecListTwoDHWordIndexed:$list, addrmode6:$addr,
6017 rGPR:$Rm, pred:$p)>;
6018 def VLD2LNdWB_register_Asm_32 :
6019 NEONDataTypeAsmPseudoInst<"vld2${p}", ".32", "$list, $addr, $Rm",
6020 (ins VecListTwoDWordIndexed:$list, addrmode6:$addr,
6021 rGPR:$Rm, pred:$p)>;
6022 def VLD2LNqWB_register_Asm_16 :
6023 NEONDataTypeAsmPseudoInst<"vld2${p}", ".16", "$list, $addr, $Rm",
6024 (ins VecListTwoQHWordIndexed:$list, addrmode6:$addr,
6025 rGPR:$Rm, pred:$p)>;
6026 def VLD2LNqWB_register_Asm_32 :
6027 NEONDataTypeAsmPseudoInst<"vld2${p}", ".32", "$list, $addr, $Rm",
6028 (ins VecListTwoQWordIndexed:$list, addrmode6:$addr,
6029 rGPR:$Rm, pred:$p)>;
6032 // VST2 single-lane pseudo-instructions. These need special handling for
6033 // the lane index that an InstAlias can't handle, so we use these instead.
6034 def VST2LNdAsm_8 : NEONDataTypeAsmPseudoInst<"vst2${p}", ".8", "$list, $addr",
6035 (ins VecListTwoDByteIndexed:$list, addrmode6:$addr, pred:$p)>;
6036 def VST2LNdAsm_16 : NEONDataTypeAsmPseudoInst<"vst2${p}", ".16", "$list, $addr",
6037 (ins VecListTwoDHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6038 def VST2LNdAsm_32 : NEONDataTypeAsmPseudoInst<"vst2${p}", ".32", "$list, $addr",
6039 (ins VecListTwoDWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6040 def VST2LNqAsm_16 : NEONDataTypeAsmPseudoInst<"vst2${p}", ".16", "$list, $addr",
6041 (ins VecListTwoQHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6042 def VST2LNqAsm_32 : NEONDataTypeAsmPseudoInst<"vst2${p}", ".32", "$list, $addr",
6043 (ins VecListTwoQWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6045 def VST2LNdWB_fixed_Asm_8 :
6046 NEONDataTypeAsmPseudoInst<"vst2${p}", ".8", "$list, $addr!",
6047 (ins VecListTwoDByteIndexed:$list, addrmode6:$addr, pred:$p)>;
6048 def VST2LNdWB_fixed_Asm_16 :
6049 NEONDataTypeAsmPseudoInst<"vst2${p}", ".16", "$list, $addr!",
6050 (ins VecListTwoDHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6051 def VST2LNdWB_fixed_Asm_32 :
6052 NEONDataTypeAsmPseudoInst<"vst2${p}", ".32", "$list, $addr!",
6053 (ins VecListTwoDWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6054 def VST2LNqWB_fixed_Asm_16 :
6055 NEONDataTypeAsmPseudoInst<"vst2${p}", ".16", "$list, $addr!",
6056 (ins VecListTwoQHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6057 def VST2LNqWB_fixed_Asm_32 :
6058 NEONDataTypeAsmPseudoInst<"vst2${p}", ".32", "$list, $addr!",
6059 (ins VecListTwoQWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6060 def VST2LNdWB_register_Asm_8 :
6061 NEONDataTypeAsmPseudoInst<"vst2${p}", ".8", "$list, $addr, $Rm",
6062 (ins VecListTwoDByteIndexed:$list, addrmode6:$addr,
6063 rGPR:$Rm, pred:$p)>;
6064 def VST2LNdWB_register_Asm_16 :
6065 NEONDataTypeAsmPseudoInst<"vst2${p}", ".16","$list, $addr, $Rm",
6066 (ins VecListTwoDHWordIndexed:$list, addrmode6:$addr,
6067 rGPR:$Rm, pred:$p)>;
6068 def VST2LNdWB_register_Asm_32 :
6069 NEONDataTypeAsmPseudoInst<"vst2${p}", ".32", "$list, $addr, $Rm",
6070 (ins VecListTwoDWordIndexed:$list, addrmode6:$addr,
6071 rGPR:$Rm, pred:$p)>;
6072 def VST2LNqWB_register_Asm_16 :
6073 NEONDataTypeAsmPseudoInst<"vst2${p}", ".16","$list, $addr, $Rm",
6074 (ins VecListTwoQHWordIndexed:$list, addrmode6:$addr,
6075 rGPR:$Rm, pred:$p)>;
6076 def VST2LNqWB_register_Asm_32 :
6077 NEONDataTypeAsmPseudoInst<"vst2${p}", ".32", "$list, $addr, $Rm",
6078 (ins VecListTwoQWordIndexed:$list, addrmode6:$addr,
6079 rGPR:$Rm, pred:$p)>;
6081 // VLD3 all-lanes pseudo-instructions. These need special handling for
6082 // the lane index that an InstAlias can't handle, so we use these instead.
6083 def VLD3DUPdAsm_8 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr",
6084 (ins VecListThreeDAllLanes:$list, addrmode6:$addr, pred:$p)>;
6085 def VLD3DUPdAsm_16 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr",
6086 (ins VecListThreeDAllLanes:$list, addrmode6:$addr, pred:$p)>;
6087 def VLD3DUPdAsm_32 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr",
6088 (ins VecListThreeDAllLanes:$list, addrmode6:$addr, pred:$p)>;
6089 def VLD3DUPqAsm_8 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr",
6090 (ins VecListThreeQAllLanes:$list, addrmode6:$addr, pred:$p)>;
6091 def VLD3DUPqAsm_16 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr",
6092 (ins VecListThreeQAllLanes:$list, addrmode6:$addr, pred:$p)>;
6093 def VLD3DUPqAsm_32 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr",
6094 (ins VecListThreeQAllLanes:$list, addrmode6:$addr, pred:$p)>;
6096 def VLD3DUPdWB_fixed_Asm_8 :
6097 NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr!",
6098 (ins VecListThreeDAllLanes:$list, addrmode6:$addr, pred:$p)>;
6099 def VLD3DUPdWB_fixed_Asm_16 :
6100 NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr!",
6101 (ins VecListThreeDAllLanes:$list, addrmode6:$addr, pred:$p)>;
6102 def VLD3DUPdWB_fixed_Asm_32 :
6103 NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr!",
6104 (ins VecListThreeDAllLanes:$list, addrmode6:$addr, pred:$p)>;
6105 def VLD3DUPqWB_fixed_Asm_8 :
6106 NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr!",
6107 (ins VecListThreeQAllLanes:$list, addrmode6:$addr, pred:$p)>;
6108 def VLD3DUPqWB_fixed_Asm_16 :
6109 NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr!",
6110 (ins VecListThreeQAllLanes:$list, addrmode6:$addr, pred:$p)>;
6111 def VLD3DUPqWB_fixed_Asm_32 :
6112 NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr!",
6113 (ins VecListThreeQAllLanes:$list, addrmode6:$addr, pred:$p)>;
6114 def VLD3DUPdWB_register_Asm_8 :
6115 NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr, $Rm",
6116 (ins VecListThreeDAllLanes:$list, addrmode6:$addr,
6117 rGPR:$Rm, pred:$p)>;
6118 def VLD3DUPdWB_register_Asm_16 :
6119 NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr, $Rm",
6120 (ins VecListThreeDAllLanes:$list, addrmode6:$addr,
6121 rGPR:$Rm, pred:$p)>;
6122 def VLD3DUPdWB_register_Asm_32 :
6123 NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr, $Rm",
6124 (ins VecListThreeDAllLanes:$list, addrmode6:$addr,
6125 rGPR:$Rm, pred:$p)>;
6126 def VLD3DUPqWB_register_Asm_8 :
6127 NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr, $Rm",
6128 (ins VecListThreeQAllLanes:$list, addrmode6:$addr,
6129 rGPR:$Rm, pred:$p)>;
6130 def VLD3DUPqWB_register_Asm_16 :
6131 NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr, $Rm",
6132 (ins VecListThreeQAllLanes:$list, addrmode6:$addr,
6133 rGPR:$Rm, pred:$p)>;
6134 def VLD3DUPqWB_register_Asm_32 :
6135 NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr, $Rm",
6136 (ins VecListThreeQAllLanes:$list, addrmode6:$addr,
6137 rGPR:$Rm, pred:$p)>;
6140 // VLD3 single-lane pseudo-instructions. These need special handling for
6141 // the lane index that an InstAlias can't handle, so we use these instead.
6142 def VLD3LNdAsm_8 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr",
6143 (ins VecListThreeDByteIndexed:$list, addrmode6:$addr, pred:$p)>;
6144 def VLD3LNdAsm_16 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr",
6145 (ins VecListThreeDHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6146 def VLD3LNdAsm_32 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr",
6147 (ins VecListThreeDWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6148 def VLD3LNqAsm_16 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr",
6149 (ins VecListThreeQHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6150 def VLD3LNqAsm_32 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr",
6151 (ins VecListThreeQWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6153 def VLD3LNdWB_fixed_Asm_8 :
6154 NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr!",
6155 (ins VecListThreeDByteIndexed:$list, addrmode6:$addr, pred:$p)>;
6156 def VLD3LNdWB_fixed_Asm_16 :
6157 NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr!",
6158 (ins VecListThreeDHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6159 def VLD3LNdWB_fixed_Asm_32 :
6160 NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr!",
6161 (ins VecListThreeDWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6162 def VLD3LNqWB_fixed_Asm_16 :
6163 NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr!",
6164 (ins VecListThreeQHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6165 def VLD3LNqWB_fixed_Asm_32 :
6166 NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr!",
6167 (ins VecListThreeQWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6168 def VLD3LNdWB_register_Asm_8 :
6169 NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr, $Rm",
6170 (ins VecListThreeDByteIndexed:$list, addrmode6:$addr,
6171 rGPR:$Rm, pred:$p)>;
6172 def VLD3LNdWB_register_Asm_16 :
6173 NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr, $Rm",
6174 (ins VecListThreeDHWordIndexed:$list, addrmode6:$addr,
6175 rGPR:$Rm, pred:$p)>;
6176 def VLD3LNdWB_register_Asm_32 :
6177 NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr, $Rm",
6178 (ins VecListThreeDWordIndexed:$list, addrmode6:$addr,
6179 rGPR:$Rm, pred:$p)>;
6180 def VLD3LNqWB_register_Asm_16 :
6181 NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr, $Rm",
6182 (ins VecListThreeQHWordIndexed:$list, addrmode6:$addr,
6183 rGPR:$Rm, pred:$p)>;
6184 def VLD3LNqWB_register_Asm_32 :
6185 NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr, $Rm",
6186 (ins VecListThreeQWordIndexed:$list, addrmode6:$addr,
6187 rGPR:$Rm, pred:$p)>;
6189 // VLD3 multiple structure pseudo-instructions. These need special handling for
6190 // the vector operands that the normal instructions don't yet model.
6191 // FIXME: Remove these when the register classes and instructions are updated.
6192 def VLD3dAsm_8 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr",
6193 (ins VecListThreeD:$list, addrmode6:$addr, pred:$p)>;
6194 def VLD3dAsm_16 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr",
6195 (ins VecListThreeD:$list, addrmode6:$addr, pred:$p)>;
6196 def VLD3dAsm_32 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr",
6197 (ins VecListThreeD:$list, addrmode6:$addr, pred:$p)>;
6198 def VLD3qAsm_8 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr",
6199 (ins VecListThreeQ:$list, addrmode6:$addr, pred:$p)>;
6200 def VLD3qAsm_16 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr",
6201 (ins VecListThreeQ:$list, addrmode6:$addr, pred:$p)>;
6202 def VLD3qAsm_32 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr",
6203 (ins VecListThreeQ:$list, addrmode6:$addr, pred:$p)>;
6205 def VLD3dWB_fixed_Asm_8 :
6206 NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr!",
6207 (ins VecListThreeD:$list, addrmode6:$addr, pred:$p)>;
6208 def VLD3dWB_fixed_Asm_16 :
6209 NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr!",
6210 (ins VecListThreeD:$list, addrmode6:$addr, pred:$p)>;
6211 def VLD3dWB_fixed_Asm_32 :
6212 NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr!",
6213 (ins VecListThreeD:$list, addrmode6:$addr, pred:$p)>;
6214 def VLD3qWB_fixed_Asm_8 :
6215 NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr!",
6216 (ins VecListThreeQ:$list, addrmode6:$addr, pred:$p)>;
6217 def VLD3qWB_fixed_Asm_16 :
6218 NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr!",
6219 (ins VecListThreeQ:$list, addrmode6:$addr, pred:$p)>;
6220 def VLD3qWB_fixed_Asm_32 :
6221 NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr!",
6222 (ins VecListThreeQ:$list, addrmode6:$addr, pred:$p)>;
6223 def VLD3dWB_register_Asm_8 :
6224 NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr, $Rm",
6225 (ins VecListThreeD:$list, addrmode6:$addr,
6226 rGPR:$Rm, pred:$p)>;
6227 def VLD3dWB_register_Asm_16 :
6228 NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr, $Rm",
6229 (ins VecListThreeD:$list, addrmode6:$addr,
6230 rGPR:$Rm, pred:$p)>;
6231 def VLD3dWB_register_Asm_32 :
6232 NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr, $Rm",
6233 (ins VecListThreeD:$list, addrmode6:$addr,
6234 rGPR:$Rm, pred:$p)>;
6235 def VLD3qWB_register_Asm_8 :
6236 NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr, $Rm",
6237 (ins VecListThreeQ:$list, addrmode6:$addr,
6238 rGPR:$Rm, pred:$p)>;
6239 def VLD3qWB_register_Asm_16 :
6240 NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr, $Rm",
6241 (ins VecListThreeQ:$list, addrmode6:$addr,
6242 rGPR:$Rm, pred:$p)>;
6243 def VLD3qWB_register_Asm_32 :
6244 NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr, $Rm",
6245 (ins VecListThreeQ:$list, addrmode6:$addr,
6246 rGPR:$Rm, pred:$p)>;
6248 // VST3 single-lane pseudo-instructions. These need special handling for
6249 // the lane index that an InstAlias can't handle, so we use these instead.
6250 def VST3LNdAsm_8 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr",
6251 (ins VecListThreeDByteIndexed:$list, addrmode6:$addr, pred:$p)>;
6252 def VST3LNdAsm_16 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr",
6253 (ins VecListThreeDHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6254 def VST3LNdAsm_32 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr",
6255 (ins VecListThreeDWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6256 def VST3LNqAsm_16 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr",
6257 (ins VecListThreeQHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6258 def VST3LNqAsm_32 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr",
6259 (ins VecListThreeQWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6261 def VST3LNdWB_fixed_Asm_8 :
6262 NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr!",
6263 (ins VecListThreeDByteIndexed:$list, addrmode6:$addr, pred:$p)>;
6264 def VST3LNdWB_fixed_Asm_16 :
6265 NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr!",
6266 (ins VecListThreeDHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6267 def VST3LNdWB_fixed_Asm_32 :
6268 NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr!",
6269 (ins VecListThreeDWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6270 def VST3LNqWB_fixed_Asm_16 :
6271 NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr!",
6272 (ins VecListThreeQHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6273 def VST3LNqWB_fixed_Asm_32 :
6274 NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr!",
6275 (ins VecListThreeQWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6276 def VST3LNdWB_register_Asm_8 :
6277 NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr, $Rm",
6278 (ins VecListThreeDByteIndexed:$list, addrmode6:$addr,
6279 rGPR:$Rm, pred:$p)>;
6280 def VST3LNdWB_register_Asm_16 :
6281 NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr, $Rm",
6282 (ins VecListThreeDHWordIndexed:$list, addrmode6:$addr,
6283 rGPR:$Rm, pred:$p)>;
6284 def VST3LNdWB_register_Asm_32 :
6285 NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr, $Rm",
6286 (ins VecListThreeDWordIndexed:$list, addrmode6:$addr,
6287 rGPR:$Rm, pred:$p)>;
6288 def VST3LNqWB_register_Asm_16 :
6289 NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr, $Rm",
6290 (ins VecListThreeQHWordIndexed:$list, addrmode6:$addr,
6291 rGPR:$Rm, pred:$p)>;
6292 def VST3LNqWB_register_Asm_32 :
6293 NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr, $Rm",
6294 (ins VecListThreeQWordIndexed:$list, addrmode6:$addr,
6295 rGPR:$Rm, pred:$p)>;
6298 // VST3 multiple structure pseudo-instructions. These need special handling for
6299 // the vector operands that the normal instructions don't yet model.
6300 // FIXME: Remove these when the register classes and instructions are updated.
6301 def VST3dAsm_8 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr",
6302 (ins VecListThreeD:$list, addrmode6:$addr, pred:$p)>;
6303 def VST3dAsm_16 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr",
6304 (ins VecListThreeD:$list, addrmode6:$addr, pred:$p)>;
6305 def VST3dAsm_32 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr",
6306 (ins VecListThreeD:$list, addrmode6:$addr, pred:$p)>;
6307 def VST3qAsm_8 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr",
6308 (ins VecListThreeQ:$list, addrmode6:$addr, pred:$p)>;
6309 def VST3qAsm_16 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr",
6310 (ins VecListThreeQ:$list, addrmode6:$addr, pred:$p)>;
6311 def VST3qAsm_32 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr",
6312 (ins VecListThreeQ:$list, addrmode6:$addr, pred:$p)>;
6314 def VST3dWB_fixed_Asm_8 :
6315 NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr!",
6316 (ins VecListThreeD:$list, addrmode6:$addr, pred:$p)>;
6317 def VST3dWB_fixed_Asm_16 :
6318 NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr!",
6319 (ins VecListThreeD:$list, addrmode6:$addr, pred:$p)>;
6320 def VST3dWB_fixed_Asm_32 :
6321 NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr!",
6322 (ins VecListThreeD:$list, addrmode6:$addr, pred:$p)>;
6323 def VST3qWB_fixed_Asm_8 :
6324 NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr!",
6325 (ins VecListThreeQ:$list, addrmode6:$addr, pred:$p)>;
6326 def VST3qWB_fixed_Asm_16 :
6327 NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr!",
6328 (ins VecListThreeQ:$list, addrmode6:$addr, pred:$p)>;
6329 def VST3qWB_fixed_Asm_32 :
6330 NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr!",
6331 (ins VecListThreeQ:$list, addrmode6:$addr, pred:$p)>;
6332 def VST3dWB_register_Asm_8 :
6333 NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr, $Rm",
6334 (ins VecListThreeD:$list, addrmode6:$addr,
6335 rGPR:$Rm, pred:$p)>;
6336 def VST3dWB_register_Asm_16 :
6337 NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr, $Rm",
6338 (ins VecListThreeD:$list, addrmode6:$addr,
6339 rGPR:$Rm, pred:$p)>;
6340 def VST3dWB_register_Asm_32 :
6341 NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr, $Rm",
6342 (ins VecListThreeD:$list, addrmode6:$addr,
6343 rGPR:$Rm, pred:$p)>;
6344 def VST3qWB_register_Asm_8 :
6345 NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr, $Rm",
6346 (ins VecListThreeQ:$list, addrmode6:$addr,
6347 rGPR:$Rm, pred:$p)>;
6348 def VST3qWB_register_Asm_16 :
6349 NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr, $Rm",
6350 (ins VecListThreeQ:$list, addrmode6:$addr,
6351 rGPR:$Rm, pred:$p)>;
6352 def VST3qWB_register_Asm_32 :
6353 NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr, $Rm",
6354 (ins VecListThreeQ:$list, addrmode6:$addr,
6355 rGPR:$Rm, pred:$p)>;
6357 // VLD4 all-lanes pseudo-instructions. These need special handling for
6358 // the lane index that an InstAlias can't handle, so we use these instead.
6359 def VLD4DUPdAsm_8 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr",
6360 (ins VecListFourDAllLanes:$list, addrmode6:$addr, pred:$p)>;
6361 def VLD4DUPdAsm_16 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr",
6362 (ins VecListFourDAllLanes:$list, addrmode6:$addr, pred:$p)>;
6363 def VLD4DUPdAsm_32 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr",
6364 (ins VecListFourDAllLanes:$list, addrmode6:$addr, pred:$p)>;
6365 def VLD4DUPqAsm_8 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr",
6366 (ins VecListFourQAllLanes:$list, addrmode6:$addr, pred:$p)>;
6367 def VLD4DUPqAsm_16 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr",
6368 (ins VecListFourQAllLanes:$list, addrmode6:$addr, pred:$p)>;
6369 def VLD4DUPqAsm_32 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr",
6370 (ins VecListFourQAllLanes:$list, addrmode6:$addr, pred:$p)>;
6372 def VLD4DUPdWB_fixed_Asm_8 :
6373 NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr!",
6374 (ins VecListFourDAllLanes:$list, addrmode6:$addr, pred:$p)>;
6375 def VLD4DUPdWB_fixed_Asm_16 :
6376 NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr!",
6377 (ins VecListFourDAllLanes:$list, addrmode6:$addr, pred:$p)>;
6378 def VLD4DUPdWB_fixed_Asm_32 :
6379 NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr!",
6380 (ins VecListFourDAllLanes:$list, addrmode6:$addr, pred:$p)>;
6381 def VLD4DUPqWB_fixed_Asm_8 :
6382 NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr!",
6383 (ins VecListFourQAllLanes:$list, addrmode6:$addr, pred:$p)>;
6384 def VLD4DUPqWB_fixed_Asm_16 :
6385 NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr!",
6386 (ins VecListFourQAllLanes:$list, addrmode6:$addr, pred:$p)>;
6387 def VLD4DUPqWB_fixed_Asm_32 :
6388 NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr!",
6389 (ins VecListFourQAllLanes:$list, addrmode6:$addr, pred:$p)>;
6390 def VLD4DUPdWB_register_Asm_8 :
6391 NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr, $Rm",
6392 (ins VecListFourDAllLanes:$list, addrmode6:$addr,
6393 rGPR:$Rm, pred:$p)>;
6394 def VLD4DUPdWB_register_Asm_16 :
6395 NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr, $Rm",
6396 (ins VecListFourDAllLanes:$list, addrmode6:$addr,
6397 rGPR:$Rm, pred:$p)>;
6398 def VLD4DUPdWB_register_Asm_32 :
6399 NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr, $Rm",
6400 (ins VecListFourDAllLanes:$list, addrmode6:$addr,
6401 rGPR:$Rm, pred:$p)>;
6402 def VLD4DUPqWB_register_Asm_8 :
6403 NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr, $Rm",
6404 (ins VecListFourQAllLanes:$list, addrmode6:$addr,
6405 rGPR:$Rm, pred:$p)>;
6406 def VLD4DUPqWB_register_Asm_16 :
6407 NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr, $Rm",
6408 (ins VecListFourQAllLanes:$list, addrmode6:$addr,
6409 rGPR:$Rm, pred:$p)>;
6410 def VLD4DUPqWB_register_Asm_32 :
6411 NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr, $Rm",
6412 (ins VecListFourQAllLanes:$list, addrmode6:$addr,
6413 rGPR:$Rm, pred:$p)>;
6416 // VLD4 single-lane pseudo-instructions. These need special handling for
6417 // the lane index that an InstAlias can't handle, so we use these instead.
6418 def VLD4LNdAsm_8 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr",
6419 (ins VecListFourDByteIndexed:$list, addrmode6:$addr, pred:$p)>;
6420 def VLD4LNdAsm_16 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr",
6421 (ins VecListFourDHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6422 def VLD4LNdAsm_32 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr",
6423 (ins VecListFourDWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6424 def VLD4LNqAsm_16 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr",
6425 (ins VecListFourQHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6426 def VLD4LNqAsm_32 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr",
6427 (ins VecListFourQWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6429 def VLD4LNdWB_fixed_Asm_8 :
6430 NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr!",
6431 (ins VecListFourDByteIndexed:$list, addrmode6:$addr, pred:$p)>;
6432 def VLD4LNdWB_fixed_Asm_16 :
6433 NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr!",
6434 (ins VecListFourDHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6435 def VLD4LNdWB_fixed_Asm_32 :
6436 NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr!",
6437 (ins VecListFourDWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6438 def VLD4LNqWB_fixed_Asm_16 :
6439 NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr!",
6440 (ins VecListFourQHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6441 def VLD4LNqWB_fixed_Asm_32 :
6442 NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr!",
6443 (ins VecListFourQWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6444 def VLD4LNdWB_register_Asm_8 :
6445 NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr, $Rm",
6446 (ins VecListFourDByteIndexed:$list, addrmode6:$addr,
6447 rGPR:$Rm, pred:$p)>;
6448 def VLD4LNdWB_register_Asm_16 :
6449 NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr, $Rm",
6450 (ins VecListFourDHWordIndexed:$list, addrmode6:$addr,
6451 rGPR:$Rm, pred:$p)>;
6452 def VLD4LNdWB_register_Asm_32 :
6453 NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr, $Rm",
6454 (ins VecListFourDWordIndexed:$list, addrmode6:$addr,
6455 rGPR:$Rm, pred:$p)>;
6456 def VLD4LNqWB_register_Asm_16 :
6457 NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr, $Rm",
6458 (ins VecListFourQHWordIndexed:$list, addrmode6:$addr,
6459 rGPR:$Rm, pred:$p)>;
6460 def VLD4LNqWB_register_Asm_32 :
6461 NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr, $Rm",
6462 (ins VecListFourQWordIndexed:$list, addrmode6:$addr,
6463 rGPR:$Rm, pred:$p)>;
6467 // VLD4 multiple structure pseudo-instructions. These need special handling for
6468 // the vector operands that the normal instructions don't yet model.
6469 // FIXME: Remove these when the register classes and instructions are updated.
6470 def VLD4dAsm_8 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr",
6471 (ins VecListFourD:$list, addrmode6:$addr, pred:$p)>;
6472 def VLD4dAsm_16 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr",
6473 (ins VecListFourD:$list, addrmode6:$addr, pred:$p)>;
6474 def VLD4dAsm_32 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr",
6475 (ins VecListFourD:$list, addrmode6:$addr, pred:$p)>;
6476 def VLD4qAsm_8 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr",
6477 (ins VecListFourQ:$list, addrmode6:$addr, pred:$p)>;
6478 def VLD4qAsm_16 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr",
6479 (ins VecListFourQ:$list, addrmode6:$addr, pred:$p)>;
6480 def VLD4qAsm_32 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr",
6481 (ins VecListFourQ:$list, addrmode6:$addr, pred:$p)>;
6483 def VLD4dWB_fixed_Asm_8 :
6484 NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr!",
6485 (ins VecListFourD:$list, addrmode6:$addr, pred:$p)>;
6486 def VLD4dWB_fixed_Asm_16 :
6487 NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr!",
6488 (ins VecListFourD:$list, addrmode6:$addr, pred:$p)>;
6489 def VLD4dWB_fixed_Asm_32 :
6490 NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr!",
6491 (ins VecListFourD:$list, addrmode6:$addr, pred:$p)>;
6492 def VLD4qWB_fixed_Asm_8 :
6493 NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr!",
6494 (ins VecListFourQ:$list, addrmode6:$addr, pred:$p)>;
6495 def VLD4qWB_fixed_Asm_16 :
6496 NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr!",
6497 (ins VecListFourQ:$list, addrmode6:$addr, pred:$p)>;
6498 def VLD4qWB_fixed_Asm_32 :
6499 NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr!",
6500 (ins VecListFourQ:$list, addrmode6:$addr, pred:$p)>;
6501 def VLD4dWB_register_Asm_8 :
6502 NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr, $Rm",
6503 (ins VecListFourD:$list, addrmode6:$addr,
6504 rGPR:$Rm, pred:$p)>;
6505 def VLD4dWB_register_Asm_16 :
6506 NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr, $Rm",
6507 (ins VecListFourD:$list, addrmode6:$addr,
6508 rGPR:$Rm, pred:$p)>;
6509 def VLD4dWB_register_Asm_32 :
6510 NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr, $Rm",
6511 (ins VecListFourD:$list, addrmode6:$addr,
6512 rGPR:$Rm, pred:$p)>;
6513 def VLD4qWB_register_Asm_8 :
6514 NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr, $Rm",
6515 (ins VecListFourQ:$list, addrmode6:$addr,
6516 rGPR:$Rm, pred:$p)>;
6517 def VLD4qWB_register_Asm_16 :
6518 NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr, $Rm",
6519 (ins VecListFourQ:$list, addrmode6:$addr,
6520 rGPR:$Rm, pred:$p)>;
6521 def VLD4qWB_register_Asm_32 :
6522 NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr, $Rm",
6523 (ins VecListFourQ:$list, addrmode6:$addr,
6524 rGPR:$Rm, pred:$p)>;
6526 // VST4 single-lane pseudo-instructions. These need special handling for
6527 // the lane index that an InstAlias can't handle, so we use these instead.
6528 def VST4LNdAsm_8 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr",
6529 (ins VecListFourDByteIndexed:$list, addrmode6:$addr, pred:$p)>;
6530 def VST4LNdAsm_16 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr",
6531 (ins VecListFourDHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6532 def VST4LNdAsm_32 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr",
6533 (ins VecListFourDWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6534 def VST4LNqAsm_16 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr",
6535 (ins VecListFourQHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6536 def VST4LNqAsm_32 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr",
6537 (ins VecListFourQWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6539 def VST4LNdWB_fixed_Asm_8 :
6540 NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr!",
6541 (ins VecListFourDByteIndexed:$list, addrmode6:$addr, pred:$p)>;
6542 def VST4LNdWB_fixed_Asm_16 :
6543 NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr!",
6544 (ins VecListFourDHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6545 def VST4LNdWB_fixed_Asm_32 :
6546 NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr!",
6547 (ins VecListFourDWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6548 def VST4LNqWB_fixed_Asm_16 :
6549 NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr!",
6550 (ins VecListFourQHWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6551 def VST4LNqWB_fixed_Asm_32 :
6552 NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr!",
6553 (ins VecListFourQWordIndexed:$list, addrmode6:$addr, pred:$p)>;
6554 def VST4LNdWB_register_Asm_8 :
6555 NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr, $Rm",
6556 (ins VecListFourDByteIndexed:$list, addrmode6:$addr,
6557 rGPR:$Rm, pred:$p)>;
6558 def VST4LNdWB_register_Asm_16 :
6559 NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr, $Rm",
6560 (ins VecListFourDHWordIndexed:$list, addrmode6:$addr,
6561 rGPR:$Rm, pred:$p)>;
6562 def VST4LNdWB_register_Asm_32 :
6563 NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr, $Rm",
6564 (ins VecListFourDWordIndexed:$list, addrmode6:$addr,
6565 rGPR:$Rm, pred:$p)>;
6566 def VST4LNqWB_register_Asm_16 :
6567 NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr, $Rm",
6568 (ins VecListFourQHWordIndexed:$list, addrmode6:$addr,
6569 rGPR:$Rm, pred:$p)>;
6570 def VST4LNqWB_register_Asm_32 :
6571 NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr, $Rm",
6572 (ins VecListFourQWordIndexed:$list, addrmode6:$addr,
6573 rGPR:$Rm, pred:$p)>;
6576 // VST4 multiple structure pseudo-instructions. These need special handling for
6577 // the vector operands that the normal instructions don't yet model.
6578 // FIXME: Remove these when the register classes and instructions are updated.
6579 def VST4dAsm_8 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr",
6580 (ins VecListFourD:$list, addrmode6:$addr, pred:$p)>;
6581 def VST4dAsm_16 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr",
6582 (ins VecListFourD:$list, addrmode6:$addr, pred:$p)>;
6583 def VST4dAsm_32 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr",
6584 (ins VecListFourD:$list, addrmode6:$addr, pred:$p)>;
6585 def VST4qAsm_8 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr",
6586 (ins VecListFourQ:$list, addrmode6:$addr, pred:$p)>;
6587 def VST4qAsm_16 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr",
6588 (ins VecListFourQ:$list, addrmode6:$addr, pred:$p)>;
6589 def VST4qAsm_32 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr",
6590 (ins VecListFourQ:$list, addrmode6:$addr, pred:$p)>;
6592 def VST4dWB_fixed_Asm_8 :
6593 NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr!",
6594 (ins VecListFourD:$list, addrmode6:$addr, pred:$p)>;
6595 def VST4dWB_fixed_Asm_16 :
6596 NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr!",
6597 (ins VecListFourD:$list, addrmode6:$addr, pred:$p)>;
6598 def VST4dWB_fixed_Asm_32 :
6599 NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr!",
6600 (ins VecListFourD:$list, addrmode6:$addr, pred:$p)>;
6601 def VST4qWB_fixed_Asm_8 :
6602 NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr!",
6603 (ins VecListFourQ:$list, addrmode6:$addr, pred:$p)>;
6604 def VST4qWB_fixed_Asm_16 :
6605 NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr!",
6606 (ins VecListFourQ:$list, addrmode6:$addr, pred:$p)>;
6607 def VST4qWB_fixed_Asm_32 :
6608 NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr!",
6609 (ins VecListFourQ:$list, addrmode6:$addr, pred:$p)>;
6610 def VST4dWB_register_Asm_8 :
6611 NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr, $Rm",
6612 (ins VecListFourD:$list, addrmode6:$addr,
6613 rGPR:$Rm, pred:$p)>;
6614 def VST4dWB_register_Asm_16 :
6615 NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr, $Rm",
6616 (ins VecListFourD:$list, addrmode6:$addr,
6617 rGPR:$Rm, pred:$p)>;
6618 def VST4dWB_register_Asm_32 :
6619 NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr, $Rm",
6620 (ins VecListFourD:$list, addrmode6:$addr,
6621 rGPR:$Rm, pred:$p)>;
6622 def VST4qWB_register_Asm_8 :
6623 NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr, $Rm",
6624 (ins VecListFourQ:$list, addrmode6:$addr,
6625 rGPR:$Rm, pred:$p)>;
6626 def VST4qWB_register_Asm_16 :
6627 NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr, $Rm",
6628 (ins VecListFourQ:$list, addrmode6:$addr,
6629 rGPR:$Rm, pred:$p)>;
6630 def VST4qWB_register_Asm_32 :
6631 NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr, $Rm",
6632 (ins VecListFourQ:$list, addrmode6:$addr,
6633 rGPR:$Rm, pred:$p)>;
6635 // VMOV takes an optional datatype suffix
6636 defm : NEONDTAnyInstAlias<"vmov${p}", "$Vd, $Vm",
6637 (VORRd DPR:$Vd, DPR:$Vm, DPR:$Vm, pred:$p)>;
6638 defm : NEONDTAnyInstAlias<"vmov${p}", "$Vd, $Vm",
6639 (VORRq QPR:$Vd, QPR:$Vm, QPR:$Vm, pred:$p)>;
6641 // VCLT (register) is an assembler alias for VCGT w/ the operands reversed.
6642 // D-register versions.
6643 def : NEONInstAlias<"vcle${p}.s8 $Dd, $Dn, $Dm",
6644 (VCGEsv8i8 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
6645 def : NEONInstAlias<"vcle${p}.s16 $Dd, $Dn, $Dm",
6646 (VCGEsv4i16 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
6647 def : NEONInstAlias<"vcle${p}.s32 $Dd, $Dn, $Dm",
6648 (VCGEsv2i32 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
6649 def : NEONInstAlias<"vcle${p}.u8 $Dd, $Dn, $Dm",
6650 (VCGEuv8i8 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
6651 def : NEONInstAlias<"vcle${p}.u16 $Dd, $Dn, $Dm",
6652 (VCGEuv4i16 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
6653 def : NEONInstAlias<"vcle${p}.u32 $Dd, $Dn, $Dm",
6654 (VCGEuv2i32 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
6655 def : NEONInstAlias<"vcle${p}.f32 $Dd, $Dn, $Dm",
6656 (VCGEfd DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
6657 // Q-register versions.
6658 def : NEONInstAlias<"vcle${p}.s8 $Qd, $Qn, $Qm",
6659 (VCGEsv16i8 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
6660 def : NEONInstAlias<"vcle${p}.s16 $Qd, $Qn, $Qm",
6661 (VCGEsv8i16 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
6662 def : NEONInstAlias<"vcle${p}.s32 $Qd, $Qn, $Qm",
6663 (VCGEsv4i32 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
6664 def : NEONInstAlias<"vcle${p}.u8 $Qd, $Qn, $Qm",
6665 (VCGEuv16i8 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
6666 def : NEONInstAlias<"vcle${p}.u16 $Qd, $Qn, $Qm",
6667 (VCGEuv8i16 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
6668 def : NEONInstAlias<"vcle${p}.u32 $Qd, $Qn, $Qm",
6669 (VCGEuv4i32 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
6670 def : NEONInstAlias<"vcle${p}.f32 $Qd, $Qn, $Qm",
6671 (VCGEfq QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
6673 // VCLT (register) is an assembler alias for VCGT w/ the operands reversed.
6674 // D-register versions.
6675 def : NEONInstAlias<"vclt${p}.s8 $Dd, $Dn, $Dm",
6676 (VCGTsv8i8 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
6677 def : NEONInstAlias<"vclt${p}.s16 $Dd, $Dn, $Dm",
6678 (VCGTsv4i16 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
6679 def : NEONInstAlias<"vclt${p}.s32 $Dd, $Dn, $Dm",
6680 (VCGTsv2i32 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
6681 def : NEONInstAlias<"vclt${p}.u8 $Dd, $Dn, $Dm",
6682 (VCGTuv8i8 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
6683 def : NEONInstAlias<"vclt${p}.u16 $Dd, $Dn, $Dm",
6684 (VCGTuv4i16 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
6685 def : NEONInstAlias<"vclt${p}.u32 $Dd, $Dn, $Dm",
6686 (VCGTuv2i32 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
6687 def : NEONInstAlias<"vclt${p}.f32 $Dd, $Dn, $Dm",
6688 (VCGTfd DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
6689 // Q-register versions.
6690 def : NEONInstAlias<"vclt${p}.s8 $Qd, $Qn, $Qm",
6691 (VCGTsv16i8 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
6692 def : NEONInstAlias<"vclt${p}.s16 $Qd, $Qn, $Qm",
6693 (VCGTsv8i16 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
6694 def : NEONInstAlias<"vclt${p}.s32 $Qd, $Qn, $Qm",
6695 (VCGTsv4i32 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
6696 def : NEONInstAlias<"vclt${p}.u8 $Qd, $Qn, $Qm",
6697 (VCGTuv16i8 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
6698 def : NEONInstAlias<"vclt${p}.u16 $Qd, $Qn, $Qm",
6699 (VCGTuv8i16 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
6700 def : NEONInstAlias<"vclt${p}.u32 $Qd, $Qn, $Qm",
6701 (VCGTuv4i32 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
6702 def : NEONInstAlias<"vclt${p}.f32 $Qd, $Qn, $Qm",
6703 (VCGTfq QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
6705 // Two-operand variants for VEXT
6706 def : NEONInstAlias<"vext${p}.8 $Vdn, $Vm, $imm",
6707 (VEXTd8 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, imm0_7:$imm, pred:$p)>;
6708 def : NEONInstAlias<"vext${p}.16 $Vdn, $Vm, $imm",
6709 (VEXTd16 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, imm0_3:$imm, pred:$p)>;
6710 def : NEONInstAlias<"vext${p}.32 $Vdn, $Vm, $imm",
6711 (VEXTd32 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, imm0_1:$imm, pred:$p)>;
6713 def : NEONInstAlias<"vext${p}.8 $Vdn, $Vm, $imm",
6714 (VEXTq8 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, imm0_15:$imm, pred:$p)>;
6715 def : NEONInstAlias<"vext${p}.16 $Vdn, $Vm, $imm",
6716 (VEXTq16 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, imm0_7:$imm, pred:$p)>;
6717 def : NEONInstAlias<"vext${p}.32 $Vdn, $Vm, $imm",
6718 (VEXTq32 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, imm0_3:$imm, pred:$p)>;
6719 def : NEONInstAlias<"vext${p}.64 $Vdn, $Vm, $imm",
6720 (VEXTq64 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, imm0_1:$imm, pred:$p)>;
6722 // Two-operand variants for VQDMULH
6723 def : NEONInstAlias<"vqdmulh${p}.s16 $Vdn, $Vm",
6724 (VQDMULHv4i16 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
6725 def : NEONInstAlias<"vqdmulh${p}.s32 $Vdn, $Vm",
6726 (VQDMULHv2i32 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
6728 def : NEONInstAlias<"vqdmulh${p}.s16 $Vdn, $Vm",
6729 (VQDMULHv8i16 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
6730 def : NEONInstAlias<"vqdmulh${p}.s32 $Vdn, $Vm",
6731 (VQDMULHv4i32 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
6733 // Two-operand variants for VMAX.
6734 def : NEONInstAlias<"vmax${p}.s8 $Vdn, $Vm",
6735 (VMAXsv8i8 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
6736 def : NEONInstAlias<"vmax${p}.s16 $Vdn, $Vm",
6737 (VMAXsv4i16 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
6738 def : NEONInstAlias<"vmax${p}.s32 $Vdn, $Vm",
6739 (VMAXsv2i32 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
6740 def : NEONInstAlias<"vmax${p}.u8 $Vdn, $Vm",
6741 (VMAXuv8i8 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
6742 def : NEONInstAlias<"vmax${p}.u16 $Vdn, $Vm",
6743 (VMAXuv4i16 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
6744 def : NEONInstAlias<"vmax${p}.u32 $Vdn, $Vm",
6745 (VMAXuv2i32 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
6746 def : NEONInstAlias<"vmax${p}.f32 $Vdn, $Vm",
6747 (VMAXfd DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
6749 def : NEONInstAlias<"vmax${p}.s8 $Vdn, $Vm",
6750 (VMAXsv16i8 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
6751 def : NEONInstAlias<"vmax${p}.s16 $Vdn, $Vm",
6752 (VMAXsv8i16 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
6753 def : NEONInstAlias<"vmax${p}.s32 $Vdn, $Vm",
6754 (VMAXsv4i32 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
6755 def : NEONInstAlias<"vmax${p}.u8 $Vdn, $Vm",
6756 (VMAXuv16i8 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
6757 def : NEONInstAlias<"vmax${p}.u16 $Vdn, $Vm",
6758 (VMAXuv8i16 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
6759 def : NEONInstAlias<"vmax${p}.u32 $Vdn, $Vm",
6760 (VMAXuv4i32 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
6761 def : NEONInstAlias<"vmax${p}.f32 $Vdn, $Vm",
6762 (VMAXfq QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
6764 // Two-operand variants for VMIN.
6765 def : NEONInstAlias<"vmin${p}.s8 $Vdn, $Vm",
6766 (VMINsv8i8 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
6767 def : NEONInstAlias<"vmin${p}.s16 $Vdn, $Vm",
6768 (VMINsv4i16 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
6769 def : NEONInstAlias<"vmin${p}.s32 $Vdn, $Vm",
6770 (VMINsv2i32 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
6771 def : NEONInstAlias<"vmin${p}.u8 $Vdn, $Vm",
6772 (VMINuv8i8 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
6773 def : NEONInstAlias<"vmin${p}.u16 $Vdn, $Vm",
6774 (VMINuv4i16 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
6775 def : NEONInstAlias<"vmin${p}.u32 $Vdn, $Vm",
6776 (VMINuv2i32 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
6777 def : NEONInstAlias<"vmin${p}.f32 $Vdn, $Vm",
6778 (VMINfd DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
6780 def : NEONInstAlias<"vmin${p}.s8 $Vdn, $Vm",
6781 (VMINsv16i8 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
6782 def : NEONInstAlias<"vmin${p}.s16 $Vdn, $Vm",
6783 (VMINsv8i16 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
6784 def : NEONInstAlias<"vmin${p}.s32 $Vdn, $Vm",
6785 (VMINsv4i32 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
6786 def : NEONInstAlias<"vmin${p}.u8 $Vdn, $Vm",
6787 (VMINuv16i8 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
6788 def : NEONInstAlias<"vmin${p}.u16 $Vdn, $Vm",
6789 (VMINuv8i16 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
6790 def : NEONInstAlias<"vmin${p}.u32 $Vdn, $Vm",
6791 (VMINuv4i32 QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
6792 def : NEONInstAlias<"vmin${p}.f32 $Vdn, $Vm",
6793 (VMINfq QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
6795 // Two-operand variants for VPADD.
6796 def : NEONInstAlias<"vpadd${p}.i8 $Vdn, $Vm",
6797 (VPADDi8 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
6798 def : NEONInstAlias<"vpadd${p}.i16 $Vdn, $Vm",
6799 (VPADDi16 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
6800 def : NEONInstAlias<"vpadd${p}.i32 $Vdn, $Vm",
6801 (VPADDi32 DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
6802 def : NEONInstAlias<"vpadd${p}.f32 $Vdn, $Vm",
6803 (VPADDf DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
6805 // Two-operand variants for VSRA.
6807 def : NEONInstAlias<"vsra${p}.s8 $Vdm, $imm",
6808 (VSRAsv8i8 DPR:$Vdm, DPR:$Vdm, shr_imm8:$imm, pred:$p)>;
6809 def : NEONInstAlias<"vsra${p}.s16 $Vdm, $imm",
6810 (VSRAsv4i16 DPR:$Vdm, DPR:$Vdm, shr_imm16:$imm, pred:$p)>;
6811 def : NEONInstAlias<"vsra${p}.s32 $Vdm, $imm",
6812 (VSRAsv2i32 DPR:$Vdm, DPR:$Vdm, shr_imm32:$imm, pred:$p)>;
6813 def : NEONInstAlias<"vsra${p}.s64 $Vdm, $imm",
6814 (VSRAsv1i64 DPR:$Vdm, DPR:$Vdm, shr_imm64:$imm, pred:$p)>;
6816 def : NEONInstAlias<"vsra${p}.s8 $Vdm, $imm",
6817 (VSRAsv16i8 QPR:$Vdm, QPR:$Vdm, shr_imm8:$imm, pred:$p)>;
6818 def : NEONInstAlias<"vsra${p}.s16 $Vdm, $imm",
6819 (VSRAsv8i16 QPR:$Vdm, QPR:$Vdm, shr_imm16:$imm, pred:$p)>;
6820 def : NEONInstAlias<"vsra${p}.s32 $Vdm, $imm",
6821 (VSRAsv4i32 QPR:$Vdm, QPR:$Vdm, shr_imm32:$imm, pred:$p)>;
6822 def : NEONInstAlias<"vsra${p}.s64 $Vdm, $imm",
6823 (VSRAsv2i64 QPR:$Vdm, QPR:$Vdm, shr_imm64:$imm, pred:$p)>;
6826 def : NEONInstAlias<"vsra${p}.u8 $Vdm, $imm",
6827 (VSRAuv8i8 DPR:$Vdm, DPR:$Vdm, shr_imm8:$imm, pred:$p)>;
6828 def : NEONInstAlias<"vsra${p}.u16 $Vdm, $imm",
6829 (VSRAuv4i16 DPR:$Vdm, DPR:$Vdm, shr_imm16:$imm, pred:$p)>;
6830 def : NEONInstAlias<"vsra${p}.u32 $Vdm, $imm",
6831 (VSRAuv2i32 DPR:$Vdm, DPR:$Vdm, shr_imm32:$imm, pred:$p)>;
6832 def : NEONInstAlias<"vsra${p}.u64 $Vdm, $imm",
6833 (VSRAuv1i64 DPR:$Vdm, DPR:$Vdm, shr_imm64:$imm, pred:$p)>;
6835 def : NEONInstAlias<"vsra${p}.u8 $Vdm, $imm",
6836 (VSRAuv16i8 QPR:$Vdm, QPR:$Vdm, shr_imm8:$imm, pred:$p)>;
6837 def : NEONInstAlias<"vsra${p}.u16 $Vdm, $imm",
6838 (VSRAuv8i16 QPR:$Vdm, QPR:$Vdm, shr_imm16:$imm, pred:$p)>;
6839 def : NEONInstAlias<"vsra${p}.u32 $Vdm, $imm",
6840 (VSRAuv4i32 QPR:$Vdm, QPR:$Vdm, shr_imm32:$imm, pred:$p)>;
6841 def : NEONInstAlias<"vsra${p}.u64 $Vdm, $imm",
6842 (VSRAuv2i64 QPR:$Vdm, QPR:$Vdm, shr_imm64:$imm, pred:$p)>;
6844 // Two-operand variants for VSRI.
6845 def : NEONInstAlias<"vsri${p}.8 $Vdm, $imm",
6846 (VSRIv8i8 DPR:$Vdm, DPR:$Vdm, shr_imm8:$imm, pred:$p)>;
6847 def : NEONInstAlias<"vsri${p}.16 $Vdm, $imm",
6848 (VSRIv4i16 DPR:$Vdm, DPR:$Vdm, shr_imm16:$imm, pred:$p)>;
6849 def : NEONInstAlias<"vsri${p}.32 $Vdm, $imm",
6850 (VSRIv2i32 DPR:$Vdm, DPR:$Vdm, shr_imm32:$imm, pred:$p)>;
6851 def : NEONInstAlias<"vsri${p}.64 $Vdm, $imm",
6852 (VSRIv1i64 DPR:$Vdm, DPR:$Vdm, shr_imm64:$imm, pred:$p)>;
6854 def : NEONInstAlias<"vsri${p}.8 $Vdm, $imm",
6855 (VSRIv16i8 QPR:$Vdm, QPR:$Vdm, shr_imm8:$imm, pred:$p)>;
6856 def : NEONInstAlias<"vsri${p}.16 $Vdm, $imm",
6857 (VSRIv8i16 QPR:$Vdm, QPR:$Vdm, shr_imm16:$imm, pred:$p)>;
6858 def : NEONInstAlias<"vsri${p}.32 $Vdm, $imm",
6859 (VSRIv4i32 QPR:$Vdm, QPR:$Vdm, shr_imm32:$imm, pred:$p)>;
6860 def : NEONInstAlias<"vsri${p}.64 $Vdm, $imm",
6861 (VSRIv2i64 QPR:$Vdm, QPR:$Vdm, shr_imm64:$imm, pred:$p)>;
6863 // Two-operand variants for VSLI.
6864 def : NEONInstAlias<"vsli${p}.8 $Vdm, $imm",
6865 (VSLIv8i8 DPR:$Vdm, DPR:$Vdm, shr_imm8:$imm, pred:$p)>;
6866 def : NEONInstAlias<"vsli${p}.16 $Vdm, $imm",
6867 (VSLIv4i16 DPR:$Vdm, DPR:$Vdm, shr_imm16:$imm, pred:$p)>;
6868 def : NEONInstAlias<"vsli${p}.32 $Vdm, $imm",
6869 (VSLIv2i32 DPR:$Vdm, DPR:$Vdm, shr_imm32:$imm, pred:$p)>;
6870 def : NEONInstAlias<"vsli${p}.64 $Vdm, $imm",
6871 (VSLIv1i64 DPR:$Vdm, DPR:$Vdm, shr_imm64:$imm, pred:$p)>;
6873 def : NEONInstAlias<"vsli${p}.8 $Vdm, $imm",
6874 (VSLIv16i8 QPR:$Vdm, QPR:$Vdm, shr_imm8:$imm, pred:$p)>;
6875 def : NEONInstAlias<"vsli${p}.16 $Vdm, $imm",
6876 (VSLIv8i16 QPR:$Vdm, QPR:$Vdm, shr_imm16:$imm, pred:$p)>;
6877 def : NEONInstAlias<"vsli${p}.32 $Vdm, $imm",
6878 (VSLIv4i32 QPR:$Vdm, QPR:$Vdm, shr_imm32:$imm, pred:$p)>;
6879 def : NEONInstAlias<"vsli${p}.64 $Vdm, $imm",
6880 (VSLIv2i64 QPR:$Vdm, QPR:$Vdm, shr_imm64:$imm, pred:$p)>;
6882 // VSWP allows, but does not require, a type suffix.
6883 defm : NEONDTAnyInstAlias<"vswp${p}", "$Vd, $Vm",
6884 (VSWPd DPR:$Vd, DPR:$Vm, pred:$p)>;
6885 defm : NEONDTAnyInstAlias<"vswp${p}", "$Vd, $Vm",
6886 (VSWPq QPR:$Vd, QPR:$Vm, pred:$p)>;
6888 // "vmov Rd, #-imm" can be handled via "vmvn".
6889 def : NEONInstAlias<"vmov${p}.i32 $Vd, $imm",
6890 (VMVNv2i32 DPR:$Vd, nImmVMOVI32Neg:$imm, pred:$p)>;
6891 def : NEONInstAlias<"vmov${p}.i32 $Vd, $imm",
6892 (VMVNv4i32 QPR:$Vd, nImmVMOVI32Neg:$imm, pred:$p)>;
6893 def : NEONInstAlias<"vmvn${p}.i32 $Vd, $imm",
6894 (VMOVv2i32 DPR:$Vd, nImmVMOVI32Neg:$imm, pred:$p)>;
6895 def : NEONInstAlias<"vmvn${p}.i32 $Vd, $imm",
6896 (VMOVv4i32 QPR:$Vd, nImmVMOVI32Neg:$imm, pred:$p)>;
6898 // 'gas' compatibility aliases for quad-word instructions. Strictly speaking,
6899 // these should restrict to just the Q register variants, but the register
6900 // classes are enough to match correctly regardless, so we keep it simple
6901 // and just use MnemonicAlias.
6902 def : NEONMnemonicAlias<"vbicq", "vbic">;
6903 def : NEONMnemonicAlias<"vandq", "vand">;
6904 def : NEONMnemonicAlias<"veorq", "veor">;
6905 def : NEONMnemonicAlias<"vorrq", "vorr">;
6907 def : NEONMnemonicAlias<"vmovq", "vmov">;
6908 def : NEONMnemonicAlias<"vmvnq", "vmvn">;
6909 // Explicit versions for floating point so that the FPImm variants get
6910 // handled early. The parser gets confused otherwise.
6911 def : NEONMnemonicAlias<"vmovq.f32", "vmov.f32">;
6912 def : NEONMnemonicAlias<"vmovq.f64", "vmov.f64">;
6914 def : NEONMnemonicAlias<"vaddq", "vadd">;
6915 def : NEONMnemonicAlias<"vsubq", "vsub">;
6917 def : NEONMnemonicAlias<"vminq", "vmin">;
6918 def : NEONMnemonicAlias<"vmaxq", "vmax">;
6920 def : NEONMnemonicAlias<"vmulq", "vmul">;
6922 def : NEONMnemonicAlias<"vabsq", "vabs">;
6924 def : NEONMnemonicAlias<"vshlq", "vshl">;
6925 def : NEONMnemonicAlias<"vshrq", "vshr">;
6927 def : NEONMnemonicAlias<"vcvtq", "vcvt">;
6929 def : NEONMnemonicAlias<"vcleq", "vcle">;
6930 def : NEONMnemonicAlias<"vceqq", "vceq">;
6932 def : NEONMnemonicAlias<"vzipq", "vzip">;
6933 def : NEONMnemonicAlias<"vswpq", "vswp">;
6935 def : NEONMnemonicAlias<"vrecpeq.f32", "vrecpe.f32">;
6936 def : NEONMnemonicAlias<"vrecpeq.u32", "vrecpe.u32">;
6939 // Alias for loading floating point immediates that aren't representable
6940 // using the vmov.f32 encoding but the bitpattern is representable using
6941 // the .i32 encoding.
6942 def : NEONInstAlias<"vmov${p}.f32 $Vd, $imm",
6943 (VMOVv4i32 QPR:$Vd, nImmVMOVI32:$imm, pred:$p)>;
6944 def : NEONInstAlias<"vmov${p}.f32 $Vd, $imm",
6945 (VMOVv2i32 DPR:$Vd, nImmVMOVI32:$imm, pred:$p)>;