xref: /aosp_15_r20/external/llvm/lib/Target/ARM/ARMInstrNEON.td (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker//===-- ARMInstrNEON.td - NEON support for ARM -------------*- tablegen -*-===//
2*9880d681SAndroid Build Coastguard Worker//
3*9880d681SAndroid Build Coastguard Worker//                     The LLVM Compiler Infrastructure
4*9880d681SAndroid Build Coastguard Worker//
5*9880d681SAndroid Build Coastguard Worker// This file is distributed under the University of Illinois Open Source
6*9880d681SAndroid Build Coastguard Worker// License. See LICENSE.TXT for details.
7*9880d681SAndroid Build Coastguard Worker//
8*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===//
9*9880d681SAndroid Build Coastguard Worker//
10*9880d681SAndroid Build Coastguard Worker// This file describes the ARM NEON instruction set.
11*9880d681SAndroid Build Coastguard Worker//
12*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===//
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Worker
15*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===//
16*9880d681SAndroid Build Coastguard Worker// NEON-specific Operands.
17*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===//
18*9880d681SAndroid Build Coastguard Workerdef nModImm : Operand<i32> {
19*9880d681SAndroid Build Coastguard Worker  let PrintMethod = "printNEONModImmOperand";
20*9880d681SAndroid Build Coastguard Worker}
21*9880d681SAndroid Build Coastguard Worker
22*9880d681SAndroid Build Coastguard Workerdef nImmSplatI8AsmOperand : AsmOperandClass { let Name = "NEONi8splat"; }
23*9880d681SAndroid Build Coastguard Workerdef nImmSplatI8 : Operand<i32> {
24*9880d681SAndroid Build Coastguard Worker  let PrintMethod = "printNEONModImmOperand";
25*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = nImmSplatI8AsmOperand;
26*9880d681SAndroid Build Coastguard Worker}
27*9880d681SAndroid Build Coastguard Workerdef nImmSplatI16AsmOperand : AsmOperandClass { let Name = "NEONi16splat"; }
28*9880d681SAndroid Build Coastguard Workerdef nImmSplatI16 : Operand<i32> {
29*9880d681SAndroid Build Coastguard Worker  let PrintMethod = "printNEONModImmOperand";
30*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = nImmSplatI16AsmOperand;
31*9880d681SAndroid Build Coastguard Worker}
32*9880d681SAndroid Build Coastguard Workerdef nImmSplatI32AsmOperand : AsmOperandClass { let Name = "NEONi32splat"; }
33*9880d681SAndroid Build Coastguard Workerdef nImmSplatI32 : Operand<i32> {
34*9880d681SAndroid Build Coastguard Worker  let PrintMethod = "printNEONModImmOperand";
35*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = nImmSplatI32AsmOperand;
36*9880d681SAndroid Build Coastguard Worker}
37*9880d681SAndroid Build Coastguard Workerdef nImmSplatNotI16AsmOperand : AsmOperandClass { let Name = "NEONi16splatNot"; }
38*9880d681SAndroid Build Coastguard Workerdef nImmSplatNotI16 : Operand<i32> {
39*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = nImmSplatNotI16AsmOperand;
40*9880d681SAndroid Build Coastguard Worker}
41*9880d681SAndroid Build Coastguard Workerdef nImmSplatNotI32AsmOperand : AsmOperandClass { let Name = "NEONi32splatNot"; }
42*9880d681SAndroid Build Coastguard Workerdef nImmSplatNotI32 : Operand<i32> {
43*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = nImmSplatNotI32AsmOperand;
44*9880d681SAndroid Build Coastguard Worker}
45*9880d681SAndroid Build Coastguard Workerdef nImmVMOVI32AsmOperand : AsmOperandClass { let Name = "NEONi32vmov"; }
46*9880d681SAndroid Build Coastguard Workerdef nImmVMOVI32 : Operand<i32> {
47*9880d681SAndroid Build Coastguard Worker  let PrintMethod = "printNEONModImmOperand";
48*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = nImmVMOVI32AsmOperand;
49*9880d681SAndroid Build Coastguard Worker}
50*9880d681SAndroid Build Coastguard Worker
51*9880d681SAndroid Build Coastguard Workerdef nImmVMOVI16AsmOperandByteReplicate :
52*9880d681SAndroid Build Coastguard Worker  AsmOperandClass {
53*9880d681SAndroid Build Coastguard Worker  let Name = "NEONi16vmovByteReplicate";
54*9880d681SAndroid Build Coastguard Worker  let PredicateMethod = "isNEONi16ByteReplicate";
55*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addNEONvmovByteReplicateOperands";
56*9880d681SAndroid Build Coastguard Worker}
57*9880d681SAndroid Build Coastguard Workerdef nImmVMOVI32AsmOperandByteReplicate :
58*9880d681SAndroid Build Coastguard Worker  AsmOperandClass {
59*9880d681SAndroid Build Coastguard Worker  let Name = "NEONi32vmovByteReplicate";
60*9880d681SAndroid Build Coastguard Worker  let PredicateMethod = "isNEONi32ByteReplicate";
61*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addNEONvmovByteReplicateOperands";
62*9880d681SAndroid Build Coastguard Worker}
63*9880d681SAndroid Build Coastguard Workerdef nImmVMVNI16AsmOperandByteReplicate :
64*9880d681SAndroid Build Coastguard Worker  AsmOperandClass {
65*9880d681SAndroid Build Coastguard Worker  let Name = "NEONi16invByteReplicate";
66*9880d681SAndroid Build Coastguard Worker  let PredicateMethod = "isNEONi16ByteReplicate";
67*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addNEONinvByteReplicateOperands";
68*9880d681SAndroid Build Coastguard Worker}
69*9880d681SAndroid Build Coastguard Workerdef nImmVMVNI32AsmOperandByteReplicate :
70*9880d681SAndroid Build Coastguard Worker  AsmOperandClass {
71*9880d681SAndroid Build Coastguard Worker  let Name = "NEONi32invByteReplicate";
72*9880d681SAndroid Build Coastguard Worker  let PredicateMethod = "isNEONi32ByteReplicate";
73*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addNEONinvByteReplicateOperands";
74*9880d681SAndroid Build Coastguard Worker}
75*9880d681SAndroid Build Coastguard Worker
76*9880d681SAndroid Build Coastguard Workerdef nImmVMOVI16ByteReplicate : Operand<i32> {
77*9880d681SAndroid Build Coastguard Worker  let PrintMethod = "printNEONModImmOperand";
78*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = nImmVMOVI16AsmOperandByteReplicate;
79*9880d681SAndroid Build Coastguard Worker}
80*9880d681SAndroid Build Coastguard Workerdef nImmVMOVI32ByteReplicate : Operand<i32> {
81*9880d681SAndroid Build Coastguard Worker  let PrintMethod = "printNEONModImmOperand";
82*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = nImmVMOVI32AsmOperandByteReplicate;
83*9880d681SAndroid Build Coastguard Worker}
84*9880d681SAndroid Build Coastguard Workerdef nImmVMVNI16ByteReplicate : Operand<i32> {
85*9880d681SAndroid Build Coastguard Worker  let PrintMethod = "printNEONModImmOperand";
86*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = nImmVMVNI16AsmOperandByteReplicate;
87*9880d681SAndroid Build Coastguard Worker}
88*9880d681SAndroid Build Coastguard Workerdef nImmVMVNI32ByteReplicate : Operand<i32> {
89*9880d681SAndroid Build Coastguard Worker  let PrintMethod = "printNEONModImmOperand";
90*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = nImmVMVNI32AsmOperandByteReplicate;
91*9880d681SAndroid Build Coastguard Worker}
92*9880d681SAndroid Build Coastguard Worker
93*9880d681SAndroid Build Coastguard Workerdef nImmVMOVI32NegAsmOperand : AsmOperandClass { let Name = "NEONi32vmovNeg"; }
94*9880d681SAndroid Build Coastguard Workerdef nImmVMOVI32Neg : Operand<i32> {
95*9880d681SAndroid Build Coastguard Worker  let PrintMethod = "printNEONModImmOperand";
96*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = nImmVMOVI32NegAsmOperand;
97*9880d681SAndroid Build Coastguard Worker}
98*9880d681SAndroid Build Coastguard Workerdef nImmVMOVF32 : Operand<i32> {
99*9880d681SAndroid Build Coastguard Worker  let PrintMethod = "printFPImmOperand";
100*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = FPImmOperand;
101*9880d681SAndroid Build Coastguard Worker}
102*9880d681SAndroid Build Coastguard Workerdef nImmSplatI64AsmOperand : AsmOperandClass { let Name = "NEONi64splat"; }
103*9880d681SAndroid Build Coastguard Workerdef nImmSplatI64 : Operand<i32> {
104*9880d681SAndroid Build Coastguard Worker  let PrintMethod = "printNEONModImmOperand";
105*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = nImmSplatI64AsmOperand;
106*9880d681SAndroid Build Coastguard Worker}
107*9880d681SAndroid Build Coastguard Worker
108*9880d681SAndroid Build Coastguard Workerdef VectorIndex8Operand  : AsmOperandClass { let Name = "VectorIndex8"; }
109*9880d681SAndroid Build Coastguard Workerdef VectorIndex16Operand : AsmOperandClass { let Name = "VectorIndex16"; }
110*9880d681SAndroid Build Coastguard Workerdef VectorIndex32Operand : AsmOperandClass { let Name = "VectorIndex32"; }
111*9880d681SAndroid Build Coastguard Workerdef VectorIndex8 : Operand<i32>, ImmLeaf<i32, [{
112*9880d681SAndroid Build Coastguard Worker  return ((uint64_t)Imm) < 8;
113*9880d681SAndroid Build Coastguard Worker}]> {
114*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VectorIndex8Operand;
115*9880d681SAndroid Build Coastguard Worker  let PrintMethod = "printVectorIndex";
116*9880d681SAndroid Build Coastguard Worker  let MIOperandInfo = (ops i32imm);
117*9880d681SAndroid Build Coastguard Worker}
118*9880d681SAndroid Build Coastguard Workerdef VectorIndex16 : Operand<i32>, ImmLeaf<i32, [{
119*9880d681SAndroid Build Coastguard Worker  return ((uint64_t)Imm) < 4;
120*9880d681SAndroid Build Coastguard Worker}]> {
121*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VectorIndex16Operand;
122*9880d681SAndroid Build Coastguard Worker  let PrintMethod = "printVectorIndex";
123*9880d681SAndroid Build Coastguard Worker  let MIOperandInfo = (ops i32imm);
124*9880d681SAndroid Build Coastguard Worker}
125*9880d681SAndroid Build Coastguard Workerdef VectorIndex32 : Operand<i32>, ImmLeaf<i32, [{
126*9880d681SAndroid Build Coastguard Worker  return ((uint64_t)Imm) < 2;
127*9880d681SAndroid Build Coastguard Worker}]> {
128*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VectorIndex32Operand;
129*9880d681SAndroid Build Coastguard Worker  let PrintMethod = "printVectorIndex";
130*9880d681SAndroid Build Coastguard Worker  let MIOperandInfo = (ops i32imm);
131*9880d681SAndroid Build Coastguard Worker}
132*9880d681SAndroid Build Coastguard Worker
133*9880d681SAndroid Build Coastguard Worker// Register list of one D register.
134*9880d681SAndroid Build Coastguard Workerdef VecListOneDAsmOperand : AsmOperandClass {
135*9880d681SAndroid Build Coastguard Worker  let Name = "VecListOneD";
136*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
137*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListOperands";
138*9880d681SAndroid Build Coastguard Worker}
139*9880d681SAndroid Build Coastguard Workerdef VecListOneD : RegisterOperand<DPR, "printVectorListOne"> {
140*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListOneDAsmOperand;
141*9880d681SAndroid Build Coastguard Worker}
142*9880d681SAndroid Build Coastguard Worker// Register list of two sequential D registers.
143*9880d681SAndroid Build Coastguard Workerdef VecListDPairAsmOperand : AsmOperandClass {
144*9880d681SAndroid Build Coastguard Worker  let Name = "VecListDPair";
145*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
146*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListOperands";
147*9880d681SAndroid Build Coastguard Worker}
148*9880d681SAndroid Build Coastguard Workerdef VecListDPair : RegisterOperand<DPair, "printVectorListTwo"> {
149*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListDPairAsmOperand;
150*9880d681SAndroid Build Coastguard Worker}
151*9880d681SAndroid Build Coastguard Worker// Register list of three sequential D registers.
152*9880d681SAndroid Build Coastguard Workerdef VecListThreeDAsmOperand : AsmOperandClass {
153*9880d681SAndroid Build Coastguard Worker  let Name = "VecListThreeD";
154*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
155*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListOperands";
156*9880d681SAndroid Build Coastguard Worker}
157*9880d681SAndroid Build Coastguard Workerdef VecListThreeD : RegisterOperand<DPR, "printVectorListThree"> {
158*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListThreeDAsmOperand;
159*9880d681SAndroid Build Coastguard Worker}
160*9880d681SAndroid Build Coastguard Worker// Register list of four sequential D registers.
161*9880d681SAndroid Build Coastguard Workerdef VecListFourDAsmOperand : AsmOperandClass {
162*9880d681SAndroid Build Coastguard Worker  let Name = "VecListFourD";
163*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
164*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListOperands";
165*9880d681SAndroid Build Coastguard Worker}
166*9880d681SAndroid Build Coastguard Workerdef VecListFourD : RegisterOperand<DPR, "printVectorListFour"> {
167*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListFourDAsmOperand;
168*9880d681SAndroid Build Coastguard Worker}
169*9880d681SAndroid Build Coastguard Worker// Register list of two D registers spaced by 2 (two sequential Q registers).
170*9880d681SAndroid Build Coastguard Workerdef VecListDPairSpacedAsmOperand : AsmOperandClass {
171*9880d681SAndroid Build Coastguard Worker  let Name = "VecListDPairSpaced";
172*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
173*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListOperands";
174*9880d681SAndroid Build Coastguard Worker}
175*9880d681SAndroid Build Coastguard Workerdef VecListDPairSpaced : RegisterOperand<DPair, "printVectorListTwoSpaced"> {
176*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListDPairSpacedAsmOperand;
177*9880d681SAndroid Build Coastguard Worker}
178*9880d681SAndroid Build Coastguard Worker// Register list of three D registers spaced by 2 (three Q registers).
179*9880d681SAndroid Build Coastguard Workerdef VecListThreeQAsmOperand : AsmOperandClass {
180*9880d681SAndroid Build Coastguard Worker  let Name = "VecListThreeQ";
181*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
182*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListOperands";
183*9880d681SAndroid Build Coastguard Worker}
184*9880d681SAndroid Build Coastguard Workerdef VecListThreeQ : RegisterOperand<DPR, "printVectorListThreeSpaced"> {
185*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListThreeQAsmOperand;
186*9880d681SAndroid Build Coastguard Worker}
187*9880d681SAndroid Build Coastguard Worker// Register list of three D registers spaced by 2 (three Q registers).
188*9880d681SAndroid Build Coastguard Workerdef VecListFourQAsmOperand : AsmOperandClass {
189*9880d681SAndroid Build Coastguard Worker  let Name = "VecListFourQ";
190*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
191*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListOperands";
192*9880d681SAndroid Build Coastguard Worker}
193*9880d681SAndroid Build Coastguard Workerdef VecListFourQ : RegisterOperand<DPR, "printVectorListFourSpaced"> {
194*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListFourQAsmOperand;
195*9880d681SAndroid Build Coastguard Worker}
196*9880d681SAndroid Build Coastguard Worker
197*9880d681SAndroid Build Coastguard Worker// Register list of one D register, with "all lanes" subscripting.
198*9880d681SAndroid Build Coastguard Workerdef VecListOneDAllLanesAsmOperand : AsmOperandClass {
199*9880d681SAndroid Build Coastguard Worker  let Name = "VecListOneDAllLanes";
200*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
201*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListOperands";
202*9880d681SAndroid Build Coastguard Worker}
203*9880d681SAndroid Build Coastguard Workerdef VecListOneDAllLanes : RegisterOperand<DPR, "printVectorListOneAllLanes"> {
204*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListOneDAllLanesAsmOperand;
205*9880d681SAndroid Build Coastguard Worker}
206*9880d681SAndroid Build Coastguard Worker// Register list of two D registers, with "all lanes" subscripting.
207*9880d681SAndroid Build Coastguard Workerdef VecListDPairAllLanesAsmOperand : AsmOperandClass {
208*9880d681SAndroid Build Coastguard Worker  let Name = "VecListDPairAllLanes";
209*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
210*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListOperands";
211*9880d681SAndroid Build Coastguard Worker}
212*9880d681SAndroid Build Coastguard Workerdef VecListDPairAllLanes : RegisterOperand<DPair,
213*9880d681SAndroid Build Coastguard Worker                                           "printVectorListTwoAllLanes"> {
214*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListDPairAllLanesAsmOperand;
215*9880d681SAndroid Build Coastguard Worker}
216*9880d681SAndroid Build Coastguard Worker// Register list of two D registers spaced by 2 (two sequential Q registers).
217*9880d681SAndroid Build Coastguard Workerdef VecListDPairSpacedAllLanesAsmOperand : AsmOperandClass {
218*9880d681SAndroid Build Coastguard Worker  let Name = "VecListDPairSpacedAllLanes";
219*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
220*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListOperands";
221*9880d681SAndroid Build Coastguard Worker}
222*9880d681SAndroid Build Coastguard Workerdef VecListDPairSpacedAllLanes : RegisterOperand<DPair,
223*9880d681SAndroid Build Coastguard Worker                                         "printVectorListTwoSpacedAllLanes"> {
224*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListDPairSpacedAllLanesAsmOperand;
225*9880d681SAndroid Build Coastguard Worker}
226*9880d681SAndroid Build Coastguard Worker// Register list of three D registers, with "all lanes" subscripting.
227*9880d681SAndroid Build Coastguard Workerdef VecListThreeDAllLanesAsmOperand : AsmOperandClass {
228*9880d681SAndroid Build Coastguard Worker  let Name = "VecListThreeDAllLanes";
229*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
230*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListOperands";
231*9880d681SAndroid Build Coastguard Worker}
232*9880d681SAndroid Build Coastguard Workerdef VecListThreeDAllLanes : RegisterOperand<DPR,
233*9880d681SAndroid Build Coastguard Worker                                            "printVectorListThreeAllLanes"> {
234*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListThreeDAllLanesAsmOperand;
235*9880d681SAndroid Build Coastguard Worker}
236*9880d681SAndroid Build Coastguard Worker// Register list of three D registers spaced by 2 (three sequential Q regs).
237*9880d681SAndroid Build Coastguard Workerdef VecListThreeQAllLanesAsmOperand : AsmOperandClass {
238*9880d681SAndroid Build Coastguard Worker  let Name = "VecListThreeQAllLanes";
239*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
240*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListOperands";
241*9880d681SAndroid Build Coastguard Worker}
242*9880d681SAndroid Build Coastguard Workerdef VecListThreeQAllLanes : RegisterOperand<DPR,
243*9880d681SAndroid Build Coastguard Worker                                         "printVectorListThreeSpacedAllLanes"> {
244*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListThreeQAllLanesAsmOperand;
245*9880d681SAndroid Build Coastguard Worker}
246*9880d681SAndroid Build Coastguard Worker// Register list of four D registers, with "all lanes" subscripting.
247*9880d681SAndroid Build Coastguard Workerdef VecListFourDAllLanesAsmOperand : AsmOperandClass {
248*9880d681SAndroid Build Coastguard Worker  let Name = "VecListFourDAllLanes";
249*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
250*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListOperands";
251*9880d681SAndroid Build Coastguard Worker}
252*9880d681SAndroid Build Coastguard Workerdef VecListFourDAllLanes : RegisterOperand<DPR, "printVectorListFourAllLanes"> {
253*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListFourDAllLanesAsmOperand;
254*9880d681SAndroid Build Coastguard Worker}
255*9880d681SAndroid Build Coastguard Worker// Register list of four D registers spaced by 2 (four sequential Q regs).
256*9880d681SAndroid Build Coastguard Workerdef VecListFourQAllLanesAsmOperand : AsmOperandClass {
257*9880d681SAndroid Build Coastguard Worker  let Name = "VecListFourQAllLanes";
258*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
259*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListOperands";
260*9880d681SAndroid Build Coastguard Worker}
261*9880d681SAndroid Build Coastguard Workerdef VecListFourQAllLanes : RegisterOperand<DPR,
262*9880d681SAndroid Build Coastguard Worker                                         "printVectorListFourSpacedAllLanes"> {
263*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListFourQAllLanesAsmOperand;
264*9880d681SAndroid Build Coastguard Worker}
265*9880d681SAndroid Build Coastguard Worker
266*9880d681SAndroid Build Coastguard Worker
267*9880d681SAndroid Build Coastguard Worker// Register list of one D register, with byte lane subscripting.
268*9880d681SAndroid Build Coastguard Workerdef VecListOneDByteIndexAsmOperand : AsmOperandClass {
269*9880d681SAndroid Build Coastguard Worker  let Name = "VecListOneDByteIndexed";
270*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
271*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListIndexedOperands";
272*9880d681SAndroid Build Coastguard Worker}
273*9880d681SAndroid Build Coastguard Workerdef VecListOneDByteIndexed : Operand<i32> {
274*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListOneDByteIndexAsmOperand;
275*9880d681SAndroid Build Coastguard Worker  let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
276*9880d681SAndroid Build Coastguard Worker}
277*9880d681SAndroid Build Coastguard Worker// ...with half-word lane subscripting.
278*9880d681SAndroid Build Coastguard Workerdef VecListOneDHWordIndexAsmOperand : AsmOperandClass {
279*9880d681SAndroid Build Coastguard Worker  let Name = "VecListOneDHWordIndexed";
280*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
281*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListIndexedOperands";
282*9880d681SAndroid Build Coastguard Worker}
283*9880d681SAndroid Build Coastguard Workerdef VecListOneDHWordIndexed : Operand<i32> {
284*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListOneDHWordIndexAsmOperand;
285*9880d681SAndroid Build Coastguard Worker  let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
286*9880d681SAndroid Build Coastguard Worker}
287*9880d681SAndroid Build Coastguard Worker// ...with word lane subscripting.
288*9880d681SAndroid Build Coastguard Workerdef VecListOneDWordIndexAsmOperand : AsmOperandClass {
289*9880d681SAndroid Build Coastguard Worker  let Name = "VecListOneDWordIndexed";
290*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
291*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListIndexedOperands";
292*9880d681SAndroid Build Coastguard Worker}
293*9880d681SAndroid Build Coastguard Workerdef VecListOneDWordIndexed : Operand<i32> {
294*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListOneDWordIndexAsmOperand;
295*9880d681SAndroid Build Coastguard Worker  let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
296*9880d681SAndroid Build Coastguard Worker}
297*9880d681SAndroid Build Coastguard Worker
298*9880d681SAndroid Build Coastguard Worker// Register list of two D registers with byte lane subscripting.
299*9880d681SAndroid Build Coastguard Workerdef VecListTwoDByteIndexAsmOperand : AsmOperandClass {
300*9880d681SAndroid Build Coastguard Worker  let Name = "VecListTwoDByteIndexed";
301*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
302*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListIndexedOperands";
303*9880d681SAndroid Build Coastguard Worker}
304*9880d681SAndroid Build Coastguard Workerdef VecListTwoDByteIndexed : Operand<i32> {
305*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListTwoDByteIndexAsmOperand;
306*9880d681SAndroid Build Coastguard Worker  let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
307*9880d681SAndroid Build Coastguard Worker}
308*9880d681SAndroid Build Coastguard Worker// ...with half-word lane subscripting.
309*9880d681SAndroid Build Coastguard Workerdef VecListTwoDHWordIndexAsmOperand : AsmOperandClass {
310*9880d681SAndroid Build Coastguard Worker  let Name = "VecListTwoDHWordIndexed";
311*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
312*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListIndexedOperands";
313*9880d681SAndroid Build Coastguard Worker}
314*9880d681SAndroid Build Coastguard Workerdef VecListTwoDHWordIndexed : Operand<i32> {
315*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListTwoDHWordIndexAsmOperand;
316*9880d681SAndroid Build Coastguard Worker  let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
317*9880d681SAndroid Build Coastguard Worker}
318*9880d681SAndroid Build Coastguard Worker// ...with word lane subscripting.
319*9880d681SAndroid Build Coastguard Workerdef VecListTwoDWordIndexAsmOperand : AsmOperandClass {
320*9880d681SAndroid Build Coastguard Worker  let Name = "VecListTwoDWordIndexed";
321*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
322*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListIndexedOperands";
323*9880d681SAndroid Build Coastguard Worker}
324*9880d681SAndroid Build Coastguard Workerdef VecListTwoDWordIndexed : Operand<i32> {
325*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListTwoDWordIndexAsmOperand;
326*9880d681SAndroid Build Coastguard Worker  let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
327*9880d681SAndroid Build Coastguard Worker}
328*9880d681SAndroid Build Coastguard Worker// Register list of two Q registers with half-word lane subscripting.
329*9880d681SAndroid Build Coastguard Workerdef VecListTwoQHWordIndexAsmOperand : AsmOperandClass {
330*9880d681SAndroid Build Coastguard Worker  let Name = "VecListTwoQHWordIndexed";
331*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
332*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListIndexedOperands";
333*9880d681SAndroid Build Coastguard Worker}
334*9880d681SAndroid Build Coastguard Workerdef VecListTwoQHWordIndexed : Operand<i32> {
335*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListTwoQHWordIndexAsmOperand;
336*9880d681SAndroid Build Coastguard Worker  let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
337*9880d681SAndroid Build Coastguard Worker}
338*9880d681SAndroid Build Coastguard Worker// ...with word lane subscripting.
339*9880d681SAndroid Build Coastguard Workerdef VecListTwoQWordIndexAsmOperand : AsmOperandClass {
340*9880d681SAndroid Build Coastguard Worker  let Name = "VecListTwoQWordIndexed";
341*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
342*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListIndexedOperands";
343*9880d681SAndroid Build Coastguard Worker}
344*9880d681SAndroid Build Coastguard Workerdef VecListTwoQWordIndexed : Operand<i32> {
345*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListTwoQWordIndexAsmOperand;
346*9880d681SAndroid Build Coastguard Worker  let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
347*9880d681SAndroid Build Coastguard Worker}
348*9880d681SAndroid Build Coastguard Worker
349*9880d681SAndroid Build Coastguard Worker
350*9880d681SAndroid Build Coastguard Worker// Register list of three D registers with byte lane subscripting.
351*9880d681SAndroid Build Coastguard Workerdef VecListThreeDByteIndexAsmOperand : AsmOperandClass {
352*9880d681SAndroid Build Coastguard Worker  let Name = "VecListThreeDByteIndexed";
353*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
354*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListIndexedOperands";
355*9880d681SAndroid Build Coastguard Worker}
356*9880d681SAndroid Build Coastguard Workerdef VecListThreeDByteIndexed : Operand<i32> {
357*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListThreeDByteIndexAsmOperand;
358*9880d681SAndroid Build Coastguard Worker  let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
359*9880d681SAndroid Build Coastguard Worker}
360*9880d681SAndroid Build Coastguard Worker// ...with half-word lane subscripting.
361*9880d681SAndroid Build Coastguard Workerdef VecListThreeDHWordIndexAsmOperand : AsmOperandClass {
362*9880d681SAndroid Build Coastguard Worker  let Name = "VecListThreeDHWordIndexed";
363*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
364*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListIndexedOperands";
365*9880d681SAndroid Build Coastguard Worker}
366*9880d681SAndroid Build Coastguard Workerdef VecListThreeDHWordIndexed : Operand<i32> {
367*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListThreeDHWordIndexAsmOperand;
368*9880d681SAndroid Build Coastguard Worker  let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
369*9880d681SAndroid Build Coastguard Worker}
370*9880d681SAndroid Build Coastguard Worker// ...with word lane subscripting.
371*9880d681SAndroid Build Coastguard Workerdef VecListThreeDWordIndexAsmOperand : AsmOperandClass {
372*9880d681SAndroid Build Coastguard Worker  let Name = "VecListThreeDWordIndexed";
373*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
374*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListIndexedOperands";
375*9880d681SAndroid Build Coastguard Worker}
376*9880d681SAndroid Build Coastguard Workerdef VecListThreeDWordIndexed : Operand<i32> {
377*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListThreeDWordIndexAsmOperand;
378*9880d681SAndroid Build Coastguard Worker  let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
379*9880d681SAndroid Build Coastguard Worker}
380*9880d681SAndroid Build Coastguard Worker// Register list of three Q registers with half-word lane subscripting.
381*9880d681SAndroid Build Coastguard Workerdef VecListThreeQHWordIndexAsmOperand : AsmOperandClass {
382*9880d681SAndroid Build Coastguard Worker  let Name = "VecListThreeQHWordIndexed";
383*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
384*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListIndexedOperands";
385*9880d681SAndroid Build Coastguard Worker}
386*9880d681SAndroid Build Coastguard Workerdef VecListThreeQHWordIndexed : Operand<i32> {
387*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListThreeQHWordIndexAsmOperand;
388*9880d681SAndroid Build Coastguard Worker  let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
389*9880d681SAndroid Build Coastguard Worker}
390*9880d681SAndroid Build Coastguard Worker// ...with word lane subscripting.
391*9880d681SAndroid Build Coastguard Workerdef VecListThreeQWordIndexAsmOperand : AsmOperandClass {
392*9880d681SAndroid Build Coastguard Worker  let Name = "VecListThreeQWordIndexed";
393*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
394*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListIndexedOperands";
395*9880d681SAndroid Build Coastguard Worker}
396*9880d681SAndroid Build Coastguard Workerdef VecListThreeQWordIndexed : Operand<i32> {
397*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListThreeQWordIndexAsmOperand;
398*9880d681SAndroid Build Coastguard Worker  let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
399*9880d681SAndroid Build Coastguard Worker}
400*9880d681SAndroid Build Coastguard Worker
401*9880d681SAndroid Build Coastguard Worker// Register list of four D registers with byte lane subscripting.
402*9880d681SAndroid Build Coastguard Workerdef VecListFourDByteIndexAsmOperand : AsmOperandClass {
403*9880d681SAndroid Build Coastguard Worker  let Name = "VecListFourDByteIndexed";
404*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
405*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListIndexedOperands";
406*9880d681SAndroid Build Coastguard Worker}
407*9880d681SAndroid Build Coastguard Workerdef VecListFourDByteIndexed : Operand<i32> {
408*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListFourDByteIndexAsmOperand;
409*9880d681SAndroid Build Coastguard Worker  let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
410*9880d681SAndroid Build Coastguard Worker}
411*9880d681SAndroid Build Coastguard Worker// ...with half-word lane subscripting.
412*9880d681SAndroid Build Coastguard Workerdef VecListFourDHWordIndexAsmOperand : AsmOperandClass {
413*9880d681SAndroid Build Coastguard Worker  let Name = "VecListFourDHWordIndexed";
414*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
415*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListIndexedOperands";
416*9880d681SAndroid Build Coastguard Worker}
417*9880d681SAndroid Build Coastguard Workerdef VecListFourDHWordIndexed : Operand<i32> {
418*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListFourDHWordIndexAsmOperand;
419*9880d681SAndroid Build Coastguard Worker  let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
420*9880d681SAndroid Build Coastguard Worker}
421*9880d681SAndroid Build Coastguard Worker// ...with word lane subscripting.
422*9880d681SAndroid Build Coastguard Workerdef VecListFourDWordIndexAsmOperand : AsmOperandClass {
423*9880d681SAndroid Build Coastguard Worker  let Name = "VecListFourDWordIndexed";
424*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
425*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListIndexedOperands";
426*9880d681SAndroid Build Coastguard Worker}
427*9880d681SAndroid Build Coastguard Workerdef VecListFourDWordIndexed : Operand<i32> {
428*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListFourDWordIndexAsmOperand;
429*9880d681SAndroid Build Coastguard Worker  let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
430*9880d681SAndroid Build Coastguard Worker}
431*9880d681SAndroid Build Coastguard Worker// Register list of four Q registers with half-word lane subscripting.
432*9880d681SAndroid Build Coastguard Workerdef VecListFourQHWordIndexAsmOperand : AsmOperandClass {
433*9880d681SAndroid Build Coastguard Worker  let Name = "VecListFourQHWordIndexed";
434*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
435*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListIndexedOperands";
436*9880d681SAndroid Build Coastguard Worker}
437*9880d681SAndroid Build Coastguard Workerdef VecListFourQHWordIndexed : Operand<i32> {
438*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListFourQHWordIndexAsmOperand;
439*9880d681SAndroid Build Coastguard Worker  let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
440*9880d681SAndroid Build Coastguard Worker}
441*9880d681SAndroid Build Coastguard Worker// ...with word lane subscripting.
442*9880d681SAndroid Build Coastguard Workerdef VecListFourQWordIndexAsmOperand : AsmOperandClass {
443*9880d681SAndroid Build Coastguard Worker  let Name = "VecListFourQWordIndexed";
444*9880d681SAndroid Build Coastguard Worker  let ParserMethod = "parseVectorList";
445*9880d681SAndroid Build Coastguard Worker  let RenderMethod = "addVecListIndexedOperands";
446*9880d681SAndroid Build Coastguard Worker}
447*9880d681SAndroid Build Coastguard Workerdef VecListFourQWordIndexed : Operand<i32> {
448*9880d681SAndroid Build Coastguard Worker  let ParserMatchClass = VecListFourQWordIndexAsmOperand;
449*9880d681SAndroid Build Coastguard Worker  let MIOperandInfo = (ops DPR:$Vd, i32imm:$idx);
450*9880d681SAndroid Build Coastguard Worker}
451*9880d681SAndroid Build Coastguard Worker
452*9880d681SAndroid Build Coastguard Workerdef dword_alignedload : PatFrag<(ops node:$ptr), (load node:$ptr), [{
453*9880d681SAndroid Build Coastguard Worker  return cast<LoadSDNode>(N)->getAlignment() >= 8;
454*9880d681SAndroid Build Coastguard Worker}]>;
455*9880d681SAndroid Build Coastguard Workerdef dword_alignedstore : PatFrag<(ops node:$val, node:$ptr),
456*9880d681SAndroid Build Coastguard Worker                                 (store node:$val, node:$ptr), [{
457*9880d681SAndroid Build Coastguard Worker  return cast<StoreSDNode>(N)->getAlignment() >= 8;
458*9880d681SAndroid Build Coastguard Worker}]>;
459*9880d681SAndroid Build Coastguard Workerdef word_alignedload : PatFrag<(ops node:$ptr), (load node:$ptr), [{
460*9880d681SAndroid Build Coastguard Worker  return cast<LoadSDNode>(N)->getAlignment() == 4;
461*9880d681SAndroid Build Coastguard Worker}]>;
462*9880d681SAndroid Build Coastguard Workerdef word_alignedstore : PatFrag<(ops node:$val, node:$ptr),
463*9880d681SAndroid Build Coastguard Worker                                 (store node:$val, node:$ptr), [{
464*9880d681SAndroid Build Coastguard Worker  return cast<StoreSDNode>(N)->getAlignment() == 4;
465*9880d681SAndroid Build Coastguard Worker}]>;
466*9880d681SAndroid Build Coastguard Workerdef hword_alignedload : PatFrag<(ops node:$ptr), (load node:$ptr), [{
467*9880d681SAndroid Build Coastguard Worker  return cast<LoadSDNode>(N)->getAlignment() == 2;
468*9880d681SAndroid Build Coastguard Worker}]>;
469*9880d681SAndroid Build Coastguard Workerdef hword_alignedstore : PatFrag<(ops node:$val, node:$ptr),
470*9880d681SAndroid Build Coastguard Worker                                 (store node:$val, node:$ptr), [{
471*9880d681SAndroid Build Coastguard Worker  return cast<StoreSDNode>(N)->getAlignment() == 2;
472*9880d681SAndroid Build Coastguard Worker}]>;
473*9880d681SAndroid Build Coastguard Workerdef byte_alignedload : PatFrag<(ops node:$ptr), (load node:$ptr), [{
474*9880d681SAndroid Build Coastguard Worker  return cast<LoadSDNode>(N)->getAlignment() == 1;
475*9880d681SAndroid Build Coastguard Worker}]>;
476*9880d681SAndroid Build Coastguard Workerdef byte_alignedstore : PatFrag<(ops node:$val, node:$ptr),
477*9880d681SAndroid Build Coastguard Worker                             (store node:$val, node:$ptr), [{
478*9880d681SAndroid Build Coastguard Worker  return cast<StoreSDNode>(N)->getAlignment() == 1;
479*9880d681SAndroid Build Coastguard Worker}]>;
480*9880d681SAndroid Build Coastguard Workerdef non_word_alignedload : PatFrag<(ops node:$ptr), (load node:$ptr), [{
481*9880d681SAndroid Build Coastguard Worker  return cast<LoadSDNode>(N)->getAlignment() < 4;
482*9880d681SAndroid Build Coastguard Worker}]>;
483*9880d681SAndroid Build Coastguard Workerdef non_word_alignedstore : PatFrag<(ops node:$val, node:$ptr),
484*9880d681SAndroid Build Coastguard Worker                                    (store node:$val, node:$ptr), [{
485*9880d681SAndroid Build Coastguard Worker  return cast<StoreSDNode>(N)->getAlignment() < 4;
486*9880d681SAndroid Build Coastguard Worker}]>;
487*9880d681SAndroid Build Coastguard Worker
488*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===//
489*9880d681SAndroid Build Coastguard Worker// NEON-specific DAG Nodes.
490*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===//
491*9880d681SAndroid Build Coastguard Worker
492*9880d681SAndroid Build Coastguard Workerdef SDTARMVCMP    : SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisSameAs<1, 2>]>;
493*9880d681SAndroid Build Coastguard Workerdef SDTARMVCMPZ   : SDTypeProfile<1, 1, []>;
494*9880d681SAndroid Build Coastguard Worker
495*9880d681SAndroid Build Coastguard Workerdef NEONvceq      : SDNode<"ARMISD::VCEQ", SDTARMVCMP>;
496*9880d681SAndroid Build Coastguard Workerdef NEONvceqz     : SDNode<"ARMISD::VCEQZ", SDTARMVCMPZ>;
497*9880d681SAndroid Build Coastguard Workerdef NEONvcge      : SDNode<"ARMISD::VCGE", SDTARMVCMP>;
498*9880d681SAndroid Build Coastguard Workerdef NEONvcgez     : SDNode<"ARMISD::VCGEZ", SDTARMVCMPZ>;
499*9880d681SAndroid Build Coastguard Workerdef NEONvclez     : SDNode<"ARMISD::VCLEZ", SDTARMVCMPZ>;
500*9880d681SAndroid Build Coastguard Workerdef NEONvcgeu     : SDNode<"ARMISD::VCGEU", SDTARMVCMP>;
501*9880d681SAndroid Build Coastguard Workerdef NEONvcgt      : SDNode<"ARMISD::VCGT", SDTARMVCMP>;
502*9880d681SAndroid Build Coastguard Workerdef NEONvcgtz     : SDNode<"ARMISD::VCGTZ", SDTARMVCMPZ>;
503*9880d681SAndroid Build Coastguard Workerdef NEONvcltz     : SDNode<"ARMISD::VCLTZ", SDTARMVCMPZ>;
504*9880d681SAndroid Build Coastguard Workerdef NEONvcgtu     : SDNode<"ARMISD::VCGTU", SDTARMVCMP>;
505*9880d681SAndroid Build Coastguard Workerdef NEONvtst      : SDNode<"ARMISD::VTST", SDTARMVCMP>;
506*9880d681SAndroid Build Coastguard Worker
507*9880d681SAndroid Build Coastguard Worker// Types for vector shift by immediates.  The "SHX" version is for long and
508*9880d681SAndroid Build Coastguard Worker// narrow operations where the source and destination vectors have different
509*9880d681SAndroid Build Coastguard Worker// types.  The "SHINS" version is for shift and insert operations.
510*9880d681SAndroid Build Coastguard Workerdef SDTARMVSH     : SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisSameAs<0, 1>,
511*9880d681SAndroid Build Coastguard Worker                                         SDTCisVT<2, i32>]>;
512*9880d681SAndroid Build Coastguard Workerdef SDTARMVSHX    : SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisInt<1>,
513*9880d681SAndroid Build Coastguard Worker                                         SDTCisVT<2, i32>]>;
514*9880d681SAndroid Build Coastguard Workerdef SDTARMVSHINS  : SDTypeProfile<1, 3, [SDTCisInt<0>, SDTCisSameAs<0, 1>,
515*9880d681SAndroid Build Coastguard Worker                                         SDTCisSameAs<0, 2>, SDTCisVT<3, i32>]>;
516*9880d681SAndroid Build Coastguard Worker
517*9880d681SAndroid Build Coastguard Workerdef NEONvshl      : SDNode<"ARMISD::VSHL", SDTARMVSH>;
518*9880d681SAndroid Build Coastguard Workerdef NEONvshrs     : SDNode<"ARMISD::VSHRs", SDTARMVSH>;
519*9880d681SAndroid Build Coastguard Workerdef NEONvshru     : SDNode<"ARMISD::VSHRu", SDTARMVSH>;
520*9880d681SAndroid Build Coastguard Workerdef NEONvshrn     : SDNode<"ARMISD::VSHRN", SDTARMVSHX>;
521*9880d681SAndroid Build Coastguard Worker
522*9880d681SAndroid Build Coastguard Workerdef NEONvrshrs    : SDNode<"ARMISD::VRSHRs", SDTARMVSH>;
523*9880d681SAndroid Build Coastguard Workerdef NEONvrshru    : SDNode<"ARMISD::VRSHRu", SDTARMVSH>;
524*9880d681SAndroid Build Coastguard Workerdef NEONvrshrn    : SDNode<"ARMISD::VRSHRN", SDTARMVSHX>;
525*9880d681SAndroid Build Coastguard Worker
526*9880d681SAndroid Build Coastguard Workerdef NEONvqshls    : SDNode<"ARMISD::VQSHLs", SDTARMVSH>;
527*9880d681SAndroid Build Coastguard Workerdef NEONvqshlu    : SDNode<"ARMISD::VQSHLu", SDTARMVSH>;
528*9880d681SAndroid Build Coastguard Workerdef NEONvqshlsu   : SDNode<"ARMISD::VQSHLsu", SDTARMVSH>;
529*9880d681SAndroid Build Coastguard Workerdef NEONvqshrns   : SDNode<"ARMISD::VQSHRNs", SDTARMVSHX>;
530*9880d681SAndroid Build Coastguard Workerdef NEONvqshrnu   : SDNode<"ARMISD::VQSHRNu", SDTARMVSHX>;
531*9880d681SAndroid Build Coastguard Workerdef NEONvqshrnsu  : SDNode<"ARMISD::VQSHRNsu", SDTARMVSHX>;
532*9880d681SAndroid Build Coastguard Worker
533*9880d681SAndroid Build Coastguard Workerdef NEONvqrshrns  : SDNode<"ARMISD::VQRSHRNs", SDTARMVSHX>;
534*9880d681SAndroid Build Coastguard Workerdef NEONvqrshrnu  : SDNode<"ARMISD::VQRSHRNu", SDTARMVSHX>;
535*9880d681SAndroid Build Coastguard Workerdef NEONvqrshrnsu : SDNode<"ARMISD::VQRSHRNsu", SDTARMVSHX>;
536*9880d681SAndroid Build Coastguard Worker
537*9880d681SAndroid Build Coastguard Workerdef NEONvsli      : SDNode<"ARMISD::VSLI", SDTARMVSHINS>;
538*9880d681SAndroid Build Coastguard Workerdef NEONvsri      : SDNode<"ARMISD::VSRI", SDTARMVSHINS>;
539*9880d681SAndroid Build Coastguard Worker
540*9880d681SAndroid Build Coastguard Workerdef SDTARMVGETLN  : SDTypeProfile<1, 2, [SDTCisVT<0, i32>, SDTCisInt<1>,
541*9880d681SAndroid Build Coastguard Worker                                         SDTCisVT<2, i32>]>;
542*9880d681SAndroid Build Coastguard Workerdef NEONvgetlaneu : SDNode<"ARMISD::VGETLANEu", SDTARMVGETLN>;
543*9880d681SAndroid Build Coastguard Workerdef NEONvgetlanes : SDNode<"ARMISD::VGETLANEs", SDTARMVGETLN>;
544*9880d681SAndroid Build Coastguard Worker
545*9880d681SAndroid Build Coastguard Workerdef SDTARMVMOVIMM : SDTypeProfile<1, 1, [SDTCisVec<0>, SDTCisVT<1, i32>]>;
546*9880d681SAndroid Build Coastguard Workerdef NEONvmovImm   : SDNode<"ARMISD::VMOVIMM", SDTARMVMOVIMM>;
547*9880d681SAndroid Build Coastguard Workerdef NEONvmvnImm   : SDNode<"ARMISD::VMVNIMM", SDTARMVMOVIMM>;
548*9880d681SAndroid Build Coastguard Workerdef NEONvmovFPImm : SDNode<"ARMISD::VMOVFPIMM", SDTARMVMOVIMM>;
549*9880d681SAndroid Build Coastguard Worker
550*9880d681SAndroid Build Coastguard Workerdef SDTARMVORRIMM : SDTypeProfile<1, 2, [SDTCisVec<0>, SDTCisSameAs<0, 1>,
551*9880d681SAndroid Build Coastguard Worker                                           SDTCisVT<2, i32>]>;
552*9880d681SAndroid Build Coastguard Workerdef NEONvorrImm   : SDNode<"ARMISD::VORRIMM", SDTARMVORRIMM>;
553*9880d681SAndroid Build Coastguard Workerdef NEONvbicImm   : SDNode<"ARMISD::VBICIMM", SDTARMVORRIMM>;
554*9880d681SAndroid Build Coastguard Worker
555*9880d681SAndroid Build Coastguard Workerdef NEONvbsl      : SDNode<"ARMISD::VBSL",
556*9880d681SAndroid Build Coastguard Worker                           SDTypeProfile<1, 3, [SDTCisVec<0>,
557*9880d681SAndroid Build Coastguard Worker                                                SDTCisSameAs<0, 1>,
558*9880d681SAndroid Build Coastguard Worker                                                SDTCisSameAs<0, 2>,
559*9880d681SAndroid Build Coastguard Worker                                                SDTCisSameAs<0, 3>]>>;
560*9880d681SAndroid Build Coastguard Worker
561*9880d681SAndroid Build Coastguard Workerdef NEONvdup      : SDNode<"ARMISD::VDUP", SDTypeProfile<1, 1, [SDTCisVec<0>]>>;
562*9880d681SAndroid Build Coastguard Worker
563*9880d681SAndroid Build Coastguard Worker// VDUPLANE can produce a quad-register result from a double-register source,
564*9880d681SAndroid Build Coastguard Worker// so the result is not constrained to match the source.
565*9880d681SAndroid Build Coastguard Workerdef NEONvduplane  : SDNode<"ARMISD::VDUPLANE",
566*9880d681SAndroid Build Coastguard Worker                           SDTypeProfile<1, 2, [SDTCisVec<0>, SDTCisVec<1>,
567*9880d681SAndroid Build Coastguard Worker                                                SDTCisVT<2, i32>]>>;
568*9880d681SAndroid Build Coastguard Worker
569*9880d681SAndroid Build Coastguard Workerdef SDTARMVEXT    : SDTypeProfile<1, 3, [SDTCisVec<0>, SDTCisSameAs<0, 1>,
570*9880d681SAndroid Build Coastguard Worker                                         SDTCisSameAs<0, 2>, SDTCisVT<3, i32>]>;
571*9880d681SAndroid Build Coastguard Workerdef NEONvext      : SDNode<"ARMISD::VEXT", SDTARMVEXT>;
572*9880d681SAndroid Build Coastguard Worker
573*9880d681SAndroid Build Coastguard Workerdef SDTARMVSHUF   : SDTypeProfile<1, 1, [SDTCisVec<0>, SDTCisSameAs<0, 1>]>;
574*9880d681SAndroid Build Coastguard Workerdef NEONvrev64    : SDNode<"ARMISD::VREV64", SDTARMVSHUF>;
575*9880d681SAndroid Build Coastguard Workerdef NEONvrev32    : SDNode<"ARMISD::VREV32", SDTARMVSHUF>;
576*9880d681SAndroid Build Coastguard Workerdef NEONvrev16    : SDNode<"ARMISD::VREV16", SDTARMVSHUF>;
577*9880d681SAndroid Build Coastguard Worker
578*9880d681SAndroid Build Coastguard Workerdef SDTARMVSHUF2  : SDTypeProfile<2, 2, [SDTCisVec<0>, SDTCisSameAs<0, 1>,
579*9880d681SAndroid Build Coastguard Worker                                         SDTCisSameAs<0, 2>,
580*9880d681SAndroid Build Coastguard Worker                                         SDTCisSameAs<0, 3>]>;
581*9880d681SAndroid Build Coastguard Workerdef NEONzip       : SDNode<"ARMISD::VZIP", SDTARMVSHUF2>;
582*9880d681SAndroid Build Coastguard Workerdef NEONuzp       : SDNode<"ARMISD::VUZP", SDTARMVSHUF2>;
583*9880d681SAndroid Build Coastguard Workerdef NEONtrn       : SDNode<"ARMISD::VTRN", SDTARMVSHUF2>;
584*9880d681SAndroid Build Coastguard Worker
585*9880d681SAndroid Build Coastguard Workerdef SDTARMVMULL   : SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisInt<1>,
586*9880d681SAndroid Build Coastguard Worker                                         SDTCisSameAs<1, 2>]>;
587*9880d681SAndroid Build Coastguard Workerdef NEONvmulls    : SDNode<"ARMISD::VMULLs", SDTARMVMULL>;
588*9880d681SAndroid Build Coastguard Workerdef NEONvmullu    : SDNode<"ARMISD::VMULLu", SDTARMVMULL>;
589*9880d681SAndroid Build Coastguard Worker
590*9880d681SAndroid Build Coastguard Workerdef NEONimmAllZerosV: PatLeaf<(NEONvmovImm (i32 timm)), [{
591*9880d681SAndroid Build Coastguard Worker  ConstantSDNode *ConstVal = cast<ConstantSDNode>(N->getOperand(0));
592*9880d681SAndroid Build Coastguard Worker  unsigned EltBits = 0;
593*9880d681SAndroid Build Coastguard Worker  uint64_t EltVal = ARM_AM::decodeNEONModImm(ConstVal->getZExtValue(), EltBits);
594*9880d681SAndroid Build Coastguard Worker  return (EltBits == 32 && EltVal == 0);
595*9880d681SAndroid Build Coastguard Worker}]>;
596*9880d681SAndroid Build Coastguard Worker
597*9880d681SAndroid Build Coastguard Workerdef NEONimmAllOnesV: PatLeaf<(NEONvmovImm (i32 timm)), [{
598*9880d681SAndroid Build Coastguard Worker  ConstantSDNode *ConstVal = cast<ConstantSDNode>(N->getOperand(0));
599*9880d681SAndroid Build Coastguard Worker  unsigned EltBits = 0;
600*9880d681SAndroid Build Coastguard Worker  uint64_t EltVal = ARM_AM::decodeNEONModImm(ConstVal->getZExtValue(), EltBits);
601*9880d681SAndroid Build Coastguard Worker  return (EltBits == 8 && EltVal == 0xff);
602*9880d681SAndroid Build Coastguard Worker}]>;
603*9880d681SAndroid Build Coastguard Worker
604*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===//
605*9880d681SAndroid Build Coastguard Worker// NEON load / store instructions
606*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===//
607*9880d681SAndroid Build Coastguard Worker
608*9880d681SAndroid Build Coastguard Worker// Use VLDM to load a Q register as a D register pair.
609*9880d681SAndroid Build Coastguard Worker// This is a pseudo instruction that is expanded to VLDMD after reg alloc.
610*9880d681SAndroid Build Coastguard Workerdef VLDMQIA
611*9880d681SAndroid Build Coastguard Worker  : PseudoVFPLdStM<(outs DPair:$dst), (ins GPR:$Rn),
612*9880d681SAndroid Build Coastguard Worker                    IIC_fpLoad_m, "",
613*9880d681SAndroid Build Coastguard Worker                   [(set DPair:$dst, (v2f64 (load GPR:$Rn)))]>;
614*9880d681SAndroid Build Coastguard Worker
615*9880d681SAndroid Build Coastguard Worker// Use VSTM to store a Q register as a D register pair.
616*9880d681SAndroid Build Coastguard Worker// This is a pseudo instruction that is expanded to VSTMD after reg alloc.
617*9880d681SAndroid Build Coastguard Workerdef VSTMQIA
618*9880d681SAndroid Build Coastguard Worker  : PseudoVFPLdStM<(outs), (ins DPair:$src, GPR:$Rn),
619*9880d681SAndroid Build Coastguard Worker                    IIC_fpStore_m, "",
620*9880d681SAndroid Build Coastguard Worker                   [(store (v2f64 DPair:$src), GPR:$Rn)]>;
621*9880d681SAndroid Build Coastguard Worker
622*9880d681SAndroid Build Coastguard Worker// Classes for VLD* pseudo-instructions with multi-register operands.
623*9880d681SAndroid Build Coastguard Worker// These are expanded to real instructions after register allocation.
624*9880d681SAndroid Build Coastguard Workerclass VLDQPseudo<InstrItinClass itin>
625*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs QPR:$dst), (ins addrmode6:$addr), itin, "">;
626*9880d681SAndroid Build Coastguard Workerclass VLDQWBPseudo<InstrItinClass itin>
627*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs QPR:$dst, GPR:$wb),
628*9880d681SAndroid Build Coastguard Worker                (ins addrmode6:$addr, am6offset:$offset), itin,
629*9880d681SAndroid Build Coastguard Worker                "$addr.addr = $wb">;
630*9880d681SAndroid Build Coastguard Workerclass VLDQWBfixedPseudo<InstrItinClass itin>
631*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs QPR:$dst, GPR:$wb),
632*9880d681SAndroid Build Coastguard Worker                (ins addrmode6:$addr), itin,
633*9880d681SAndroid Build Coastguard Worker                "$addr.addr = $wb">;
634*9880d681SAndroid Build Coastguard Workerclass VLDQWBregisterPseudo<InstrItinClass itin>
635*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs QPR:$dst, GPR:$wb),
636*9880d681SAndroid Build Coastguard Worker                (ins addrmode6:$addr, rGPR:$offset), itin,
637*9880d681SAndroid Build Coastguard Worker                "$addr.addr = $wb">;
638*9880d681SAndroid Build Coastguard Worker
639*9880d681SAndroid Build Coastguard Workerclass VLDQQPseudo<InstrItinClass itin>
640*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs QQPR:$dst), (ins addrmode6:$addr), itin, "">;
641*9880d681SAndroid Build Coastguard Workerclass VLDQQWBPseudo<InstrItinClass itin>
642*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs QQPR:$dst, GPR:$wb),
643*9880d681SAndroid Build Coastguard Worker                (ins addrmode6:$addr, am6offset:$offset), itin,
644*9880d681SAndroid Build Coastguard Worker                "$addr.addr = $wb">;
645*9880d681SAndroid Build Coastguard Workerclass VLDQQWBfixedPseudo<InstrItinClass itin>
646*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs QQPR:$dst, GPR:$wb),
647*9880d681SAndroid Build Coastguard Worker                (ins addrmode6:$addr), itin,
648*9880d681SAndroid Build Coastguard Worker                "$addr.addr = $wb">;
649*9880d681SAndroid Build Coastguard Workerclass VLDQQWBregisterPseudo<InstrItinClass itin>
650*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs QQPR:$dst, GPR:$wb),
651*9880d681SAndroid Build Coastguard Worker                (ins addrmode6:$addr, rGPR:$offset), itin,
652*9880d681SAndroid Build Coastguard Worker                "$addr.addr = $wb">;
653*9880d681SAndroid Build Coastguard Worker
654*9880d681SAndroid Build Coastguard Worker
655*9880d681SAndroid Build Coastguard Workerclass VLDQQQQPseudo<InstrItinClass itin>
656*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs QQQQPR:$dst), (ins addrmode6:$addr, QQQQPR:$src),itin,
657*9880d681SAndroid Build Coastguard Worker                "$src = $dst">;
658*9880d681SAndroid Build Coastguard Workerclass VLDQQQQWBPseudo<InstrItinClass itin>
659*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs QQQQPR:$dst, GPR:$wb),
660*9880d681SAndroid Build Coastguard Worker                (ins addrmode6:$addr, am6offset:$offset, QQQQPR:$src), itin,
661*9880d681SAndroid Build Coastguard Worker                "$addr.addr = $wb, $src = $dst">;
662*9880d681SAndroid Build Coastguard Worker
663*9880d681SAndroid Build Coastguard Workerlet mayLoad = 1, hasSideEffects = 0, hasExtraDefRegAllocReq = 1 in {
664*9880d681SAndroid Build Coastguard Worker
665*9880d681SAndroid Build Coastguard Worker//   VLD1     : Vector Load (multiple single elements)
666*9880d681SAndroid Build Coastguard Workerclass VLD1D<bits<4> op7_4, string Dt, Operand AddrMode>
667*9880d681SAndroid Build Coastguard Worker  : NLdSt<0,0b10,0b0111,op7_4, (outs VecListOneD:$Vd),
668*9880d681SAndroid Build Coastguard Worker          (ins AddrMode:$Rn), IIC_VLD1,
669*9880d681SAndroid Build Coastguard Worker          "vld1", Dt, "$Vd, $Rn", "", []> {
670*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
671*9880d681SAndroid Build Coastguard Worker  let Inst{4} = Rn{4};
672*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLDST1Instruction";
673*9880d681SAndroid Build Coastguard Worker}
674*9880d681SAndroid Build Coastguard Workerclass VLD1Q<bits<4> op7_4, string Dt, Operand AddrMode>
675*9880d681SAndroid Build Coastguard Worker  : NLdSt<0,0b10,0b1010,op7_4, (outs VecListDPair:$Vd),
676*9880d681SAndroid Build Coastguard Worker          (ins AddrMode:$Rn), IIC_VLD1x2,
677*9880d681SAndroid Build Coastguard Worker          "vld1", Dt, "$Vd, $Rn", "", []> {
678*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
679*9880d681SAndroid Build Coastguard Worker  let Inst{5-4} = Rn{5-4};
680*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLDST1Instruction";
681*9880d681SAndroid Build Coastguard Worker}
682*9880d681SAndroid Build Coastguard Worker
683*9880d681SAndroid Build Coastguard Workerdef  VLD1d8   : VLD1D<{0,0,0,?}, "8",  addrmode6align64>;
684*9880d681SAndroid Build Coastguard Workerdef  VLD1d16  : VLD1D<{0,1,0,?}, "16", addrmode6align64>;
685*9880d681SAndroid Build Coastguard Workerdef  VLD1d32  : VLD1D<{1,0,0,?}, "32", addrmode6align64>;
686*9880d681SAndroid Build Coastguard Workerdef  VLD1d64  : VLD1D<{1,1,0,?}, "64", addrmode6align64>;
687*9880d681SAndroid Build Coastguard Worker
688*9880d681SAndroid Build Coastguard Workerdef  VLD1q8   : VLD1Q<{0,0,?,?}, "8",  addrmode6align64or128>;
689*9880d681SAndroid Build Coastguard Workerdef  VLD1q16  : VLD1Q<{0,1,?,?}, "16", addrmode6align64or128>;
690*9880d681SAndroid Build Coastguard Workerdef  VLD1q32  : VLD1Q<{1,0,?,?}, "32", addrmode6align64or128>;
691*9880d681SAndroid Build Coastguard Workerdef  VLD1q64  : VLD1Q<{1,1,?,?}, "64", addrmode6align64or128>;
692*9880d681SAndroid Build Coastguard Worker
693*9880d681SAndroid Build Coastguard Worker// ...with address register writeback:
694*9880d681SAndroid Build Coastguard Workermulticlass VLD1DWB<bits<4> op7_4, string Dt, Operand AddrMode> {
695*9880d681SAndroid Build Coastguard Worker  def _fixed : NLdSt<0,0b10, 0b0111,op7_4, (outs VecListOneD:$Vd, GPR:$wb),
696*9880d681SAndroid Build Coastguard Worker                     (ins AddrMode:$Rn), IIC_VLD1u,
697*9880d681SAndroid Build Coastguard Worker                     "vld1", Dt, "$Vd, $Rn!",
698*9880d681SAndroid Build Coastguard Worker                     "$Rn.addr = $wb", []> {
699*9880d681SAndroid Build Coastguard Worker    let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
700*9880d681SAndroid Build Coastguard Worker    let Inst{4} = Rn{4};
701*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLDST1Instruction";
702*9880d681SAndroid Build Coastguard Worker  }
703*9880d681SAndroid Build Coastguard Worker  def _register : NLdSt<0,0b10,0b0111,op7_4, (outs VecListOneD:$Vd, GPR:$wb),
704*9880d681SAndroid Build Coastguard Worker                        (ins AddrMode:$Rn, rGPR:$Rm), IIC_VLD1u,
705*9880d681SAndroid Build Coastguard Worker                        "vld1", Dt, "$Vd, $Rn, $Rm",
706*9880d681SAndroid Build Coastguard Worker                        "$Rn.addr = $wb", []> {
707*9880d681SAndroid Build Coastguard Worker    let Inst{4} = Rn{4};
708*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLDST1Instruction";
709*9880d681SAndroid Build Coastguard Worker  }
710*9880d681SAndroid Build Coastguard Worker}
711*9880d681SAndroid Build Coastguard Workermulticlass VLD1QWB<bits<4> op7_4, string Dt, Operand AddrMode> {
712*9880d681SAndroid Build Coastguard Worker  def _fixed : NLdSt<0,0b10,0b1010,op7_4, (outs VecListDPair:$Vd, GPR:$wb),
713*9880d681SAndroid Build Coastguard Worker                    (ins AddrMode:$Rn), IIC_VLD1x2u,
714*9880d681SAndroid Build Coastguard Worker                     "vld1", Dt, "$Vd, $Rn!",
715*9880d681SAndroid Build Coastguard Worker                     "$Rn.addr = $wb", []> {
716*9880d681SAndroid Build Coastguard Worker    let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
717*9880d681SAndroid Build Coastguard Worker    let Inst{5-4} = Rn{5-4};
718*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLDST1Instruction";
719*9880d681SAndroid Build Coastguard Worker  }
720*9880d681SAndroid Build Coastguard Worker  def _register : NLdSt<0,0b10,0b1010,op7_4, (outs VecListDPair:$Vd, GPR:$wb),
721*9880d681SAndroid Build Coastguard Worker                        (ins AddrMode:$Rn, rGPR:$Rm), IIC_VLD1x2u,
722*9880d681SAndroid Build Coastguard Worker                        "vld1", Dt, "$Vd, $Rn, $Rm",
723*9880d681SAndroid Build Coastguard Worker                        "$Rn.addr = $wb", []> {
724*9880d681SAndroid Build Coastguard Worker    let Inst{5-4} = Rn{5-4};
725*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLDST1Instruction";
726*9880d681SAndroid Build Coastguard Worker  }
727*9880d681SAndroid Build Coastguard Worker}
728*9880d681SAndroid Build Coastguard Worker
729*9880d681SAndroid Build Coastguard Workerdefm VLD1d8wb  : VLD1DWB<{0,0,0,?}, "8",  addrmode6align64>;
730*9880d681SAndroid Build Coastguard Workerdefm VLD1d16wb : VLD1DWB<{0,1,0,?}, "16", addrmode6align64>;
731*9880d681SAndroid Build Coastguard Workerdefm VLD1d32wb : VLD1DWB<{1,0,0,?}, "32", addrmode6align64>;
732*9880d681SAndroid Build Coastguard Workerdefm VLD1d64wb : VLD1DWB<{1,1,0,?}, "64", addrmode6align64>;
733*9880d681SAndroid Build Coastguard Workerdefm VLD1q8wb  : VLD1QWB<{0,0,?,?}, "8",  addrmode6align64or128>;
734*9880d681SAndroid Build Coastguard Workerdefm VLD1q16wb : VLD1QWB<{0,1,?,?}, "16", addrmode6align64or128>;
735*9880d681SAndroid Build Coastguard Workerdefm VLD1q32wb : VLD1QWB<{1,0,?,?}, "32", addrmode6align64or128>;
736*9880d681SAndroid Build Coastguard Workerdefm VLD1q64wb : VLD1QWB<{1,1,?,?}, "64", addrmode6align64or128>;
737*9880d681SAndroid Build Coastguard Worker
738*9880d681SAndroid Build Coastguard Worker// ...with 3 registers
739*9880d681SAndroid Build Coastguard Workerclass VLD1D3<bits<4> op7_4, string Dt, Operand AddrMode>
740*9880d681SAndroid Build Coastguard Worker  : NLdSt<0,0b10,0b0110,op7_4, (outs VecListThreeD:$Vd),
741*9880d681SAndroid Build Coastguard Worker          (ins AddrMode:$Rn), IIC_VLD1x3, "vld1", Dt,
742*9880d681SAndroid Build Coastguard Worker          "$Vd, $Rn", "", []> {
743*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
744*9880d681SAndroid Build Coastguard Worker  let Inst{4} = Rn{4};
745*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLDST1Instruction";
746*9880d681SAndroid Build Coastguard Worker}
747*9880d681SAndroid Build Coastguard Workermulticlass VLD1D3WB<bits<4> op7_4, string Dt, Operand AddrMode> {
748*9880d681SAndroid Build Coastguard Worker  def _fixed : NLdSt<0,0b10,0b0110, op7_4, (outs VecListThreeD:$Vd, GPR:$wb),
749*9880d681SAndroid Build Coastguard Worker                    (ins AddrMode:$Rn), IIC_VLD1x2u,
750*9880d681SAndroid Build Coastguard Worker                     "vld1", Dt, "$Vd, $Rn!",
751*9880d681SAndroid Build Coastguard Worker                     "$Rn.addr = $wb", []> {
752*9880d681SAndroid Build Coastguard Worker    let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
753*9880d681SAndroid Build Coastguard Worker    let Inst{4} = Rn{4};
754*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLDST1Instruction";
755*9880d681SAndroid Build Coastguard Worker  }
756*9880d681SAndroid Build Coastguard Worker  def _register : NLdSt<0,0b10,0b0110,op7_4, (outs VecListThreeD:$Vd, GPR:$wb),
757*9880d681SAndroid Build Coastguard Worker                        (ins AddrMode:$Rn, rGPR:$Rm), IIC_VLD1x2u,
758*9880d681SAndroid Build Coastguard Worker                        "vld1", Dt, "$Vd, $Rn, $Rm",
759*9880d681SAndroid Build Coastguard Worker                        "$Rn.addr = $wb", []> {
760*9880d681SAndroid Build Coastguard Worker    let Inst{4} = Rn{4};
761*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLDST1Instruction";
762*9880d681SAndroid Build Coastguard Worker  }
763*9880d681SAndroid Build Coastguard Worker}
764*9880d681SAndroid Build Coastguard Worker
765*9880d681SAndroid Build Coastguard Workerdef VLD1d8T      : VLD1D3<{0,0,0,?}, "8",  addrmode6align64>;
766*9880d681SAndroid Build Coastguard Workerdef VLD1d16T     : VLD1D3<{0,1,0,?}, "16", addrmode6align64>;
767*9880d681SAndroid Build Coastguard Workerdef VLD1d32T     : VLD1D3<{1,0,0,?}, "32", addrmode6align64>;
768*9880d681SAndroid Build Coastguard Workerdef VLD1d64T     : VLD1D3<{1,1,0,?}, "64", addrmode6align64>;
769*9880d681SAndroid Build Coastguard Worker
770*9880d681SAndroid Build Coastguard Workerdefm VLD1d8Twb  : VLD1D3WB<{0,0,0,?}, "8",  addrmode6align64>;
771*9880d681SAndroid Build Coastguard Workerdefm VLD1d16Twb : VLD1D3WB<{0,1,0,?}, "16", addrmode6align64>;
772*9880d681SAndroid Build Coastguard Workerdefm VLD1d32Twb : VLD1D3WB<{1,0,0,?}, "32", addrmode6align64>;
773*9880d681SAndroid Build Coastguard Workerdefm VLD1d64Twb : VLD1D3WB<{1,1,0,?}, "64", addrmode6align64>;
774*9880d681SAndroid Build Coastguard Worker
775*9880d681SAndroid Build Coastguard Workerdef VLD1d64TPseudo : VLDQQPseudo<IIC_VLD1x3>;
776*9880d681SAndroid Build Coastguard Workerdef VLD1d64TPseudoWB_fixed : VLDQQWBfixedPseudo<IIC_VLD1x3>;
777*9880d681SAndroid Build Coastguard Workerdef VLD1d64TPseudoWB_register : VLDQQWBregisterPseudo<IIC_VLD1x3>;
778*9880d681SAndroid Build Coastguard Worker
779*9880d681SAndroid Build Coastguard Worker// ...with 4 registers
780*9880d681SAndroid Build Coastguard Workerclass VLD1D4<bits<4> op7_4, string Dt, Operand AddrMode>
781*9880d681SAndroid Build Coastguard Worker  : NLdSt<0, 0b10, 0b0010, op7_4, (outs VecListFourD:$Vd),
782*9880d681SAndroid Build Coastguard Worker          (ins AddrMode:$Rn), IIC_VLD1x4, "vld1", Dt,
783*9880d681SAndroid Build Coastguard Worker          "$Vd, $Rn", "", []> {
784*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
785*9880d681SAndroid Build Coastguard Worker  let Inst{5-4} = Rn{5-4};
786*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLDST1Instruction";
787*9880d681SAndroid Build Coastguard Worker}
788*9880d681SAndroid Build Coastguard Workermulticlass VLD1D4WB<bits<4> op7_4, string Dt, Operand AddrMode> {
789*9880d681SAndroid Build Coastguard Worker  def _fixed : NLdSt<0,0b10,0b0010, op7_4, (outs VecListFourD:$Vd, GPR:$wb),
790*9880d681SAndroid Build Coastguard Worker                    (ins AddrMode:$Rn), IIC_VLD1x2u,
791*9880d681SAndroid Build Coastguard Worker                     "vld1", Dt, "$Vd, $Rn!",
792*9880d681SAndroid Build Coastguard Worker                     "$Rn.addr = $wb", []> {
793*9880d681SAndroid Build Coastguard Worker    let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
794*9880d681SAndroid Build Coastguard Worker    let Inst{5-4} = Rn{5-4};
795*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLDST1Instruction";
796*9880d681SAndroid Build Coastguard Worker  }
797*9880d681SAndroid Build Coastguard Worker  def _register : NLdSt<0,0b10,0b0010,op7_4, (outs VecListFourD:$Vd, GPR:$wb),
798*9880d681SAndroid Build Coastguard Worker                        (ins AddrMode:$Rn, rGPR:$Rm), IIC_VLD1x2u,
799*9880d681SAndroid Build Coastguard Worker                        "vld1", Dt, "$Vd, $Rn, $Rm",
800*9880d681SAndroid Build Coastguard Worker                        "$Rn.addr = $wb", []> {
801*9880d681SAndroid Build Coastguard Worker    let Inst{5-4} = Rn{5-4};
802*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLDST1Instruction";
803*9880d681SAndroid Build Coastguard Worker  }
804*9880d681SAndroid Build Coastguard Worker}
805*9880d681SAndroid Build Coastguard Worker
806*9880d681SAndroid Build Coastguard Workerdef VLD1d8Q      : VLD1D4<{0,0,?,?}, "8",  addrmode6align64or128or256>;
807*9880d681SAndroid Build Coastguard Workerdef VLD1d16Q     : VLD1D4<{0,1,?,?}, "16", addrmode6align64or128or256>;
808*9880d681SAndroid Build Coastguard Workerdef VLD1d32Q     : VLD1D4<{1,0,?,?}, "32", addrmode6align64or128or256>;
809*9880d681SAndroid Build Coastguard Workerdef VLD1d64Q     : VLD1D4<{1,1,?,?}, "64", addrmode6align64or128or256>;
810*9880d681SAndroid Build Coastguard Worker
811*9880d681SAndroid Build Coastguard Workerdefm VLD1d8Qwb   : VLD1D4WB<{0,0,?,?}, "8",  addrmode6align64or128or256>;
812*9880d681SAndroid Build Coastguard Workerdefm VLD1d16Qwb  : VLD1D4WB<{0,1,?,?}, "16", addrmode6align64or128or256>;
813*9880d681SAndroid Build Coastguard Workerdefm VLD1d32Qwb  : VLD1D4WB<{1,0,?,?}, "32", addrmode6align64or128or256>;
814*9880d681SAndroid Build Coastguard Workerdefm VLD1d64Qwb  : VLD1D4WB<{1,1,?,?}, "64", addrmode6align64or128or256>;
815*9880d681SAndroid Build Coastguard Worker
816*9880d681SAndroid Build Coastguard Workerdef VLD1d64QPseudo : VLDQQPseudo<IIC_VLD1x4>;
817*9880d681SAndroid Build Coastguard Workerdef VLD1d64QPseudoWB_fixed : VLDQQWBfixedPseudo<IIC_VLD1x4>;
818*9880d681SAndroid Build Coastguard Workerdef VLD1d64QPseudoWB_register : VLDQQWBregisterPseudo<IIC_VLD1x4>;
819*9880d681SAndroid Build Coastguard Worker
820*9880d681SAndroid Build Coastguard Worker//   VLD2     : Vector Load (multiple 2-element structures)
821*9880d681SAndroid Build Coastguard Workerclass VLD2<bits<4> op11_8, bits<4> op7_4, string Dt, RegisterOperand VdTy,
822*9880d681SAndroid Build Coastguard Worker           InstrItinClass itin, Operand AddrMode>
823*9880d681SAndroid Build Coastguard Worker  : NLdSt<0, 0b10, op11_8, op7_4, (outs VdTy:$Vd),
824*9880d681SAndroid Build Coastguard Worker          (ins AddrMode:$Rn), itin,
825*9880d681SAndroid Build Coastguard Worker          "vld2", Dt, "$Vd, $Rn", "", []> {
826*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
827*9880d681SAndroid Build Coastguard Worker  let Inst{5-4} = Rn{5-4};
828*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLDST2Instruction";
829*9880d681SAndroid Build Coastguard Worker}
830*9880d681SAndroid Build Coastguard Worker
831*9880d681SAndroid Build Coastguard Workerdef  VLD2d8   : VLD2<0b1000, {0,0,?,?}, "8", VecListDPair, IIC_VLD2,
832*9880d681SAndroid Build Coastguard Worker                     addrmode6align64or128>;
833*9880d681SAndroid Build Coastguard Workerdef  VLD2d16  : VLD2<0b1000, {0,1,?,?}, "16", VecListDPair, IIC_VLD2,
834*9880d681SAndroid Build Coastguard Worker                     addrmode6align64or128>;
835*9880d681SAndroid Build Coastguard Workerdef  VLD2d32  : VLD2<0b1000, {1,0,?,?}, "32", VecListDPair, IIC_VLD2,
836*9880d681SAndroid Build Coastguard Worker                     addrmode6align64or128>;
837*9880d681SAndroid Build Coastguard Worker
838*9880d681SAndroid Build Coastguard Workerdef  VLD2q8   : VLD2<0b0011, {0,0,?,?}, "8", VecListFourD, IIC_VLD2x2,
839*9880d681SAndroid Build Coastguard Worker                     addrmode6align64or128or256>;
840*9880d681SAndroid Build Coastguard Workerdef  VLD2q16  : VLD2<0b0011, {0,1,?,?}, "16", VecListFourD, IIC_VLD2x2,
841*9880d681SAndroid Build Coastguard Worker                     addrmode6align64or128or256>;
842*9880d681SAndroid Build Coastguard Workerdef  VLD2q32  : VLD2<0b0011, {1,0,?,?}, "32", VecListFourD, IIC_VLD2x2,
843*9880d681SAndroid Build Coastguard Worker                     addrmode6align64or128or256>;
844*9880d681SAndroid Build Coastguard Worker
845*9880d681SAndroid Build Coastguard Workerdef  VLD2q8Pseudo  : VLDQQPseudo<IIC_VLD2x2>;
846*9880d681SAndroid Build Coastguard Workerdef  VLD2q16Pseudo : VLDQQPseudo<IIC_VLD2x2>;
847*9880d681SAndroid Build Coastguard Workerdef  VLD2q32Pseudo : VLDQQPseudo<IIC_VLD2x2>;
848*9880d681SAndroid Build Coastguard Worker
849*9880d681SAndroid Build Coastguard Worker// ...with address register writeback:
850*9880d681SAndroid Build Coastguard Workermulticlass VLD2WB<bits<4> op11_8, bits<4> op7_4, string Dt,
851*9880d681SAndroid Build Coastguard Worker                  RegisterOperand VdTy, InstrItinClass itin, Operand AddrMode> {
852*9880d681SAndroid Build Coastguard Worker  def _fixed : NLdSt<0, 0b10, op11_8, op7_4, (outs VdTy:$Vd, GPR:$wb),
853*9880d681SAndroid Build Coastguard Worker                     (ins AddrMode:$Rn), itin,
854*9880d681SAndroid Build Coastguard Worker                     "vld2", Dt, "$Vd, $Rn!",
855*9880d681SAndroid Build Coastguard Worker                     "$Rn.addr = $wb", []> {
856*9880d681SAndroid Build Coastguard Worker    let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
857*9880d681SAndroid Build Coastguard Worker    let Inst{5-4} = Rn{5-4};
858*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLDST2Instruction";
859*9880d681SAndroid Build Coastguard Worker  }
860*9880d681SAndroid Build Coastguard Worker  def _register : NLdSt<0, 0b10, op11_8, op7_4, (outs VdTy:$Vd, GPR:$wb),
861*9880d681SAndroid Build Coastguard Worker                        (ins AddrMode:$Rn, rGPR:$Rm), itin,
862*9880d681SAndroid Build Coastguard Worker                        "vld2", Dt, "$Vd, $Rn, $Rm",
863*9880d681SAndroid Build Coastguard Worker                        "$Rn.addr = $wb", []> {
864*9880d681SAndroid Build Coastguard Worker    let Inst{5-4} = Rn{5-4};
865*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLDST2Instruction";
866*9880d681SAndroid Build Coastguard Worker  }
867*9880d681SAndroid Build Coastguard Worker}
868*9880d681SAndroid Build Coastguard Worker
869*9880d681SAndroid Build Coastguard Workerdefm VLD2d8wb  : VLD2WB<0b1000, {0,0,?,?}, "8", VecListDPair, IIC_VLD2u,
870*9880d681SAndroid Build Coastguard Worker                        addrmode6align64or128>;
871*9880d681SAndroid Build Coastguard Workerdefm VLD2d16wb : VLD2WB<0b1000, {0,1,?,?}, "16", VecListDPair, IIC_VLD2u,
872*9880d681SAndroid Build Coastguard Worker                        addrmode6align64or128>;
873*9880d681SAndroid Build Coastguard Workerdefm VLD2d32wb : VLD2WB<0b1000, {1,0,?,?}, "32", VecListDPair, IIC_VLD2u,
874*9880d681SAndroid Build Coastguard Worker                        addrmode6align64or128>;
875*9880d681SAndroid Build Coastguard Worker
876*9880d681SAndroid Build Coastguard Workerdefm VLD2q8wb  : VLD2WB<0b0011, {0,0,?,?}, "8", VecListFourD, IIC_VLD2x2u,
877*9880d681SAndroid Build Coastguard Worker                        addrmode6align64or128or256>;
878*9880d681SAndroid Build Coastguard Workerdefm VLD2q16wb : VLD2WB<0b0011, {0,1,?,?}, "16", VecListFourD, IIC_VLD2x2u,
879*9880d681SAndroid Build Coastguard Worker                        addrmode6align64or128or256>;
880*9880d681SAndroid Build Coastguard Workerdefm VLD2q32wb : VLD2WB<0b0011, {1,0,?,?}, "32", VecListFourD, IIC_VLD2x2u,
881*9880d681SAndroid Build Coastguard Worker                        addrmode6align64or128or256>;
882*9880d681SAndroid Build Coastguard Worker
883*9880d681SAndroid Build Coastguard Workerdef VLD2q8PseudoWB_fixed     : VLDQQWBfixedPseudo<IIC_VLD2x2u>;
884*9880d681SAndroid Build Coastguard Workerdef VLD2q16PseudoWB_fixed    : VLDQQWBfixedPseudo<IIC_VLD2x2u>;
885*9880d681SAndroid Build Coastguard Workerdef VLD2q32PseudoWB_fixed    : VLDQQWBfixedPseudo<IIC_VLD2x2u>;
886*9880d681SAndroid Build Coastguard Workerdef VLD2q8PseudoWB_register  : VLDQQWBregisterPseudo<IIC_VLD2x2u>;
887*9880d681SAndroid Build Coastguard Workerdef VLD2q16PseudoWB_register : VLDQQWBregisterPseudo<IIC_VLD2x2u>;
888*9880d681SAndroid Build Coastguard Workerdef VLD2q32PseudoWB_register : VLDQQWBregisterPseudo<IIC_VLD2x2u>;
889*9880d681SAndroid Build Coastguard Worker
890*9880d681SAndroid Build Coastguard Worker// ...with double-spaced registers
891*9880d681SAndroid Build Coastguard Workerdef  VLD2b8    : VLD2<0b1001, {0,0,?,?}, "8", VecListDPairSpaced, IIC_VLD2,
892*9880d681SAndroid Build Coastguard Worker                      addrmode6align64or128>;
893*9880d681SAndroid Build Coastguard Workerdef  VLD2b16   : VLD2<0b1001, {0,1,?,?}, "16", VecListDPairSpaced, IIC_VLD2,
894*9880d681SAndroid Build Coastguard Worker                      addrmode6align64or128>;
895*9880d681SAndroid Build Coastguard Workerdef  VLD2b32   : VLD2<0b1001, {1,0,?,?}, "32", VecListDPairSpaced, IIC_VLD2,
896*9880d681SAndroid Build Coastguard Worker                      addrmode6align64or128>;
897*9880d681SAndroid Build Coastguard Workerdefm VLD2b8wb  : VLD2WB<0b1001, {0,0,?,?}, "8", VecListDPairSpaced, IIC_VLD2u,
898*9880d681SAndroid Build Coastguard Worker                        addrmode6align64or128>;
899*9880d681SAndroid Build Coastguard Workerdefm VLD2b16wb : VLD2WB<0b1001, {0,1,?,?}, "16", VecListDPairSpaced, IIC_VLD2u,
900*9880d681SAndroid Build Coastguard Worker                        addrmode6align64or128>;
901*9880d681SAndroid Build Coastguard Workerdefm VLD2b32wb : VLD2WB<0b1001, {1,0,?,?}, "32", VecListDPairSpaced, IIC_VLD2u,
902*9880d681SAndroid Build Coastguard Worker                        addrmode6align64or128>;
903*9880d681SAndroid Build Coastguard Worker
904*9880d681SAndroid Build Coastguard Worker//   VLD3     : Vector Load (multiple 3-element structures)
905*9880d681SAndroid Build Coastguard Workerclass VLD3D<bits<4> op11_8, bits<4> op7_4, string Dt>
906*9880d681SAndroid Build Coastguard Worker  : NLdSt<0, 0b10, op11_8, op7_4, (outs DPR:$Vd, DPR:$dst2, DPR:$dst3),
907*9880d681SAndroid Build Coastguard Worker          (ins addrmode6:$Rn), IIC_VLD3,
908*9880d681SAndroid Build Coastguard Worker          "vld3", Dt, "\\{$Vd, $dst2, $dst3\\}, $Rn", "", []> {
909*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
910*9880d681SAndroid Build Coastguard Worker  let Inst{4} = Rn{4};
911*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLDST3Instruction";
912*9880d681SAndroid Build Coastguard Worker}
913*9880d681SAndroid Build Coastguard Worker
914*9880d681SAndroid Build Coastguard Workerdef  VLD3d8   : VLD3D<0b0100, {0,0,0,?}, "8">;
915*9880d681SAndroid Build Coastguard Workerdef  VLD3d16  : VLD3D<0b0100, {0,1,0,?}, "16">;
916*9880d681SAndroid Build Coastguard Workerdef  VLD3d32  : VLD3D<0b0100, {1,0,0,?}, "32">;
917*9880d681SAndroid Build Coastguard Worker
918*9880d681SAndroid Build Coastguard Workerdef  VLD3d8Pseudo  : VLDQQPseudo<IIC_VLD3>;
919*9880d681SAndroid Build Coastguard Workerdef  VLD3d16Pseudo : VLDQQPseudo<IIC_VLD3>;
920*9880d681SAndroid Build Coastguard Workerdef  VLD3d32Pseudo : VLDQQPseudo<IIC_VLD3>;
921*9880d681SAndroid Build Coastguard Worker
922*9880d681SAndroid Build Coastguard Worker// ...with address register writeback:
923*9880d681SAndroid Build Coastguard Workerclass VLD3DWB<bits<4> op11_8, bits<4> op7_4, string Dt>
924*9880d681SAndroid Build Coastguard Worker  : NLdSt<0, 0b10, op11_8, op7_4,
925*9880d681SAndroid Build Coastguard Worker          (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, GPR:$wb),
926*9880d681SAndroid Build Coastguard Worker          (ins addrmode6:$Rn, am6offset:$Rm), IIC_VLD3u,
927*9880d681SAndroid Build Coastguard Worker          "vld3", Dt, "\\{$Vd, $dst2, $dst3\\}, $Rn$Rm",
928*9880d681SAndroid Build Coastguard Worker          "$Rn.addr = $wb", []> {
929*9880d681SAndroid Build Coastguard Worker  let Inst{4} = Rn{4};
930*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLDST3Instruction";
931*9880d681SAndroid Build Coastguard Worker}
932*9880d681SAndroid Build Coastguard Worker
933*9880d681SAndroid Build Coastguard Workerdef VLD3d8_UPD  : VLD3DWB<0b0100, {0,0,0,?}, "8">;
934*9880d681SAndroid Build Coastguard Workerdef VLD3d16_UPD : VLD3DWB<0b0100, {0,1,0,?}, "16">;
935*9880d681SAndroid Build Coastguard Workerdef VLD3d32_UPD : VLD3DWB<0b0100, {1,0,0,?}, "32">;
936*9880d681SAndroid Build Coastguard Worker
937*9880d681SAndroid Build Coastguard Workerdef VLD3d8Pseudo_UPD  : VLDQQWBPseudo<IIC_VLD3u>;
938*9880d681SAndroid Build Coastguard Workerdef VLD3d16Pseudo_UPD : VLDQQWBPseudo<IIC_VLD3u>;
939*9880d681SAndroid Build Coastguard Workerdef VLD3d32Pseudo_UPD : VLDQQWBPseudo<IIC_VLD3u>;
940*9880d681SAndroid Build Coastguard Worker
941*9880d681SAndroid Build Coastguard Worker// ...with double-spaced registers:
942*9880d681SAndroid Build Coastguard Workerdef VLD3q8      : VLD3D<0b0101, {0,0,0,?}, "8">;
943*9880d681SAndroid Build Coastguard Workerdef VLD3q16     : VLD3D<0b0101, {0,1,0,?}, "16">;
944*9880d681SAndroid Build Coastguard Workerdef VLD3q32     : VLD3D<0b0101, {1,0,0,?}, "32">;
945*9880d681SAndroid Build Coastguard Workerdef VLD3q8_UPD  : VLD3DWB<0b0101, {0,0,0,?}, "8">;
946*9880d681SAndroid Build Coastguard Workerdef VLD3q16_UPD : VLD3DWB<0b0101, {0,1,0,?}, "16">;
947*9880d681SAndroid Build Coastguard Workerdef VLD3q32_UPD : VLD3DWB<0b0101, {1,0,0,?}, "32">;
948*9880d681SAndroid Build Coastguard Worker
949*9880d681SAndroid Build Coastguard Workerdef VLD3q8Pseudo_UPD  : VLDQQQQWBPseudo<IIC_VLD3u>;
950*9880d681SAndroid Build Coastguard Workerdef VLD3q16Pseudo_UPD : VLDQQQQWBPseudo<IIC_VLD3u>;
951*9880d681SAndroid Build Coastguard Workerdef VLD3q32Pseudo_UPD : VLDQQQQWBPseudo<IIC_VLD3u>;
952*9880d681SAndroid Build Coastguard Worker
953*9880d681SAndroid Build Coastguard Worker// ...alternate versions to be allocated odd register numbers:
954*9880d681SAndroid Build Coastguard Workerdef VLD3q8oddPseudo   : VLDQQQQPseudo<IIC_VLD3>;
955*9880d681SAndroid Build Coastguard Workerdef VLD3q16oddPseudo  : VLDQQQQPseudo<IIC_VLD3>;
956*9880d681SAndroid Build Coastguard Workerdef VLD3q32oddPseudo  : VLDQQQQPseudo<IIC_VLD3>;
957*9880d681SAndroid Build Coastguard Worker
958*9880d681SAndroid Build Coastguard Workerdef VLD3q8oddPseudo_UPD  : VLDQQQQWBPseudo<IIC_VLD3u>;
959*9880d681SAndroid Build Coastguard Workerdef VLD3q16oddPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD3u>;
960*9880d681SAndroid Build Coastguard Workerdef VLD3q32oddPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD3u>;
961*9880d681SAndroid Build Coastguard Worker
962*9880d681SAndroid Build Coastguard Worker//   VLD4     : Vector Load (multiple 4-element structures)
963*9880d681SAndroid Build Coastguard Workerclass VLD4D<bits<4> op11_8, bits<4> op7_4, string Dt>
964*9880d681SAndroid Build Coastguard Worker  : NLdSt<0, 0b10, op11_8, op7_4,
965*9880d681SAndroid Build Coastguard Worker          (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, DPR:$dst4),
966*9880d681SAndroid Build Coastguard Worker          (ins addrmode6:$Rn), IIC_VLD4,
967*9880d681SAndroid Build Coastguard Worker          "vld4", Dt, "\\{$Vd, $dst2, $dst3, $dst4\\}, $Rn", "", []> {
968*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
969*9880d681SAndroid Build Coastguard Worker  let Inst{5-4} = Rn{5-4};
970*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLDST4Instruction";
971*9880d681SAndroid Build Coastguard Worker}
972*9880d681SAndroid Build Coastguard Worker
973*9880d681SAndroid Build Coastguard Workerdef  VLD4d8   : VLD4D<0b0000, {0,0,?,?}, "8">;
974*9880d681SAndroid Build Coastguard Workerdef  VLD4d16  : VLD4D<0b0000, {0,1,?,?}, "16">;
975*9880d681SAndroid Build Coastguard Workerdef  VLD4d32  : VLD4D<0b0000, {1,0,?,?}, "32">;
976*9880d681SAndroid Build Coastguard Worker
977*9880d681SAndroid Build Coastguard Workerdef  VLD4d8Pseudo  : VLDQQPseudo<IIC_VLD4>;
978*9880d681SAndroid Build Coastguard Workerdef  VLD4d16Pseudo : VLDQQPseudo<IIC_VLD4>;
979*9880d681SAndroid Build Coastguard Workerdef  VLD4d32Pseudo : VLDQQPseudo<IIC_VLD4>;
980*9880d681SAndroid Build Coastguard Worker
981*9880d681SAndroid Build Coastguard Worker// ...with address register writeback:
982*9880d681SAndroid Build Coastguard Workerclass VLD4DWB<bits<4> op11_8, bits<4> op7_4, string Dt>
983*9880d681SAndroid Build Coastguard Worker  : NLdSt<0, 0b10, op11_8, op7_4,
984*9880d681SAndroid Build Coastguard Worker          (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, DPR:$dst4, GPR:$wb),
985*9880d681SAndroid Build Coastguard Worker          (ins addrmode6:$Rn, am6offset:$Rm), IIC_VLD4u,
986*9880d681SAndroid Build Coastguard Worker          "vld4", Dt, "\\{$Vd, $dst2, $dst3, $dst4\\}, $Rn$Rm",
987*9880d681SAndroid Build Coastguard Worker          "$Rn.addr = $wb", []> {
988*9880d681SAndroid Build Coastguard Worker  let Inst{5-4} = Rn{5-4};
989*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLDST4Instruction";
990*9880d681SAndroid Build Coastguard Worker}
991*9880d681SAndroid Build Coastguard Worker
992*9880d681SAndroid Build Coastguard Workerdef VLD4d8_UPD  : VLD4DWB<0b0000, {0,0,?,?}, "8">;
993*9880d681SAndroid Build Coastguard Workerdef VLD4d16_UPD : VLD4DWB<0b0000, {0,1,?,?}, "16">;
994*9880d681SAndroid Build Coastguard Workerdef VLD4d32_UPD : VLD4DWB<0b0000, {1,0,?,?}, "32">;
995*9880d681SAndroid Build Coastguard Worker
996*9880d681SAndroid Build Coastguard Workerdef VLD4d8Pseudo_UPD  : VLDQQWBPseudo<IIC_VLD4u>;
997*9880d681SAndroid Build Coastguard Workerdef VLD4d16Pseudo_UPD : VLDQQWBPseudo<IIC_VLD4u>;
998*9880d681SAndroid Build Coastguard Workerdef VLD4d32Pseudo_UPD : VLDQQWBPseudo<IIC_VLD4u>;
999*9880d681SAndroid Build Coastguard Worker
1000*9880d681SAndroid Build Coastguard Worker// ...with double-spaced registers:
1001*9880d681SAndroid Build Coastguard Workerdef VLD4q8      : VLD4D<0b0001, {0,0,?,?}, "8">;
1002*9880d681SAndroid Build Coastguard Workerdef VLD4q16     : VLD4D<0b0001, {0,1,?,?}, "16">;
1003*9880d681SAndroid Build Coastguard Workerdef VLD4q32     : VLD4D<0b0001, {1,0,?,?}, "32">;
1004*9880d681SAndroid Build Coastguard Workerdef VLD4q8_UPD  : VLD4DWB<0b0001, {0,0,?,?}, "8">;
1005*9880d681SAndroid Build Coastguard Workerdef VLD4q16_UPD : VLD4DWB<0b0001, {0,1,?,?}, "16">;
1006*9880d681SAndroid Build Coastguard Workerdef VLD4q32_UPD : VLD4DWB<0b0001, {1,0,?,?}, "32">;
1007*9880d681SAndroid Build Coastguard Worker
1008*9880d681SAndroid Build Coastguard Workerdef VLD4q8Pseudo_UPD  : VLDQQQQWBPseudo<IIC_VLD4u>;
1009*9880d681SAndroid Build Coastguard Workerdef VLD4q16Pseudo_UPD : VLDQQQQWBPseudo<IIC_VLD4u>;
1010*9880d681SAndroid Build Coastguard Workerdef VLD4q32Pseudo_UPD : VLDQQQQWBPseudo<IIC_VLD4u>;
1011*9880d681SAndroid Build Coastguard Worker
1012*9880d681SAndroid Build Coastguard Worker// ...alternate versions to be allocated odd register numbers:
1013*9880d681SAndroid Build Coastguard Workerdef VLD4q8oddPseudo   : VLDQQQQPseudo<IIC_VLD4>;
1014*9880d681SAndroid Build Coastguard Workerdef VLD4q16oddPseudo  : VLDQQQQPseudo<IIC_VLD4>;
1015*9880d681SAndroid Build Coastguard Workerdef VLD4q32oddPseudo  : VLDQQQQPseudo<IIC_VLD4>;
1016*9880d681SAndroid Build Coastguard Worker
1017*9880d681SAndroid Build Coastguard Workerdef VLD4q8oddPseudo_UPD  : VLDQQQQWBPseudo<IIC_VLD4u>;
1018*9880d681SAndroid Build Coastguard Workerdef VLD4q16oddPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD4u>;
1019*9880d681SAndroid Build Coastguard Workerdef VLD4q32oddPseudo_UPD : VLDQQQQWBPseudo<IIC_VLD4u>;
1020*9880d681SAndroid Build Coastguard Worker
1021*9880d681SAndroid Build Coastguard Worker} // mayLoad = 1, hasSideEffects = 0, hasExtraDefRegAllocReq = 1
1022*9880d681SAndroid Build Coastguard Worker
1023*9880d681SAndroid Build Coastguard Worker// Classes for VLD*LN pseudo-instructions with multi-register operands.
1024*9880d681SAndroid Build Coastguard Worker// These are expanded to real instructions after register allocation.
1025*9880d681SAndroid Build Coastguard Workerclass VLDQLNPseudo<InstrItinClass itin>
1026*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs QPR:$dst),
1027*9880d681SAndroid Build Coastguard Worker                (ins addrmode6:$addr, QPR:$src, nohash_imm:$lane),
1028*9880d681SAndroid Build Coastguard Worker                itin, "$src = $dst">;
1029*9880d681SAndroid Build Coastguard Workerclass VLDQLNWBPseudo<InstrItinClass itin>
1030*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs QPR:$dst, GPR:$wb),
1031*9880d681SAndroid Build Coastguard Worker                (ins addrmode6:$addr, am6offset:$offset, QPR:$src,
1032*9880d681SAndroid Build Coastguard Worker                 nohash_imm:$lane), itin, "$addr.addr = $wb, $src = $dst">;
1033*9880d681SAndroid Build Coastguard Workerclass VLDQQLNPseudo<InstrItinClass itin>
1034*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs QQPR:$dst),
1035*9880d681SAndroid Build Coastguard Worker                (ins addrmode6:$addr, QQPR:$src, nohash_imm:$lane),
1036*9880d681SAndroid Build Coastguard Worker                itin, "$src = $dst">;
1037*9880d681SAndroid Build Coastguard Workerclass VLDQQLNWBPseudo<InstrItinClass itin>
1038*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs QQPR:$dst, GPR:$wb),
1039*9880d681SAndroid Build Coastguard Worker                (ins addrmode6:$addr, am6offset:$offset, QQPR:$src,
1040*9880d681SAndroid Build Coastguard Worker                 nohash_imm:$lane), itin, "$addr.addr = $wb, $src = $dst">;
1041*9880d681SAndroid Build Coastguard Workerclass VLDQQQQLNPseudo<InstrItinClass itin>
1042*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs QQQQPR:$dst),
1043*9880d681SAndroid Build Coastguard Worker                (ins addrmode6:$addr, QQQQPR:$src, nohash_imm:$lane),
1044*9880d681SAndroid Build Coastguard Worker                itin, "$src = $dst">;
1045*9880d681SAndroid Build Coastguard Workerclass VLDQQQQLNWBPseudo<InstrItinClass itin>
1046*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs QQQQPR:$dst, GPR:$wb),
1047*9880d681SAndroid Build Coastguard Worker                (ins addrmode6:$addr, am6offset:$offset, QQQQPR:$src,
1048*9880d681SAndroid Build Coastguard Worker                 nohash_imm:$lane), itin, "$addr.addr = $wb, $src = $dst">;
1049*9880d681SAndroid Build Coastguard Worker
1050*9880d681SAndroid Build Coastguard Worker//   VLD1LN   : Vector Load (single element to one lane)
1051*9880d681SAndroid Build Coastguard Workerclass VLD1LN<bits<4> op11_8, bits<4> op7_4, string Dt, ValueType Ty,
1052*9880d681SAndroid Build Coastguard Worker             PatFrag LoadOp>
1053*9880d681SAndroid Build Coastguard Worker  : NLdStLn<1, 0b10, op11_8, op7_4, (outs DPR:$Vd),
1054*9880d681SAndroid Build Coastguard Worker          (ins addrmode6:$Rn, DPR:$src, nohash_imm:$lane),
1055*9880d681SAndroid Build Coastguard Worker          IIC_VLD1ln, "vld1", Dt, "\\{$Vd[$lane]\\}, $Rn",
1056*9880d681SAndroid Build Coastguard Worker          "$src = $Vd",
1057*9880d681SAndroid Build Coastguard Worker          [(set DPR:$Vd, (vector_insert (Ty DPR:$src),
1058*9880d681SAndroid Build Coastguard Worker                                         (i32 (LoadOp addrmode6:$Rn)),
1059*9880d681SAndroid Build Coastguard Worker                                         imm:$lane))]> {
1060*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
1061*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLD1LN";
1062*9880d681SAndroid Build Coastguard Worker}
1063*9880d681SAndroid Build Coastguard Workerclass VLD1LN32<bits<4> op11_8, bits<4> op7_4, string Dt, ValueType Ty,
1064*9880d681SAndroid Build Coastguard Worker             PatFrag LoadOp>
1065*9880d681SAndroid Build Coastguard Worker  : NLdStLn<1, 0b10, op11_8, op7_4, (outs DPR:$Vd),
1066*9880d681SAndroid Build Coastguard Worker          (ins addrmode6oneL32:$Rn, DPR:$src, nohash_imm:$lane),
1067*9880d681SAndroid Build Coastguard Worker          IIC_VLD1ln, "vld1", Dt, "\\{$Vd[$lane]\\}, $Rn",
1068*9880d681SAndroid Build Coastguard Worker          "$src = $Vd",
1069*9880d681SAndroid Build Coastguard Worker          [(set DPR:$Vd, (vector_insert (Ty DPR:$src),
1070*9880d681SAndroid Build Coastguard Worker                                         (i32 (LoadOp addrmode6oneL32:$Rn)),
1071*9880d681SAndroid Build Coastguard Worker                                         imm:$lane))]> {
1072*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
1073*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLD1LN";
1074*9880d681SAndroid Build Coastguard Worker}
1075*9880d681SAndroid Build Coastguard Workerclass VLD1QLNPseudo<ValueType Ty, PatFrag LoadOp> : VLDQLNPseudo<IIC_VLD1ln> {
1076*9880d681SAndroid Build Coastguard Worker  let Pattern = [(set QPR:$dst, (vector_insert (Ty QPR:$src),
1077*9880d681SAndroid Build Coastguard Worker                                               (i32 (LoadOp addrmode6:$addr)),
1078*9880d681SAndroid Build Coastguard Worker                                               imm:$lane))];
1079*9880d681SAndroid Build Coastguard Worker}
1080*9880d681SAndroid Build Coastguard Worker
1081*9880d681SAndroid Build Coastguard Workerdef VLD1LNd8  : VLD1LN<0b0000, {?,?,?,0}, "8", v8i8, extloadi8> {
1082*9880d681SAndroid Build Coastguard Worker  let Inst{7-5} = lane{2-0};
1083*9880d681SAndroid Build Coastguard Worker}
1084*9880d681SAndroid Build Coastguard Workerdef VLD1LNd16 : VLD1LN<0b0100, {?,?,0,?}, "16", v4i16, extloadi16> {
1085*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
1086*9880d681SAndroid Build Coastguard Worker  let Inst{5-4} = Rn{5-4};
1087*9880d681SAndroid Build Coastguard Worker}
1088*9880d681SAndroid Build Coastguard Workerdef VLD1LNd32 : VLD1LN32<0b1000, {?,0,?,?}, "32", v2i32, load> {
1089*9880d681SAndroid Build Coastguard Worker  let Inst{7} = lane{0};
1090*9880d681SAndroid Build Coastguard Worker  let Inst{5-4} = Rn{5-4};
1091*9880d681SAndroid Build Coastguard Worker}
1092*9880d681SAndroid Build Coastguard Worker
1093*9880d681SAndroid Build Coastguard Workerdef VLD1LNq8Pseudo  : VLD1QLNPseudo<v16i8, extloadi8>;
1094*9880d681SAndroid Build Coastguard Workerdef VLD1LNq16Pseudo : VLD1QLNPseudo<v8i16, extloadi16>;
1095*9880d681SAndroid Build Coastguard Workerdef VLD1LNq32Pseudo : VLD1QLNPseudo<v4i32, load>;
1096*9880d681SAndroid Build Coastguard Worker
1097*9880d681SAndroid Build Coastguard Workerdef : Pat<(vector_insert (v2f32 DPR:$src),
1098*9880d681SAndroid Build Coastguard Worker                         (f32 (load addrmode6:$addr)), imm:$lane),
1099*9880d681SAndroid Build Coastguard Worker          (VLD1LNd32 addrmode6:$addr, DPR:$src, imm:$lane)>;
1100*9880d681SAndroid Build Coastguard Workerdef : Pat<(vector_insert (v4f32 QPR:$src),
1101*9880d681SAndroid Build Coastguard Worker                         (f32 (load addrmode6:$addr)), imm:$lane),
1102*9880d681SAndroid Build Coastguard Worker          (VLD1LNq32Pseudo addrmode6:$addr, QPR:$src, imm:$lane)>;
1103*9880d681SAndroid Build Coastguard Worker
1104*9880d681SAndroid Build Coastguard Workerlet mayLoad = 1, hasSideEffects = 0, hasExtraDefRegAllocReq = 1 in {
1105*9880d681SAndroid Build Coastguard Worker
1106*9880d681SAndroid Build Coastguard Worker// ...with address register writeback:
1107*9880d681SAndroid Build Coastguard Workerclass VLD1LNWB<bits<4> op11_8, bits<4> op7_4, string Dt>
1108*9880d681SAndroid Build Coastguard Worker  : NLdStLn<1, 0b10, op11_8, op7_4, (outs DPR:$Vd, GPR:$wb),
1109*9880d681SAndroid Build Coastguard Worker          (ins addrmode6:$Rn, am6offset:$Rm,
1110*9880d681SAndroid Build Coastguard Worker           DPR:$src, nohash_imm:$lane), IIC_VLD1lnu, "vld1", Dt,
1111*9880d681SAndroid Build Coastguard Worker          "\\{$Vd[$lane]\\}, $Rn$Rm",
1112*9880d681SAndroid Build Coastguard Worker          "$src = $Vd, $Rn.addr = $wb", []> {
1113*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLD1LN";
1114*9880d681SAndroid Build Coastguard Worker}
1115*9880d681SAndroid Build Coastguard Worker
1116*9880d681SAndroid Build Coastguard Workerdef VLD1LNd8_UPD  : VLD1LNWB<0b0000, {?,?,?,0}, "8"> {
1117*9880d681SAndroid Build Coastguard Worker  let Inst{7-5} = lane{2-0};
1118*9880d681SAndroid Build Coastguard Worker}
1119*9880d681SAndroid Build Coastguard Workerdef VLD1LNd16_UPD : VLD1LNWB<0b0100, {?,?,0,?}, "16"> {
1120*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
1121*9880d681SAndroid Build Coastguard Worker  let Inst{4}   = Rn{4};
1122*9880d681SAndroid Build Coastguard Worker}
1123*9880d681SAndroid Build Coastguard Workerdef VLD1LNd32_UPD : VLD1LNWB<0b1000, {?,0,?,?}, "32"> {
1124*9880d681SAndroid Build Coastguard Worker  let Inst{7} = lane{0};
1125*9880d681SAndroid Build Coastguard Worker  let Inst{5} = Rn{4};
1126*9880d681SAndroid Build Coastguard Worker  let Inst{4} = Rn{4};
1127*9880d681SAndroid Build Coastguard Worker}
1128*9880d681SAndroid Build Coastguard Worker
1129*9880d681SAndroid Build Coastguard Workerdef VLD1LNq8Pseudo_UPD  : VLDQLNWBPseudo<IIC_VLD1lnu>;
1130*9880d681SAndroid Build Coastguard Workerdef VLD1LNq16Pseudo_UPD : VLDQLNWBPseudo<IIC_VLD1lnu>;
1131*9880d681SAndroid Build Coastguard Workerdef VLD1LNq32Pseudo_UPD : VLDQLNWBPseudo<IIC_VLD1lnu>;
1132*9880d681SAndroid Build Coastguard Worker
1133*9880d681SAndroid Build Coastguard Worker//   VLD2LN   : Vector Load (single 2-element structure to one lane)
1134*9880d681SAndroid Build Coastguard Workerclass VLD2LN<bits<4> op11_8, bits<4> op7_4, string Dt>
1135*9880d681SAndroid Build Coastguard Worker  : NLdStLn<1, 0b10, op11_8, op7_4, (outs DPR:$Vd, DPR:$dst2),
1136*9880d681SAndroid Build Coastguard Worker          (ins addrmode6:$Rn, DPR:$src1, DPR:$src2, nohash_imm:$lane),
1137*9880d681SAndroid Build Coastguard Worker          IIC_VLD2ln, "vld2", Dt, "\\{$Vd[$lane], $dst2[$lane]\\}, $Rn",
1138*9880d681SAndroid Build Coastguard Worker          "$src1 = $Vd, $src2 = $dst2", []> {
1139*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
1140*9880d681SAndroid Build Coastguard Worker  let Inst{4}   = Rn{4};
1141*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLD2LN";
1142*9880d681SAndroid Build Coastguard Worker}
1143*9880d681SAndroid Build Coastguard Worker
1144*9880d681SAndroid Build Coastguard Workerdef VLD2LNd8  : VLD2LN<0b0001, {?,?,?,?}, "8"> {
1145*9880d681SAndroid Build Coastguard Worker  let Inst{7-5} = lane{2-0};
1146*9880d681SAndroid Build Coastguard Worker}
1147*9880d681SAndroid Build Coastguard Workerdef VLD2LNd16 : VLD2LN<0b0101, {?,?,0,?}, "16"> {
1148*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
1149*9880d681SAndroid Build Coastguard Worker}
1150*9880d681SAndroid Build Coastguard Workerdef VLD2LNd32 : VLD2LN<0b1001, {?,0,0,?}, "32"> {
1151*9880d681SAndroid Build Coastguard Worker  let Inst{7} = lane{0};
1152*9880d681SAndroid Build Coastguard Worker}
1153*9880d681SAndroid Build Coastguard Worker
1154*9880d681SAndroid Build Coastguard Workerdef VLD2LNd8Pseudo  : VLDQLNPseudo<IIC_VLD2ln>;
1155*9880d681SAndroid Build Coastguard Workerdef VLD2LNd16Pseudo : VLDQLNPseudo<IIC_VLD2ln>;
1156*9880d681SAndroid Build Coastguard Workerdef VLD2LNd32Pseudo : VLDQLNPseudo<IIC_VLD2ln>;
1157*9880d681SAndroid Build Coastguard Worker
1158*9880d681SAndroid Build Coastguard Worker// ...with double-spaced registers:
1159*9880d681SAndroid Build Coastguard Workerdef VLD2LNq16 : VLD2LN<0b0101, {?,?,1,?}, "16"> {
1160*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
1161*9880d681SAndroid Build Coastguard Worker}
1162*9880d681SAndroid Build Coastguard Workerdef VLD2LNq32 : VLD2LN<0b1001, {?,1,0,?}, "32"> {
1163*9880d681SAndroid Build Coastguard Worker  let Inst{7} = lane{0};
1164*9880d681SAndroid Build Coastguard Worker}
1165*9880d681SAndroid Build Coastguard Worker
1166*9880d681SAndroid Build Coastguard Workerdef VLD2LNq16Pseudo : VLDQQLNPseudo<IIC_VLD2ln>;
1167*9880d681SAndroid Build Coastguard Workerdef VLD2LNq32Pseudo : VLDQQLNPseudo<IIC_VLD2ln>;
1168*9880d681SAndroid Build Coastguard Worker
1169*9880d681SAndroid Build Coastguard Worker// ...with address register writeback:
1170*9880d681SAndroid Build Coastguard Workerclass VLD2LNWB<bits<4> op11_8, bits<4> op7_4, string Dt>
1171*9880d681SAndroid Build Coastguard Worker  : NLdStLn<1, 0b10, op11_8, op7_4, (outs DPR:$Vd, DPR:$dst2, GPR:$wb),
1172*9880d681SAndroid Build Coastguard Worker          (ins addrmode6:$Rn, am6offset:$Rm,
1173*9880d681SAndroid Build Coastguard Worker           DPR:$src1, DPR:$src2, nohash_imm:$lane), IIC_VLD2lnu, "vld2", Dt,
1174*9880d681SAndroid Build Coastguard Worker          "\\{$Vd[$lane], $dst2[$lane]\\}, $Rn$Rm",
1175*9880d681SAndroid Build Coastguard Worker          "$src1 = $Vd, $src2 = $dst2, $Rn.addr = $wb", []> {
1176*9880d681SAndroid Build Coastguard Worker  let Inst{4}   = Rn{4};
1177*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLD2LN";
1178*9880d681SAndroid Build Coastguard Worker}
1179*9880d681SAndroid Build Coastguard Worker
1180*9880d681SAndroid Build Coastguard Workerdef VLD2LNd8_UPD  : VLD2LNWB<0b0001, {?,?,?,?}, "8"> {
1181*9880d681SAndroid Build Coastguard Worker  let Inst{7-5} = lane{2-0};
1182*9880d681SAndroid Build Coastguard Worker}
1183*9880d681SAndroid Build Coastguard Workerdef VLD2LNd16_UPD : VLD2LNWB<0b0101, {?,?,0,?}, "16"> {
1184*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
1185*9880d681SAndroid Build Coastguard Worker}
1186*9880d681SAndroid Build Coastguard Workerdef VLD2LNd32_UPD : VLD2LNWB<0b1001, {?,0,0,?}, "32"> {
1187*9880d681SAndroid Build Coastguard Worker  let Inst{7} = lane{0};
1188*9880d681SAndroid Build Coastguard Worker}
1189*9880d681SAndroid Build Coastguard Worker
1190*9880d681SAndroid Build Coastguard Workerdef VLD2LNd8Pseudo_UPD  : VLDQLNWBPseudo<IIC_VLD2lnu>;
1191*9880d681SAndroid Build Coastguard Workerdef VLD2LNd16Pseudo_UPD : VLDQLNWBPseudo<IIC_VLD2lnu>;
1192*9880d681SAndroid Build Coastguard Workerdef VLD2LNd32Pseudo_UPD : VLDQLNWBPseudo<IIC_VLD2lnu>;
1193*9880d681SAndroid Build Coastguard Worker
1194*9880d681SAndroid Build Coastguard Workerdef VLD2LNq16_UPD : VLD2LNWB<0b0101, {?,?,1,?}, "16"> {
1195*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
1196*9880d681SAndroid Build Coastguard Worker}
1197*9880d681SAndroid Build Coastguard Workerdef VLD2LNq32_UPD : VLD2LNWB<0b1001, {?,1,0,?}, "32"> {
1198*9880d681SAndroid Build Coastguard Worker  let Inst{7} = lane{0};
1199*9880d681SAndroid Build Coastguard Worker}
1200*9880d681SAndroid Build Coastguard Worker
1201*9880d681SAndroid Build Coastguard Workerdef VLD2LNq16Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD2lnu>;
1202*9880d681SAndroid Build Coastguard Workerdef VLD2LNq32Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD2lnu>;
1203*9880d681SAndroid Build Coastguard Worker
1204*9880d681SAndroid Build Coastguard Worker//   VLD3LN   : Vector Load (single 3-element structure to one lane)
1205*9880d681SAndroid Build Coastguard Workerclass VLD3LN<bits<4> op11_8, bits<4> op7_4, string Dt>
1206*9880d681SAndroid Build Coastguard Worker  : NLdStLn<1, 0b10, op11_8, op7_4, (outs DPR:$Vd, DPR:$dst2, DPR:$dst3),
1207*9880d681SAndroid Build Coastguard Worker          (ins addrmode6:$Rn, DPR:$src1, DPR:$src2, DPR:$src3,
1208*9880d681SAndroid Build Coastguard Worker          nohash_imm:$lane), IIC_VLD3ln, "vld3", Dt,
1209*9880d681SAndroid Build Coastguard Worker          "\\{$Vd[$lane], $dst2[$lane], $dst3[$lane]\\}, $Rn",
1210*9880d681SAndroid Build Coastguard Worker          "$src1 = $Vd, $src2 = $dst2, $src3 = $dst3", []> {
1211*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
1212*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLD3LN";
1213*9880d681SAndroid Build Coastguard Worker}
1214*9880d681SAndroid Build Coastguard Worker
1215*9880d681SAndroid Build Coastguard Workerdef VLD3LNd8  : VLD3LN<0b0010, {?,?,?,0}, "8"> {
1216*9880d681SAndroid Build Coastguard Worker  let Inst{7-5} = lane{2-0};
1217*9880d681SAndroid Build Coastguard Worker}
1218*9880d681SAndroid Build Coastguard Workerdef VLD3LNd16 : VLD3LN<0b0110, {?,?,0,0}, "16"> {
1219*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
1220*9880d681SAndroid Build Coastguard Worker}
1221*9880d681SAndroid Build Coastguard Workerdef VLD3LNd32 : VLD3LN<0b1010, {?,0,0,0}, "32"> {
1222*9880d681SAndroid Build Coastguard Worker  let Inst{7}   = lane{0};
1223*9880d681SAndroid Build Coastguard Worker}
1224*9880d681SAndroid Build Coastguard Worker
1225*9880d681SAndroid Build Coastguard Workerdef VLD3LNd8Pseudo  : VLDQQLNPseudo<IIC_VLD3ln>;
1226*9880d681SAndroid Build Coastguard Workerdef VLD3LNd16Pseudo : VLDQQLNPseudo<IIC_VLD3ln>;
1227*9880d681SAndroid Build Coastguard Workerdef VLD3LNd32Pseudo : VLDQQLNPseudo<IIC_VLD3ln>;
1228*9880d681SAndroid Build Coastguard Worker
1229*9880d681SAndroid Build Coastguard Worker// ...with double-spaced registers:
1230*9880d681SAndroid Build Coastguard Workerdef VLD3LNq16 : VLD3LN<0b0110, {?,?,1,0}, "16"> {
1231*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
1232*9880d681SAndroid Build Coastguard Worker}
1233*9880d681SAndroid Build Coastguard Workerdef VLD3LNq32 : VLD3LN<0b1010, {?,1,0,0}, "32"> {
1234*9880d681SAndroid Build Coastguard Worker  let Inst{7}   = lane{0};
1235*9880d681SAndroid Build Coastguard Worker}
1236*9880d681SAndroid Build Coastguard Worker
1237*9880d681SAndroid Build Coastguard Workerdef VLD3LNq16Pseudo : VLDQQQQLNPseudo<IIC_VLD3ln>;
1238*9880d681SAndroid Build Coastguard Workerdef VLD3LNq32Pseudo : VLDQQQQLNPseudo<IIC_VLD3ln>;
1239*9880d681SAndroid Build Coastguard Worker
1240*9880d681SAndroid Build Coastguard Worker// ...with address register writeback:
1241*9880d681SAndroid Build Coastguard Workerclass VLD3LNWB<bits<4> op11_8, bits<4> op7_4, string Dt>
1242*9880d681SAndroid Build Coastguard Worker  : NLdStLn<1, 0b10, op11_8, op7_4,
1243*9880d681SAndroid Build Coastguard Worker          (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, GPR:$wb),
1244*9880d681SAndroid Build Coastguard Worker          (ins addrmode6:$Rn, am6offset:$Rm,
1245*9880d681SAndroid Build Coastguard Worker           DPR:$src1, DPR:$src2, DPR:$src3, nohash_imm:$lane),
1246*9880d681SAndroid Build Coastguard Worker          IIC_VLD3lnu, "vld3", Dt,
1247*9880d681SAndroid Build Coastguard Worker          "\\{$Vd[$lane], $dst2[$lane], $dst3[$lane]\\}, $Rn$Rm",
1248*9880d681SAndroid Build Coastguard Worker          "$src1 = $Vd, $src2 = $dst2, $src3 = $dst3, $Rn.addr = $wb",
1249*9880d681SAndroid Build Coastguard Worker          []> {
1250*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLD3LN";
1251*9880d681SAndroid Build Coastguard Worker}
1252*9880d681SAndroid Build Coastguard Worker
1253*9880d681SAndroid Build Coastguard Workerdef VLD3LNd8_UPD  : VLD3LNWB<0b0010, {?,?,?,0}, "8"> {
1254*9880d681SAndroid Build Coastguard Worker  let Inst{7-5} = lane{2-0};
1255*9880d681SAndroid Build Coastguard Worker}
1256*9880d681SAndroid Build Coastguard Workerdef VLD3LNd16_UPD : VLD3LNWB<0b0110, {?,?,0,0}, "16"> {
1257*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
1258*9880d681SAndroid Build Coastguard Worker}
1259*9880d681SAndroid Build Coastguard Workerdef VLD3LNd32_UPD : VLD3LNWB<0b1010, {?,0,0,0}, "32"> {
1260*9880d681SAndroid Build Coastguard Worker  let Inst{7} = lane{0};
1261*9880d681SAndroid Build Coastguard Worker}
1262*9880d681SAndroid Build Coastguard Worker
1263*9880d681SAndroid Build Coastguard Workerdef VLD3LNd8Pseudo_UPD  : VLDQQLNWBPseudo<IIC_VLD3lnu>;
1264*9880d681SAndroid Build Coastguard Workerdef VLD3LNd16Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD3lnu>;
1265*9880d681SAndroid Build Coastguard Workerdef VLD3LNd32Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD3lnu>;
1266*9880d681SAndroid Build Coastguard Worker
1267*9880d681SAndroid Build Coastguard Workerdef VLD3LNq16_UPD : VLD3LNWB<0b0110, {?,?,1,0}, "16"> {
1268*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
1269*9880d681SAndroid Build Coastguard Worker}
1270*9880d681SAndroid Build Coastguard Workerdef VLD3LNq32_UPD : VLD3LNWB<0b1010, {?,1,0,0}, "32"> {
1271*9880d681SAndroid Build Coastguard Worker  let Inst{7} = lane{0};
1272*9880d681SAndroid Build Coastguard Worker}
1273*9880d681SAndroid Build Coastguard Worker
1274*9880d681SAndroid Build Coastguard Workerdef VLD3LNq16Pseudo_UPD : VLDQQQQLNWBPseudo<IIC_VLD3lnu>;
1275*9880d681SAndroid Build Coastguard Workerdef VLD3LNq32Pseudo_UPD : VLDQQQQLNWBPseudo<IIC_VLD3lnu>;
1276*9880d681SAndroid Build Coastguard Worker
1277*9880d681SAndroid Build Coastguard Worker//   VLD4LN   : Vector Load (single 4-element structure to one lane)
1278*9880d681SAndroid Build Coastguard Workerclass VLD4LN<bits<4> op11_8, bits<4> op7_4, string Dt>
1279*9880d681SAndroid Build Coastguard Worker  : NLdStLn<1, 0b10, op11_8, op7_4,
1280*9880d681SAndroid Build Coastguard Worker          (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, DPR:$dst4),
1281*9880d681SAndroid Build Coastguard Worker          (ins addrmode6:$Rn, DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4,
1282*9880d681SAndroid Build Coastguard Worker          nohash_imm:$lane), IIC_VLD4ln, "vld4", Dt,
1283*9880d681SAndroid Build Coastguard Worker          "\\{$Vd[$lane], $dst2[$lane], $dst3[$lane], $dst4[$lane]\\}, $Rn",
1284*9880d681SAndroid Build Coastguard Worker          "$src1 = $Vd, $src2 = $dst2, $src3 = $dst3, $src4 = $dst4", []> {
1285*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
1286*9880d681SAndroid Build Coastguard Worker  let Inst{4} = Rn{4};
1287*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLD4LN";
1288*9880d681SAndroid Build Coastguard Worker}
1289*9880d681SAndroid Build Coastguard Worker
1290*9880d681SAndroid Build Coastguard Workerdef VLD4LNd8  : VLD4LN<0b0011, {?,?,?,?}, "8"> {
1291*9880d681SAndroid Build Coastguard Worker  let Inst{7-5} = lane{2-0};
1292*9880d681SAndroid Build Coastguard Worker}
1293*9880d681SAndroid Build Coastguard Workerdef VLD4LNd16 : VLD4LN<0b0111, {?,?,0,?}, "16"> {
1294*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
1295*9880d681SAndroid Build Coastguard Worker}
1296*9880d681SAndroid Build Coastguard Workerdef VLD4LNd32 : VLD4LN<0b1011, {?,0,?,?}, "32"> {
1297*9880d681SAndroid Build Coastguard Worker  let Inst{7} = lane{0};
1298*9880d681SAndroid Build Coastguard Worker  let Inst{5} = Rn{5};
1299*9880d681SAndroid Build Coastguard Worker}
1300*9880d681SAndroid Build Coastguard Worker
1301*9880d681SAndroid Build Coastguard Workerdef VLD4LNd8Pseudo  : VLDQQLNPseudo<IIC_VLD4ln>;
1302*9880d681SAndroid Build Coastguard Workerdef VLD4LNd16Pseudo : VLDQQLNPseudo<IIC_VLD4ln>;
1303*9880d681SAndroid Build Coastguard Workerdef VLD4LNd32Pseudo : VLDQQLNPseudo<IIC_VLD4ln>;
1304*9880d681SAndroid Build Coastguard Worker
1305*9880d681SAndroid Build Coastguard Worker// ...with double-spaced registers:
1306*9880d681SAndroid Build Coastguard Workerdef VLD4LNq16 : VLD4LN<0b0111, {?,?,1,?}, "16"> {
1307*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
1308*9880d681SAndroid Build Coastguard Worker}
1309*9880d681SAndroid Build Coastguard Workerdef VLD4LNq32 : VLD4LN<0b1011, {?,1,?,?}, "32"> {
1310*9880d681SAndroid Build Coastguard Worker  let Inst{7} = lane{0};
1311*9880d681SAndroid Build Coastguard Worker  let Inst{5} = Rn{5};
1312*9880d681SAndroid Build Coastguard Worker}
1313*9880d681SAndroid Build Coastguard Worker
1314*9880d681SAndroid Build Coastguard Workerdef VLD4LNq16Pseudo : VLDQQQQLNPseudo<IIC_VLD4ln>;
1315*9880d681SAndroid Build Coastguard Workerdef VLD4LNq32Pseudo : VLDQQQQLNPseudo<IIC_VLD4ln>;
1316*9880d681SAndroid Build Coastguard Worker
1317*9880d681SAndroid Build Coastguard Worker// ...with address register writeback:
1318*9880d681SAndroid Build Coastguard Workerclass VLD4LNWB<bits<4> op11_8, bits<4> op7_4, string Dt>
1319*9880d681SAndroid Build Coastguard Worker  : NLdStLn<1, 0b10, op11_8, op7_4,
1320*9880d681SAndroid Build Coastguard Worker          (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, DPR:$dst4, GPR:$wb),
1321*9880d681SAndroid Build Coastguard Worker          (ins addrmode6:$Rn, am6offset:$Rm,
1322*9880d681SAndroid Build Coastguard Worker           DPR:$src1, DPR:$src2, DPR:$src3, DPR:$src4, nohash_imm:$lane),
1323*9880d681SAndroid Build Coastguard Worker          IIC_VLD4lnu, "vld4", Dt,
1324*9880d681SAndroid Build Coastguard Worker"\\{$Vd[$lane], $dst2[$lane], $dst3[$lane], $dst4[$lane]\\}, $Rn$Rm",
1325*9880d681SAndroid Build Coastguard Worker"$src1 = $Vd, $src2 = $dst2, $src3 = $dst3, $src4 = $dst4, $Rn.addr = $wb",
1326*9880d681SAndroid Build Coastguard Worker          []> {
1327*9880d681SAndroid Build Coastguard Worker  let Inst{4}   = Rn{4};
1328*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLD4LN"  ;
1329*9880d681SAndroid Build Coastguard Worker}
1330*9880d681SAndroid Build Coastguard Worker
1331*9880d681SAndroid Build Coastguard Workerdef VLD4LNd8_UPD  : VLD4LNWB<0b0011, {?,?,?,?}, "8"> {
1332*9880d681SAndroid Build Coastguard Worker  let Inst{7-5} = lane{2-0};
1333*9880d681SAndroid Build Coastguard Worker}
1334*9880d681SAndroid Build Coastguard Workerdef VLD4LNd16_UPD : VLD4LNWB<0b0111, {?,?,0,?}, "16"> {
1335*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
1336*9880d681SAndroid Build Coastguard Worker}
1337*9880d681SAndroid Build Coastguard Workerdef VLD4LNd32_UPD : VLD4LNWB<0b1011, {?,0,?,?}, "32"> {
1338*9880d681SAndroid Build Coastguard Worker  let Inst{7} = lane{0};
1339*9880d681SAndroid Build Coastguard Worker  let Inst{5} = Rn{5};
1340*9880d681SAndroid Build Coastguard Worker}
1341*9880d681SAndroid Build Coastguard Worker
1342*9880d681SAndroid Build Coastguard Workerdef VLD4LNd8Pseudo_UPD  : VLDQQLNWBPseudo<IIC_VLD4lnu>;
1343*9880d681SAndroid Build Coastguard Workerdef VLD4LNd16Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD4lnu>;
1344*9880d681SAndroid Build Coastguard Workerdef VLD4LNd32Pseudo_UPD : VLDQQLNWBPseudo<IIC_VLD4lnu>;
1345*9880d681SAndroid Build Coastguard Worker
1346*9880d681SAndroid Build Coastguard Workerdef VLD4LNq16_UPD : VLD4LNWB<0b0111, {?,?,1,?}, "16"> {
1347*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
1348*9880d681SAndroid Build Coastguard Worker}
1349*9880d681SAndroid Build Coastguard Workerdef VLD4LNq32_UPD : VLD4LNWB<0b1011, {?,1,?,?}, "32"> {
1350*9880d681SAndroid Build Coastguard Worker  let Inst{7} = lane{0};
1351*9880d681SAndroid Build Coastguard Worker  let Inst{5} = Rn{5};
1352*9880d681SAndroid Build Coastguard Worker}
1353*9880d681SAndroid Build Coastguard Worker
1354*9880d681SAndroid Build Coastguard Workerdef VLD4LNq16Pseudo_UPD : VLDQQQQLNWBPseudo<IIC_VLD4lnu>;
1355*9880d681SAndroid Build Coastguard Workerdef VLD4LNq32Pseudo_UPD : VLDQQQQLNWBPseudo<IIC_VLD4lnu>;
1356*9880d681SAndroid Build Coastguard Worker
1357*9880d681SAndroid Build Coastguard Worker} // mayLoad = 1, hasSideEffects = 0, hasExtraDefRegAllocReq = 1
1358*9880d681SAndroid Build Coastguard Worker
1359*9880d681SAndroid Build Coastguard Worker//   VLD1DUP  : Vector Load (single element to all lanes)
1360*9880d681SAndroid Build Coastguard Workerclass VLD1DUP<bits<4> op7_4, string Dt, ValueType Ty, PatFrag LoadOp,
1361*9880d681SAndroid Build Coastguard Worker              Operand AddrMode>
1362*9880d681SAndroid Build Coastguard Worker  : NLdSt<1, 0b10, 0b1100, op7_4, (outs VecListOneDAllLanes:$Vd),
1363*9880d681SAndroid Build Coastguard Worker          (ins AddrMode:$Rn),
1364*9880d681SAndroid Build Coastguard Worker          IIC_VLD1dup, "vld1", Dt, "$Vd, $Rn", "",
1365*9880d681SAndroid Build Coastguard Worker          [(set VecListOneDAllLanes:$Vd,
1366*9880d681SAndroid Build Coastguard Worker                (Ty (NEONvdup (i32 (LoadOp AddrMode:$Rn)))))]> {
1367*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
1368*9880d681SAndroid Build Coastguard Worker  let Inst{4} = Rn{4};
1369*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLD1DupInstruction";
1370*9880d681SAndroid Build Coastguard Worker}
1371*9880d681SAndroid Build Coastguard Workerdef VLD1DUPd8  : VLD1DUP<{0,0,0,?}, "8", v8i8, extloadi8,
1372*9880d681SAndroid Build Coastguard Worker                         addrmode6dupalignNone>;
1373*9880d681SAndroid Build Coastguard Workerdef VLD1DUPd16 : VLD1DUP<{0,1,0,?}, "16", v4i16, extloadi16,
1374*9880d681SAndroid Build Coastguard Worker                         addrmode6dupalign16>;
1375*9880d681SAndroid Build Coastguard Workerdef VLD1DUPd32 : VLD1DUP<{1,0,0,?}, "32", v2i32, load,
1376*9880d681SAndroid Build Coastguard Worker                         addrmode6dupalign32>;
1377*9880d681SAndroid Build Coastguard Worker
1378*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2f32 (NEONvdup (f32 (load addrmode6dup:$addr)))),
1379*9880d681SAndroid Build Coastguard Worker          (VLD1DUPd32 addrmode6:$addr)>;
1380*9880d681SAndroid Build Coastguard Worker
1381*9880d681SAndroid Build Coastguard Workerclass VLD1QDUP<bits<4> op7_4, string Dt, ValueType Ty, PatFrag LoadOp,
1382*9880d681SAndroid Build Coastguard Worker               Operand AddrMode>
1383*9880d681SAndroid Build Coastguard Worker  : NLdSt<1, 0b10, 0b1100, op7_4, (outs VecListDPairAllLanes:$Vd),
1384*9880d681SAndroid Build Coastguard Worker          (ins AddrMode:$Rn), IIC_VLD1dup,
1385*9880d681SAndroid Build Coastguard Worker          "vld1", Dt, "$Vd, $Rn", "",
1386*9880d681SAndroid Build Coastguard Worker          [(set VecListDPairAllLanes:$Vd,
1387*9880d681SAndroid Build Coastguard Worker                (Ty (NEONvdup (i32 (LoadOp AddrMode:$Rn)))))]> {
1388*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
1389*9880d681SAndroid Build Coastguard Worker  let Inst{4} = Rn{4};
1390*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLD1DupInstruction";
1391*9880d681SAndroid Build Coastguard Worker}
1392*9880d681SAndroid Build Coastguard Worker
1393*9880d681SAndroid Build Coastguard Workerdef VLD1DUPq8  : VLD1QDUP<{0,0,1,0}, "8", v16i8, extloadi8,
1394*9880d681SAndroid Build Coastguard Worker                          addrmode6dupalignNone>;
1395*9880d681SAndroid Build Coastguard Workerdef VLD1DUPq16 : VLD1QDUP<{0,1,1,?}, "16", v8i16, extloadi16,
1396*9880d681SAndroid Build Coastguard Worker                          addrmode6dupalign16>;
1397*9880d681SAndroid Build Coastguard Workerdef VLD1DUPq32 : VLD1QDUP<{1,0,1,?}, "32", v4i32, load,
1398*9880d681SAndroid Build Coastguard Worker                          addrmode6dupalign32>;
1399*9880d681SAndroid Build Coastguard Worker
1400*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4f32 (NEONvdup (f32 (load addrmode6dup:$addr)))),
1401*9880d681SAndroid Build Coastguard Worker          (VLD1DUPq32 addrmode6:$addr)>;
1402*9880d681SAndroid Build Coastguard Worker
1403*9880d681SAndroid Build Coastguard Workerlet mayLoad = 1, hasSideEffects = 0, hasExtraDefRegAllocReq = 1 in {
1404*9880d681SAndroid Build Coastguard Worker// ...with address register writeback:
1405*9880d681SAndroid Build Coastguard Workermulticlass VLD1DUPWB<bits<4> op7_4, string Dt, Operand AddrMode> {
1406*9880d681SAndroid Build Coastguard Worker  def _fixed : NLdSt<1, 0b10, 0b1100, op7_4,
1407*9880d681SAndroid Build Coastguard Worker                     (outs VecListOneDAllLanes:$Vd, GPR:$wb),
1408*9880d681SAndroid Build Coastguard Worker                     (ins AddrMode:$Rn), IIC_VLD1dupu,
1409*9880d681SAndroid Build Coastguard Worker                     "vld1", Dt, "$Vd, $Rn!",
1410*9880d681SAndroid Build Coastguard Worker                     "$Rn.addr = $wb", []> {
1411*9880d681SAndroid Build Coastguard Worker    let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
1412*9880d681SAndroid Build Coastguard Worker    let Inst{4} = Rn{4};
1413*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLD1DupInstruction";
1414*9880d681SAndroid Build Coastguard Worker  }
1415*9880d681SAndroid Build Coastguard Worker  def _register : NLdSt<1, 0b10, 0b1100, op7_4,
1416*9880d681SAndroid Build Coastguard Worker                        (outs VecListOneDAllLanes:$Vd, GPR:$wb),
1417*9880d681SAndroid Build Coastguard Worker                        (ins AddrMode:$Rn, rGPR:$Rm), IIC_VLD1dupu,
1418*9880d681SAndroid Build Coastguard Worker                        "vld1", Dt, "$Vd, $Rn, $Rm",
1419*9880d681SAndroid Build Coastguard Worker                        "$Rn.addr = $wb", []> {
1420*9880d681SAndroid Build Coastguard Worker    let Inst{4} = Rn{4};
1421*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLD1DupInstruction";
1422*9880d681SAndroid Build Coastguard Worker  }
1423*9880d681SAndroid Build Coastguard Worker}
1424*9880d681SAndroid Build Coastguard Workermulticlass VLD1QDUPWB<bits<4> op7_4, string Dt, Operand AddrMode> {
1425*9880d681SAndroid Build Coastguard Worker  def _fixed : NLdSt<1, 0b10, 0b1100, op7_4,
1426*9880d681SAndroid Build Coastguard Worker                     (outs VecListDPairAllLanes:$Vd, GPR:$wb),
1427*9880d681SAndroid Build Coastguard Worker                     (ins AddrMode:$Rn), IIC_VLD1dupu,
1428*9880d681SAndroid Build Coastguard Worker                     "vld1", Dt, "$Vd, $Rn!",
1429*9880d681SAndroid Build Coastguard Worker                     "$Rn.addr = $wb", []> {
1430*9880d681SAndroid Build Coastguard Worker    let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
1431*9880d681SAndroid Build Coastguard Worker    let Inst{4} = Rn{4};
1432*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLD1DupInstruction";
1433*9880d681SAndroid Build Coastguard Worker  }
1434*9880d681SAndroid Build Coastguard Worker  def _register : NLdSt<1, 0b10, 0b1100, op7_4,
1435*9880d681SAndroid Build Coastguard Worker                        (outs VecListDPairAllLanes:$Vd, GPR:$wb),
1436*9880d681SAndroid Build Coastguard Worker                        (ins AddrMode:$Rn, rGPR:$Rm), IIC_VLD1dupu,
1437*9880d681SAndroid Build Coastguard Worker                        "vld1", Dt, "$Vd, $Rn, $Rm",
1438*9880d681SAndroid Build Coastguard Worker                        "$Rn.addr = $wb", []> {
1439*9880d681SAndroid Build Coastguard Worker    let Inst{4} = Rn{4};
1440*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLD1DupInstruction";
1441*9880d681SAndroid Build Coastguard Worker  }
1442*9880d681SAndroid Build Coastguard Worker}
1443*9880d681SAndroid Build Coastguard Worker
1444*9880d681SAndroid Build Coastguard Workerdefm VLD1DUPd8wb  : VLD1DUPWB<{0,0,0,0}, "8", addrmode6dupalignNone>;
1445*9880d681SAndroid Build Coastguard Workerdefm VLD1DUPd16wb : VLD1DUPWB<{0,1,0,?}, "16", addrmode6dupalign16>;
1446*9880d681SAndroid Build Coastguard Workerdefm VLD1DUPd32wb : VLD1DUPWB<{1,0,0,?}, "32", addrmode6dupalign32>;
1447*9880d681SAndroid Build Coastguard Worker
1448*9880d681SAndroid Build Coastguard Workerdefm VLD1DUPq8wb  : VLD1QDUPWB<{0,0,1,0}, "8", addrmode6dupalignNone>;
1449*9880d681SAndroid Build Coastguard Workerdefm VLD1DUPq16wb : VLD1QDUPWB<{0,1,1,?}, "16", addrmode6dupalign16>;
1450*9880d681SAndroid Build Coastguard Workerdefm VLD1DUPq32wb : VLD1QDUPWB<{1,0,1,?}, "32", addrmode6dupalign32>;
1451*9880d681SAndroid Build Coastguard Worker
1452*9880d681SAndroid Build Coastguard Worker//   VLD2DUP  : Vector Load (single 2-element structure to all lanes)
1453*9880d681SAndroid Build Coastguard Workerclass VLD2DUP<bits<4> op7_4, string Dt, RegisterOperand VdTy, Operand AddrMode>
1454*9880d681SAndroid Build Coastguard Worker  : NLdSt<1, 0b10, 0b1101, op7_4, (outs VdTy:$Vd),
1455*9880d681SAndroid Build Coastguard Worker          (ins AddrMode:$Rn), IIC_VLD2dup,
1456*9880d681SAndroid Build Coastguard Worker          "vld2", Dt, "$Vd, $Rn", "", []> {
1457*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
1458*9880d681SAndroid Build Coastguard Worker  let Inst{4} = Rn{4};
1459*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLD2DupInstruction";
1460*9880d681SAndroid Build Coastguard Worker}
1461*9880d681SAndroid Build Coastguard Worker
1462*9880d681SAndroid Build Coastguard Workerdef VLD2DUPd8  : VLD2DUP<{0,0,0,?}, "8",  VecListDPairAllLanes,
1463*9880d681SAndroid Build Coastguard Worker                         addrmode6dupalign16>;
1464*9880d681SAndroid Build Coastguard Workerdef VLD2DUPd16 : VLD2DUP<{0,1,0,?}, "16", VecListDPairAllLanes,
1465*9880d681SAndroid Build Coastguard Worker                         addrmode6dupalign32>;
1466*9880d681SAndroid Build Coastguard Workerdef VLD2DUPd32 : VLD2DUP<{1,0,0,?}, "32", VecListDPairAllLanes,
1467*9880d681SAndroid Build Coastguard Worker                         addrmode6dupalign64>;
1468*9880d681SAndroid Build Coastguard Worker
1469*9880d681SAndroid Build Coastguard Worker// HACK this one, VLD2DUPd8x2 must be changed at the same time with VLD2b8 or
1470*9880d681SAndroid Build Coastguard Worker// "vld2.8 {d0[], d2[]}, [r4:32]" will become "vld2.8 {d0, d2}, [r4:32]".
1471*9880d681SAndroid Build Coastguard Worker// ...with double-spaced registers
1472*9880d681SAndroid Build Coastguard Workerdef VLD2DUPd8x2  : VLD2DUP<{0,0,1,?}, "8",  VecListDPairSpacedAllLanes,
1473*9880d681SAndroid Build Coastguard Worker                           addrmode6dupalign16>;
1474*9880d681SAndroid Build Coastguard Workerdef VLD2DUPd16x2 : VLD2DUP<{0,1,1,?}, "16", VecListDPairSpacedAllLanes,
1475*9880d681SAndroid Build Coastguard Worker                           addrmode6dupalign32>;
1476*9880d681SAndroid Build Coastguard Workerdef VLD2DUPd32x2 : VLD2DUP<{1,0,1,?}, "32", VecListDPairSpacedAllLanes,
1477*9880d681SAndroid Build Coastguard Worker                           addrmode6dupalign64>;
1478*9880d681SAndroid Build Coastguard Worker
1479*9880d681SAndroid Build Coastguard Worker// ...with address register writeback:
1480*9880d681SAndroid Build Coastguard Workermulticlass VLD2DUPWB<bits<4> op7_4, string Dt, RegisterOperand VdTy,
1481*9880d681SAndroid Build Coastguard Worker                     Operand AddrMode> {
1482*9880d681SAndroid Build Coastguard Worker  def _fixed : NLdSt<1, 0b10, 0b1101, op7_4,
1483*9880d681SAndroid Build Coastguard Worker                     (outs VdTy:$Vd, GPR:$wb),
1484*9880d681SAndroid Build Coastguard Worker                     (ins AddrMode:$Rn), IIC_VLD2dupu,
1485*9880d681SAndroid Build Coastguard Worker                     "vld2", Dt, "$Vd, $Rn!",
1486*9880d681SAndroid Build Coastguard Worker                     "$Rn.addr = $wb", []> {
1487*9880d681SAndroid Build Coastguard Worker    let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
1488*9880d681SAndroid Build Coastguard Worker    let Inst{4} = Rn{4};
1489*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLD2DupInstruction";
1490*9880d681SAndroid Build Coastguard Worker  }
1491*9880d681SAndroid Build Coastguard Worker  def _register : NLdSt<1, 0b10, 0b1101, op7_4,
1492*9880d681SAndroid Build Coastguard Worker                        (outs VdTy:$Vd, GPR:$wb),
1493*9880d681SAndroid Build Coastguard Worker                        (ins AddrMode:$Rn, rGPR:$Rm), IIC_VLD2dupu,
1494*9880d681SAndroid Build Coastguard Worker                        "vld2", Dt, "$Vd, $Rn, $Rm",
1495*9880d681SAndroid Build Coastguard Worker                        "$Rn.addr = $wb", []> {
1496*9880d681SAndroid Build Coastguard Worker    let Inst{4} = Rn{4};
1497*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLD2DupInstruction";
1498*9880d681SAndroid Build Coastguard Worker  }
1499*9880d681SAndroid Build Coastguard Worker}
1500*9880d681SAndroid Build Coastguard Worker
1501*9880d681SAndroid Build Coastguard Workerdefm VLD2DUPd8wb    : VLD2DUPWB<{0,0,0,0}, "8",  VecListDPairAllLanes,
1502*9880d681SAndroid Build Coastguard Worker                                addrmode6dupalign16>;
1503*9880d681SAndroid Build Coastguard Workerdefm VLD2DUPd16wb   : VLD2DUPWB<{0,1,0,?}, "16", VecListDPairAllLanes,
1504*9880d681SAndroid Build Coastguard Worker                                addrmode6dupalign32>;
1505*9880d681SAndroid Build Coastguard Workerdefm VLD2DUPd32wb   : VLD2DUPWB<{1,0,0,?}, "32", VecListDPairAllLanes,
1506*9880d681SAndroid Build Coastguard Worker                                addrmode6dupalign64>;
1507*9880d681SAndroid Build Coastguard Worker
1508*9880d681SAndroid Build Coastguard Workerdefm VLD2DUPd8x2wb  : VLD2DUPWB<{0,0,1,0}, "8",  VecListDPairSpacedAllLanes,
1509*9880d681SAndroid Build Coastguard Worker                                addrmode6dupalign16>;
1510*9880d681SAndroid Build Coastguard Workerdefm VLD2DUPd16x2wb : VLD2DUPWB<{0,1,1,?}, "16", VecListDPairSpacedAllLanes,
1511*9880d681SAndroid Build Coastguard Worker                                addrmode6dupalign32>;
1512*9880d681SAndroid Build Coastguard Workerdefm VLD2DUPd32x2wb : VLD2DUPWB<{1,0,1,?}, "32", VecListDPairSpacedAllLanes,
1513*9880d681SAndroid Build Coastguard Worker                                addrmode6dupalign64>;
1514*9880d681SAndroid Build Coastguard Worker
1515*9880d681SAndroid Build Coastguard Worker//   VLD3DUP  : Vector Load (single 3-element structure to all lanes)
1516*9880d681SAndroid Build Coastguard Workerclass VLD3DUP<bits<4> op7_4, string Dt>
1517*9880d681SAndroid Build Coastguard Worker  : NLdSt<1, 0b10, 0b1110, op7_4, (outs DPR:$Vd, DPR:$dst2, DPR:$dst3),
1518*9880d681SAndroid Build Coastguard Worker          (ins addrmode6dup:$Rn), IIC_VLD3dup,
1519*9880d681SAndroid Build Coastguard Worker          "vld3", Dt, "\\{$Vd[], $dst2[], $dst3[]\\}, $Rn", "", []> {
1520*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
1521*9880d681SAndroid Build Coastguard Worker  let Inst{4} = 0;
1522*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLD3DupInstruction";
1523*9880d681SAndroid Build Coastguard Worker}
1524*9880d681SAndroid Build Coastguard Worker
1525*9880d681SAndroid Build Coastguard Workerdef VLD3DUPd8  : VLD3DUP<{0,0,0,?}, "8">;
1526*9880d681SAndroid Build Coastguard Workerdef VLD3DUPd16 : VLD3DUP<{0,1,0,?}, "16">;
1527*9880d681SAndroid Build Coastguard Workerdef VLD3DUPd32 : VLD3DUP<{1,0,0,?}, "32">;
1528*9880d681SAndroid Build Coastguard Worker
1529*9880d681SAndroid Build Coastguard Workerdef VLD3DUPd8Pseudo  : VLDQQPseudo<IIC_VLD3dup>;
1530*9880d681SAndroid Build Coastguard Workerdef VLD3DUPd16Pseudo : VLDQQPseudo<IIC_VLD3dup>;
1531*9880d681SAndroid Build Coastguard Workerdef VLD3DUPd32Pseudo : VLDQQPseudo<IIC_VLD3dup>;
1532*9880d681SAndroid Build Coastguard Worker
1533*9880d681SAndroid Build Coastguard Worker// ...with double-spaced registers (not used for codegen):
1534*9880d681SAndroid Build Coastguard Workerdef VLD3DUPq8  : VLD3DUP<{0,0,1,?}, "8">;
1535*9880d681SAndroid Build Coastguard Workerdef VLD3DUPq16 : VLD3DUP<{0,1,1,?}, "16">;
1536*9880d681SAndroid Build Coastguard Workerdef VLD3DUPq32 : VLD3DUP<{1,0,1,?}, "32">;
1537*9880d681SAndroid Build Coastguard Worker
1538*9880d681SAndroid Build Coastguard Worker// ...with address register writeback:
1539*9880d681SAndroid Build Coastguard Workerclass VLD3DUPWB<bits<4> op7_4, string Dt, Operand AddrMode>
1540*9880d681SAndroid Build Coastguard Worker  : NLdSt<1, 0b10, 0b1110, op7_4, (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, GPR:$wb),
1541*9880d681SAndroid Build Coastguard Worker          (ins AddrMode:$Rn, am6offset:$Rm), IIC_VLD3dupu,
1542*9880d681SAndroid Build Coastguard Worker          "vld3", Dt, "\\{$Vd[], $dst2[], $dst3[]\\}, $Rn$Rm",
1543*9880d681SAndroid Build Coastguard Worker          "$Rn.addr = $wb", []> {
1544*9880d681SAndroid Build Coastguard Worker  let Inst{4} = 0;
1545*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLD3DupInstruction";
1546*9880d681SAndroid Build Coastguard Worker}
1547*9880d681SAndroid Build Coastguard Worker
1548*9880d681SAndroid Build Coastguard Workerdef VLD3DUPd8_UPD  : VLD3DUPWB<{0,0,0,0}, "8",  addrmode6dupalign64>;
1549*9880d681SAndroid Build Coastguard Workerdef VLD3DUPd16_UPD : VLD3DUPWB<{0,1,0,?}, "16", addrmode6dupalign64>;
1550*9880d681SAndroid Build Coastguard Workerdef VLD3DUPd32_UPD : VLD3DUPWB<{1,0,0,?}, "32", addrmode6dupalign64>;
1551*9880d681SAndroid Build Coastguard Worker
1552*9880d681SAndroid Build Coastguard Workerdef VLD3DUPq8_UPD  : VLD3DUPWB<{0,0,1,0}, "8",  addrmode6dupalign64>;
1553*9880d681SAndroid Build Coastguard Workerdef VLD3DUPq16_UPD : VLD3DUPWB<{0,1,1,?}, "16", addrmode6dupalign64>;
1554*9880d681SAndroid Build Coastguard Workerdef VLD3DUPq32_UPD : VLD3DUPWB<{1,0,1,?}, "32", addrmode6dupalign64>;
1555*9880d681SAndroid Build Coastguard Worker
1556*9880d681SAndroid Build Coastguard Workerdef VLD3DUPd8Pseudo_UPD  : VLDQQWBPseudo<IIC_VLD3dupu>;
1557*9880d681SAndroid Build Coastguard Workerdef VLD3DUPd16Pseudo_UPD : VLDQQWBPseudo<IIC_VLD3dupu>;
1558*9880d681SAndroid Build Coastguard Workerdef VLD3DUPd32Pseudo_UPD : VLDQQWBPseudo<IIC_VLD3dupu>;
1559*9880d681SAndroid Build Coastguard Worker
1560*9880d681SAndroid Build Coastguard Worker//   VLD4DUP  : Vector Load (single 4-element structure to all lanes)
1561*9880d681SAndroid Build Coastguard Workerclass VLD4DUP<bits<4> op7_4, string Dt>
1562*9880d681SAndroid Build Coastguard Worker  : NLdSt<1, 0b10, 0b1111, op7_4,
1563*9880d681SAndroid Build Coastguard Worker          (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, DPR:$dst4),
1564*9880d681SAndroid Build Coastguard Worker          (ins addrmode6dup:$Rn), IIC_VLD4dup,
1565*9880d681SAndroid Build Coastguard Worker          "vld4", Dt, "\\{$Vd[], $dst2[], $dst3[], $dst4[]\\}, $Rn", "", []> {
1566*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
1567*9880d681SAndroid Build Coastguard Worker  let Inst{4} = Rn{4};
1568*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLD4DupInstruction";
1569*9880d681SAndroid Build Coastguard Worker}
1570*9880d681SAndroid Build Coastguard Worker
1571*9880d681SAndroid Build Coastguard Workerdef VLD4DUPd8  : VLD4DUP<{0,0,0,?}, "8">;
1572*9880d681SAndroid Build Coastguard Workerdef VLD4DUPd16 : VLD4DUP<{0,1,0,?}, "16">;
1573*9880d681SAndroid Build Coastguard Workerdef VLD4DUPd32 : VLD4DUP<{1,?,0,?}, "32"> { let Inst{6} = Rn{5}; }
1574*9880d681SAndroid Build Coastguard Worker
1575*9880d681SAndroid Build Coastguard Workerdef VLD4DUPd8Pseudo  : VLDQQPseudo<IIC_VLD4dup>;
1576*9880d681SAndroid Build Coastguard Workerdef VLD4DUPd16Pseudo : VLDQQPseudo<IIC_VLD4dup>;
1577*9880d681SAndroid Build Coastguard Workerdef VLD4DUPd32Pseudo : VLDQQPseudo<IIC_VLD4dup>;
1578*9880d681SAndroid Build Coastguard Worker
1579*9880d681SAndroid Build Coastguard Worker// ...with double-spaced registers (not used for codegen):
1580*9880d681SAndroid Build Coastguard Workerdef VLD4DUPq8  : VLD4DUP<{0,0,1,?}, "8">;
1581*9880d681SAndroid Build Coastguard Workerdef VLD4DUPq16 : VLD4DUP<{0,1,1,?}, "16">;
1582*9880d681SAndroid Build Coastguard Workerdef VLD4DUPq32 : VLD4DUP<{1,?,1,?}, "32"> { let Inst{6} = Rn{5}; }
1583*9880d681SAndroid Build Coastguard Worker
1584*9880d681SAndroid Build Coastguard Worker// ...with address register writeback:
1585*9880d681SAndroid Build Coastguard Workerclass VLD4DUPWB<bits<4> op7_4, string Dt>
1586*9880d681SAndroid Build Coastguard Worker  : NLdSt<1, 0b10, 0b1111, op7_4,
1587*9880d681SAndroid Build Coastguard Worker          (outs DPR:$Vd, DPR:$dst2, DPR:$dst3, DPR:$dst4, GPR:$wb),
1588*9880d681SAndroid Build Coastguard Worker          (ins addrmode6dup:$Rn, am6offset:$Rm), IIC_VLD4dupu,
1589*9880d681SAndroid Build Coastguard Worker          "vld4", Dt, "\\{$Vd[], $dst2[], $dst3[], $dst4[]\\}, $Rn$Rm",
1590*9880d681SAndroid Build Coastguard Worker          "$Rn.addr = $wb", []> {
1591*9880d681SAndroid Build Coastguard Worker  let Inst{4} = Rn{4};
1592*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLD4DupInstruction";
1593*9880d681SAndroid Build Coastguard Worker}
1594*9880d681SAndroid Build Coastguard Worker
1595*9880d681SAndroid Build Coastguard Workerdef VLD4DUPd8_UPD  : VLD4DUPWB<{0,0,0,0}, "8">;
1596*9880d681SAndroid Build Coastguard Workerdef VLD4DUPd16_UPD : VLD4DUPWB<{0,1,0,?}, "16">;
1597*9880d681SAndroid Build Coastguard Workerdef VLD4DUPd32_UPD : VLD4DUPWB<{1,?,0,?}, "32"> { let Inst{6} = Rn{5}; }
1598*9880d681SAndroid Build Coastguard Worker
1599*9880d681SAndroid Build Coastguard Workerdef VLD4DUPq8_UPD  : VLD4DUPWB<{0,0,1,0}, "8">;
1600*9880d681SAndroid Build Coastguard Workerdef VLD4DUPq16_UPD : VLD4DUPWB<{0,1,1,?}, "16">;
1601*9880d681SAndroid Build Coastguard Workerdef VLD4DUPq32_UPD : VLD4DUPWB<{1,?,1,?}, "32"> { let Inst{6} = Rn{5}; }
1602*9880d681SAndroid Build Coastguard Worker
1603*9880d681SAndroid Build Coastguard Workerdef VLD4DUPd8Pseudo_UPD  : VLDQQWBPseudo<IIC_VLD4dupu>;
1604*9880d681SAndroid Build Coastguard Workerdef VLD4DUPd16Pseudo_UPD : VLDQQWBPseudo<IIC_VLD4dupu>;
1605*9880d681SAndroid Build Coastguard Workerdef VLD4DUPd32Pseudo_UPD : VLDQQWBPseudo<IIC_VLD4dupu>;
1606*9880d681SAndroid Build Coastguard Worker
1607*9880d681SAndroid Build Coastguard Worker} // mayLoad = 1, hasSideEffects = 0, hasExtraDefRegAllocReq = 1
1608*9880d681SAndroid Build Coastguard Worker
1609*9880d681SAndroid Build Coastguard Workerlet mayStore = 1, hasSideEffects = 0, hasExtraSrcRegAllocReq = 1 in {
1610*9880d681SAndroid Build Coastguard Worker
1611*9880d681SAndroid Build Coastguard Worker// Classes for VST* pseudo-instructions with multi-register operands.
1612*9880d681SAndroid Build Coastguard Worker// These are expanded to real instructions after register allocation.
1613*9880d681SAndroid Build Coastguard Workerclass VSTQPseudo<InstrItinClass itin>
1614*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs), (ins addrmode6:$addr, QPR:$src), itin, "">;
1615*9880d681SAndroid Build Coastguard Workerclass VSTQWBPseudo<InstrItinClass itin>
1616*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs GPR:$wb),
1617*9880d681SAndroid Build Coastguard Worker                (ins addrmode6:$addr, am6offset:$offset, QPR:$src), itin,
1618*9880d681SAndroid Build Coastguard Worker                "$addr.addr = $wb">;
1619*9880d681SAndroid Build Coastguard Workerclass VSTQWBfixedPseudo<InstrItinClass itin>
1620*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs GPR:$wb),
1621*9880d681SAndroid Build Coastguard Worker                (ins addrmode6:$addr, QPR:$src), itin,
1622*9880d681SAndroid Build Coastguard Worker                "$addr.addr = $wb">;
1623*9880d681SAndroid Build Coastguard Workerclass VSTQWBregisterPseudo<InstrItinClass itin>
1624*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs GPR:$wb),
1625*9880d681SAndroid Build Coastguard Worker                (ins addrmode6:$addr, rGPR:$offset, QPR:$src), itin,
1626*9880d681SAndroid Build Coastguard Worker                "$addr.addr = $wb">;
1627*9880d681SAndroid Build Coastguard Workerclass VSTQQPseudo<InstrItinClass itin>
1628*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs), (ins addrmode6:$addr, QQPR:$src), itin, "">;
1629*9880d681SAndroid Build Coastguard Workerclass VSTQQWBPseudo<InstrItinClass itin>
1630*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs GPR:$wb),
1631*9880d681SAndroid Build Coastguard Worker                (ins addrmode6:$addr, am6offset:$offset, QQPR:$src), itin,
1632*9880d681SAndroid Build Coastguard Worker                "$addr.addr = $wb">;
1633*9880d681SAndroid Build Coastguard Workerclass VSTQQWBfixedPseudo<InstrItinClass itin>
1634*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs GPR:$wb),
1635*9880d681SAndroid Build Coastguard Worker                (ins addrmode6:$addr, QQPR:$src), itin,
1636*9880d681SAndroid Build Coastguard Worker                "$addr.addr = $wb">;
1637*9880d681SAndroid Build Coastguard Workerclass VSTQQWBregisterPseudo<InstrItinClass itin>
1638*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs GPR:$wb),
1639*9880d681SAndroid Build Coastguard Worker                (ins addrmode6:$addr, rGPR:$offset, QQPR:$src), itin,
1640*9880d681SAndroid Build Coastguard Worker                "$addr.addr = $wb">;
1641*9880d681SAndroid Build Coastguard Worker
1642*9880d681SAndroid Build Coastguard Workerclass VSTQQQQPseudo<InstrItinClass itin>
1643*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs), (ins addrmode6:$addr, QQQQPR:$src), itin, "">;
1644*9880d681SAndroid Build Coastguard Workerclass VSTQQQQWBPseudo<InstrItinClass itin>
1645*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs GPR:$wb),
1646*9880d681SAndroid Build Coastguard Worker                (ins addrmode6:$addr, am6offset:$offset, QQQQPR:$src), itin,
1647*9880d681SAndroid Build Coastguard Worker                "$addr.addr = $wb">;
1648*9880d681SAndroid Build Coastguard Worker
1649*9880d681SAndroid Build Coastguard Worker//   VST1     : Vector Store (multiple single elements)
1650*9880d681SAndroid Build Coastguard Workerclass VST1D<bits<4> op7_4, string Dt, Operand AddrMode>
1651*9880d681SAndroid Build Coastguard Worker  : NLdSt<0,0b00,0b0111,op7_4, (outs), (ins AddrMode:$Rn, VecListOneD:$Vd),
1652*9880d681SAndroid Build Coastguard Worker          IIC_VST1, "vst1", Dt, "$Vd, $Rn", "", []> {
1653*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
1654*9880d681SAndroid Build Coastguard Worker  let Inst{4} = Rn{4};
1655*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLDST1Instruction";
1656*9880d681SAndroid Build Coastguard Worker}
1657*9880d681SAndroid Build Coastguard Workerclass VST1Q<bits<4> op7_4, string Dt, Operand AddrMode>
1658*9880d681SAndroid Build Coastguard Worker  : NLdSt<0,0b00,0b1010,op7_4, (outs), (ins AddrMode:$Rn, VecListDPair:$Vd),
1659*9880d681SAndroid Build Coastguard Worker          IIC_VST1x2, "vst1", Dt, "$Vd, $Rn", "", []> {
1660*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
1661*9880d681SAndroid Build Coastguard Worker  let Inst{5-4} = Rn{5-4};
1662*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLDST1Instruction";
1663*9880d681SAndroid Build Coastguard Worker}
1664*9880d681SAndroid Build Coastguard Worker
1665*9880d681SAndroid Build Coastguard Workerdef  VST1d8   : VST1D<{0,0,0,?}, "8",  addrmode6align64>;
1666*9880d681SAndroid Build Coastguard Workerdef  VST1d16  : VST1D<{0,1,0,?}, "16", addrmode6align64>;
1667*9880d681SAndroid Build Coastguard Workerdef  VST1d32  : VST1D<{1,0,0,?}, "32", addrmode6align64>;
1668*9880d681SAndroid Build Coastguard Workerdef  VST1d64  : VST1D<{1,1,0,?}, "64", addrmode6align64>;
1669*9880d681SAndroid Build Coastguard Worker
1670*9880d681SAndroid Build Coastguard Workerdef  VST1q8   : VST1Q<{0,0,?,?}, "8",  addrmode6align64or128>;
1671*9880d681SAndroid Build Coastguard Workerdef  VST1q16  : VST1Q<{0,1,?,?}, "16", addrmode6align64or128>;
1672*9880d681SAndroid Build Coastguard Workerdef  VST1q32  : VST1Q<{1,0,?,?}, "32", addrmode6align64or128>;
1673*9880d681SAndroid Build Coastguard Workerdef  VST1q64  : VST1Q<{1,1,?,?}, "64", addrmode6align64or128>;
1674*9880d681SAndroid Build Coastguard Worker
1675*9880d681SAndroid Build Coastguard Worker// ...with address register writeback:
1676*9880d681SAndroid Build Coastguard Workermulticlass VST1DWB<bits<4> op7_4, string Dt, Operand AddrMode> {
1677*9880d681SAndroid Build Coastguard Worker  def _fixed : NLdSt<0,0b00, 0b0111,op7_4, (outs GPR:$wb),
1678*9880d681SAndroid Build Coastguard Worker                     (ins AddrMode:$Rn, VecListOneD:$Vd), IIC_VLD1u,
1679*9880d681SAndroid Build Coastguard Worker                     "vst1", Dt, "$Vd, $Rn!",
1680*9880d681SAndroid Build Coastguard Worker                     "$Rn.addr = $wb", []> {
1681*9880d681SAndroid Build Coastguard Worker    let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
1682*9880d681SAndroid Build Coastguard Worker    let Inst{4} = Rn{4};
1683*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLDST1Instruction";
1684*9880d681SAndroid Build Coastguard Worker  }
1685*9880d681SAndroid Build Coastguard Worker  def _register : NLdSt<0,0b00,0b0111,op7_4, (outs GPR:$wb),
1686*9880d681SAndroid Build Coastguard Worker                        (ins AddrMode:$Rn, rGPR:$Rm, VecListOneD:$Vd),
1687*9880d681SAndroid Build Coastguard Worker                        IIC_VLD1u,
1688*9880d681SAndroid Build Coastguard Worker                        "vst1", Dt, "$Vd, $Rn, $Rm",
1689*9880d681SAndroid Build Coastguard Worker                        "$Rn.addr = $wb", []> {
1690*9880d681SAndroid Build Coastguard Worker    let Inst{4} = Rn{4};
1691*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLDST1Instruction";
1692*9880d681SAndroid Build Coastguard Worker  }
1693*9880d681SAndroid Build Coastguard Worker}
1694*9880d681SAndroid Build Coastguard Workermulticlass VST1QWB<bits<4> op7_4, string Dt, Operand AddrMode> {
1695*9880d681SAndroid Build Coastguard Worker  def _fixed : NLdSt<0,0b00,0b1010,op7_4, (outs GPR:$wb),
1696*9880d681SAndroid Build Coastguard Worker                    (ins AddrMode:$Rn, VecListDPair:$Vd), IIC_VLD1x2u,
1697*9880d681SAndroid Build Coastguard Worker                     "vst1", Dt, "$Vd, $Rn!",
1698*9880d681SAndroid Build Coastguard Worker                     "$Rn.addr = $wb", []> {
1699*9880d681SAndroid Build Coastguard Worker    let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
1700*9880d681SAndroid Build Coastguard Worker    let Inst{5-4} = Rn{5-4};
1701*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLDST1Instruction";
1702*9880d681SAndroid Build Coastguard Worker  }
1703*9880d681SAndroid Build Coastguard Worker  def _register : NLdSt<0,0b00,0b1010,op7_4, (outs GPR:$wb),
1704*9880d681SAndroid Build Coastguard Worker                        (ins AddrMode:$Rn, rGPR:$Rm, VecListDPair:$Vd),
1705*9880d681SAndroid Build Coastguard Worker                        IIC_VLD1x2u,
1706*9880d681SAndroid Build Coastguard Worker                        "vst1", Dt, "$Vd, $Rn, $Rm",
1707*9880d681SAndroid Build Coastguard Worker                        "$Rn.addr = $wb", []> {
1708*9880d681SAndroid Build Coastguard Worker    let Inst{5-4} = Rn{5-4};
1709*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLDST1Instruction";
1710*9880d681SAndroid Build Coastguard Worker  }
1711*9880d681SAndroid Build Coastguard Worker}
1712*9880d681SAndroid Build Coastguard Worker
1713*9880d681SAndroid Build Coastguard Workerdefm VST1d8wb  : VST1DWB<{0,0,0,?}, "8",  addrmode6align64>;
1714*9880d681SAndroid Build Coastguard Workerdefm VST1d16wb : VST1DWB<{0,1,0,?}, "16", addrmode6align64>;
1715*9880d681SAndroid Build Coastguard Workerdefm VST1d32wb : VST1DWB<{1,0,0,?}, "32", addrmode6align64>;
1716*9880d681SAndroid Build Coastguard Workerdefm VST1d64wb : VST1DWB<{1,1,0,?}, "64", addrmode6align64>;
1717*9880d681SAndroid Build Coastguard Worker
1718*9880d681SAndroid Build Coastguard Workerdefm VST1q8wb  : VST1QWB<{0,0,?,?}, "8",  addrmode6align64or128>;
1719*9880d681SAndroid Build Coastguard Workerdefm VST1q16wb : VST1QWB<{0,1,?,?}, "16", addrmode6align64or128>;
1720*9880d681SAndroid Build Coastguard Workerdefm VST1q32wb : VST1QWB<{1,0,?,?}, "32", addrmode6align64or128>;
1721*9880d681SAndroid Build Coastguard Workerdefm VST1q64wb : VST1QWB<{1,1,?,?}, "64", addrmode6align64or128>;
1722*9880d681SAndroid Build Coastguard Worker
1723*9880d681SAndroid Build Coastguard Worker// ...with 3 registers
1724*9880d681SAndroid Build Coastguard Workerclass VST1D3<bits<4> op7_4, string Dt, Operand AddrMode>
1725*9880d681SAndroid Build Coastguard Worker  : NLdSt<0, 0b00, 0b0110, op7_4, (outs),
1726*9880d681SAndroid Build Coastguard Worker          (ins AddrMode:$Rn, VecListThreeD:$Vd),
1727*9880d681SAndroid Build Coastguard Worker          IIC_VST1x3, "vst1", Dt, "$Vd, $Rn", "", []> {
1728*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
1729*9880d681SAndroid Build Coastguard Worker  let Inst{4} = Rn{4};
1730*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLDST1Instruction";
1731*9880d681SAndroid Build Coastguard Worker}
1732*9880d681SAndroid Build Coastguard Workermulticlass VST1D3WB<bits<4> op7_4, string Dt, Operand AddrMode> {
1733*9880d681SAndroid Build Coastguard Worker  def _fixed : NLdSt<0,0b00,0b0110,op7_4, (outs GPR:$wb),
1734*9880d681SAndroid Build Coastguard Worker                    (ins AddrMode:$Rn, VecListThreeD:$Vd), IIC_VLD1x3u,
1735*9880d681SAndroid Build Coastguard Worker                     "vst1", Dt, "$Vd, $Rn!",
1736*9880d681SAndroid Build Coastguard Worker                     "$Rn.addr = $wb", []> {
1737*9880d681SAndroid Build Coastguard Worker    let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
1738*9880d681SAndroid Build Coastguard Worker    let Inst{5-4} = Rn{5-4};
1739*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLDST1Instruction";
1740*9880d681SAndroid Build Coastguard Worker  }
1741*9880d681SAndroid Build Coastguard Worker  def _register : NLdSt<0,0b00,0b0110,op7_4, (outs GPR:$wb),
1742*9880d681SAndroid Build Coastguard Worker                        (ins AddrMode:$Rn, rGPR:$Rm, VecListThreeD:$Vd),
1743*9880d681SAndroid Build Coastguard Worker                        IIC_VLD1x3u,
1744*9880d681SAndroid Build Coastguard Worker                        "vst1", Dt, "$Vd, $Rn, $Rm",
1745*9880d681SAndroid Build Coastguard Worker                        "$Rn.addr = $wb", []> {
1746*9880d681SAndroid Build Coastguard Worker    let Inst{5-4} = Rn{5-4};
1747*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLDST1Instruction";
1748*9880d681SAndroid Build Coastguard Worker  }
1749*9880d681SAndroid Build Coastguard Worker}
1750*9880d681SAndroid Build Coastguard Worker
1751*9880d681SAndroid Build Coastguard Workerdef VST1d8T     : VST1D3<{0,0,0,?}, "8",  addrmode6align64>;
1752*9880d681SAndroid Build Coastguard Workerdef VST1d16T    : VST1D3<{0,1,0,?}, "16", addrmode6align64>;
1753*9880d681SAndroid Build Coastguard Workerdef VST1d32T    : VST1D3<{1,0,0,?}, "32", addrmode6align64>;
1754*9880d681SAndroid Build Coastguard Workerdef VST1d64T    : VST1D3<{1,1,0,?}, "64", addrmode6align64>;
1755*9880d681SAndroid Build Coastguard Worker
1756*9880d681SAndroid Build Coastguard Workerdefm VST1d8Twb  : VST1D3WB<{0,0,0,?}, "8",  addrmode6align64>;
1757*9880d681SAndroid Build Coastguard Workerdefm VST1d16Twb : VST1D3WB<{0,1,0,?}, "16", addrmode6align64>;
1758*9880d681SAndroid Build Coastguard Workerdefm VST1d32Twb : VST1D3WB<{1,0,0,?}, "32", addrmode6align64>;
1759*9880d681SAndroid Build Coastguard Workerdefm VST1d64Twb : VST1D3WB<{1,1,0,?}, "64", addrmode6align64>;
1760*9880d681SAndroid Build Coastguard Worker
1761*9880d681SAndroid Build Coastguard Workerdef VST1d64TPseudo            : VSTQQPseudo<IIC_VST1x3>;
1762*9880d681SAndroid Build Coastguard Workerdef VST1d64TPseudoWB_fixed    : VSTQQWBfixedPseudo<IIC_VST1x3u>;
1763*9880d681SAndroid Build Coastguard Workerdef VST1d64TPseudoWB_register : VSTQQWBPseudo<IIC_VST1x3u>;
1764*9880d681SAndroid Build Coastguard Worker
1765*9880d681SAndroid Build Coastguard Worker// ...with 4 registers
1766*9880d681SAndroid Build Coastguard Workerclass VST1D4<bits<4> op7_4, string Dt, Operand AddrMode>
1767*9880d681SAndroid Build Coastguard Worker  : NLdSt<0, 0b00, 0b0010, op7_4, (outs),
1768*9880d681SAndroid Build Coastguard Worker          (ins AddrMode:$Rn, VecListFourD:$Vd),
1769*9880d681SAndroid Build Coastguard Worker          IIC_VST1x4, "vst1", Dt, "$Vd, $Rn", "",
1770*9880d681SAndroid Build Coastguard Worker          []> {
1771*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
1772*9880d681SAndroid Build Coastguard Worker  let Inst{5-4} = Rn{5-4};
1773*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLDST1Instruction";
1774*9880d681SAndroid Build Coastguard Worker}
1775*9880d681SAndroid Build Coastguard Workermulticlass VST1D4WB<bits<4> op7_4, string Dt, Operand AddrMode> {
1776*9880d681SAndroid Build Coastguard Worker  def _fixed : NLdSt<0,0b00,0b0010,op7_4, (outs GPR:$wb),
1777*9880d681SAndroid Build Coastguard Worker                    (ins AddrMode:$Rn, VecListFourD:$Vd), IIC_VLD1x4u,
1778*9880d681SAndroid Build Coastguard Worker                     "vst1", Dt, "$Vd, $Rn!",
1779*9880d681SAndroid Build Coastguard Worker                     "$Rn.addr = $wb", []> {
1780*9880d681SAndroid Build Coastguard Worker    let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
1781*9880d681SAndroid Build Coastguard Worker    let Inst{5-4} = Rn{5-4};
1782*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLDST1Instruction";
1783*9880d681SAndroid Build Coastguard Worker  }
1784*9880d681SAndroid Build Coastguard Worker  def _register : NLdSt<0,0b00,0b0010,op7_4, (outs GPR:$wb),
1785*9880d681SAndroid Build Coastguard Worker                        (ins AddrMode:$Rn, rGPR:$Rm, VecListFourD:$Vd),
1786*9880d681SAndroid Build Coastguard Worker                        IIC_VLD1x4u,
1787*9880d681SAndroid Build Coastguard Worker                        "vst1", Dt, "$Vd, $Rn, $Rm",
1788*9880d681SAndroid Build Coastguard Worker                        "$Rn.addr = $wb", []> {
1789*9880d681SAndroid Build Coastguard Worker    let Inst{5-4} = Rn{5-4};
1790*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLDST1Instruction";
1791*9880d681SAndroid Build Coastguard Worker  }
1792*9880d681SAndroid Build Coastguard Worker}
1793*9880d681SAndroid Build Coastguard Worker
1794*9880d681SAndroid Build Coastguard Workerdef VST1d8Q     : VST1D4<{0,0,?,?}, "8",  addrmode6align64or128or256>;
1795*9880d681SAndroid Build Coastguard Workerdef VST1d16Q    : VST1D4<{0,1,?,?}, "16", addrmode6align64or128or256>;
1796*9880d681SAndroid Build Coastguard Workerdef VST1d32Q    : VST1D4<{1,0,?,?}, "32", addrmode6align64or128or256>;
1797*9880d681SAndroid Build Coastguard Workerdef VST1d64Q    : VST1D4<{1,1,?,?}, "64", addrmode6align64or128or256>;
1798*9880d681SAndroid Build Coastguard Worker
1799*9880d681SAndroid Build Coastguard Workerdefm VST1d8Qwb  : VST1D4WB<{0,0,?,?}, "8",  addrmode6align64or128or256>;
1800*9880d681SAndroid Build Coastguard Workerdefm VST1d16Qwb : VST1D4WB<{0,1,?,?}, "16", addrmode6align64or128or256>;
1801*9880d681SAndroid Build Coastguard Workerdefm VST1d32Qwb : VST1D4WB<{1,0,?,?}, "32", addrmode6align64or128or256>;
1802*9880d681SAndroid Build Coastguard Workerdefm VST1d64Qwb : VST1D4WB<{1,1,?,?}, "64", addrmode6align64or128or256>;
1803*9880d681SAndroid Build Coastguard Worker
1804*9880d681SAndroid Build Coastguard Workerdef VST1d64QPseudo            : VSTQQPseudo<IIC_VST1x4>;
1805*9880d681SAndroid Build Coastguard Workerdef VST1d64QPseudoWB_fixed    : VSTQQWBfixedPseudo<IIC_VST1x4u>;
1806*9880d681SAndroid Build Coastguard Workerdef VST1d64QPseudoWB_register : VSTQQWBPseudo<IIC_VST1x4u>;
1807*9880d681SAndroid Build Coastguard Worker
1808*9880d681SAndroid Build Coastguard Worker//   VST2     : Vector Store (multiple 2-element structures)
1809*9880d681SAndroid Build Coastguard Workerclass VST2<bits<4> op11_8, bits<4> op7_4, string Dt, RegisterOperand VdTy,
1810*9880d681SAndroid Build Coastguard Worker            InstrItinClass itin, Operand AddrMode>
1811*9880d681SAndroid Build Coastguard Worker  : NLdSt<0, 0b00, op11_8, op7_4, (outs), (ins AddrMode:$Rn, VdTy:$Vd),
1812*9880d681SAndroid Build Coastguard Worker          itin, "vst2", Dt, "$Vd, $Rn", "", []> {
1813*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
1814*9880d681SAndroid Build Coastguard Worker  let Inst{5-4} = Rn{5-4};
1815*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLDST2Instruction";
1816*9880d681SAndroid Build Coastguard Worker}
1817*9880d681SAndroid Build Coastguard Worker
1818*9880d681SAndroid Build Coastguard Workerdef  VST2d8   : VST2<0b1000, {0,0,?,?}, "8",  VecListDPair, IIC_VST2,
1819*9880d681SAndroid Build Coastguard Worker                     addrmode6align64or128>;
1820*9880d681SAndroid Build Coastguard Workerdef  VST2d16  : VST2<0b1000, {0,1,?,?}, "16", VecListDPair, IIC_VST2,
1821*9880d681SAndroid Build Coastguard Worker                     addrmode6align64or128>;
1822*9880d681SAndroid Build Coastguard Workerdef  VST2d32  : VST2<0b1000, {1,0,?,?}, "32", VecListDPair, IIC_VST2,
1823*9880d681SAndroid Build Coastguard Worker                     addrmode6align64or128>;
1824*9880d681SAndroid Build Coastguard Worker
1825*9880d681SAndroid Build Coastguard Workerdef  VST2q8   : VST2<0b0011, {0,0,?,?}, "8",  VecListFourD, IIC_VST2x2,
1826*9880d681SAndroid Build Coastguard Worker                     addrmode6align64or128or256>;
1827*9880d681SAndroid Build Coastguard Workerdef  VST2q16  : VST2<0b0011, {0,1,?,?}, "16", VecListFourD, IIC_VST2x2,
1828*9880d681SAndroid Build Coastguard Worker                     addrmode6align64or128or256>;
1829*9880d681SAndroid Build Coastguard Workerdef  VST2q32  : VST2<0b0011, {1,0,?,?}, "32", VecListFourD, IIC_VST2x2,
1830*9880d681SAndroid Build Coastguard Worker                     addrmode6align64or128or256>;
1831*9880d681SAndroid Build Coastguard Worker
1832*9880d681SAndroid Build Coastguard Workerdef  VST2q8Pseudo  : VSTQQPseudo<IIC_VST2x2>;
1833*9880d681SAndroid Build Coastguard Workerdef  VST2q16Pseudo : VSTQQPseudo<IIC_VST2x2>;
1834*9880d681SAndroid Build Coastguard Workerdef  VST2q32Pseudo : VSTQQPseudo<IIC_VST2x2>;
1835*9880d681SAndroid Build Coastguard Worker
1836*9880d681SAndroid Build Coastguard Worker// ...with address register writeback:
1837*9880d681SAndroid Build Coastguard Workermulticlass VST2DWB<bits<4> op11_8, bits<4> op7_4, string Dt,
1838*9880d681SAndroid Build Coastguard Worker                   RegisterOperand VdTy, Operand AddrMode> {
1839*9880d681SAndroid Build Coastguard Worker  def _fixed : NLdSt<0, 0b00, op11_8, op7_4, (outs GPR:$wb),
1840*9880d681SAndroid Build Coastguard Worker                     (ins AddrMode:$Rn, VdTy:$Vd), IIC_VLD1u,
1841*9880d681SAndroid Build Coastguard Worker                     "vst2", Dt, "$Vd, $Rn!",
1842*9880d681SAndroid Build Coastguard Worker                     "$Rn.addr = $wb", []> {
1843*9880d681SAndroid Build Coastguard Worker    let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
1844*9880d681SAndroid Build Coastguard Worker    let Inst{5-4} = Rn{5-4};
1845*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLDST2Instruction";
1846*9880d681SAndroid Build Coastguard Worker  }
1847*9880d681SAndroid Build Coastguard Worker  def _register : NLdSt<0, 0b00, op11_8, op7_4, (outs GPR:$wb),
1848*9880d681SAndroid Build Coastguard Worker                        (ins AddrMode:$Rn, rGPR:$Rm, VdTy:$Vd), IIC_VLD1u,
1849*9880d681SAndroid Build Coastguard Worker                        "vst2", Dt, "$Vd, $Rn, $Rm",
1850*9880d681SAndroid Build Coastguard Worker                        "$Rn.addr = $wb", []> {
1851*9880d681SAndroid Build Coastguard Worker    let Inst{5-4} = Rn{5-4};
1852*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLDST2Instruction";
1853*9880d681SAndroid Build Coastguard Worker  }
1854*9880d681SAndroid Build Coastguard Worker}
1855*9880d681SAndroid Build Coastguard Workermulticlass VST2QWB<bits<4> op7_4, string Dt, Operand AddrMode> {
1856*9880d681SAndroid Build Coastguard Worker  def _fixed : NLdSt<0, 0b00, 0b0011, op7_4, (outs GPR:$wb),
1857*9880d681SAndroid Build Coastguard Worker                     (ins AddrMode:$Rn, VecListFourD:$Vd), IIC_VLD1u,
1858*9880d681SAndroid Build Coastguard Worker                     "vst2", Dt, "$Vd, $Rn!",
1859*9880d681SAndroid Build Coastguard Worker                     "$Rn.addr = $wb", []> {
1860*9880d681SAndroid Build Coastguard Worker    let Rm = 0b1101; // NLdSt will assign to the right encoding bits.
1861*9880d681SAndroid Build Coastguard Worker    let Inst{5-4} = Rn{5-4};
1862*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLDST2Instruction";
1863*9880d681SAndroid Build Coastguard Worker  }
1864*9880d681SAndroid Build Coastguard Worker  def _register : NLdSt<0, 0b00, 0b0011, op7_4, (outs GPR:$wb),
1865*9880d681SAndroid Build Coastguard Worker                        (ins AddrMode:$Rn, rGPR:$Rm, VecListFourD:$Vd),
1866*9880d681SAndroid Build Coastguard Worker                        IIC_VLD1u,
1867*9880d681SAndroid Build Coastguard Worker                        "vst2", Dt, "$Vd, $Rn, $Rm",
1868*9880d681SAndroid Build Coastguard Worker                        "$Rn.addr = $wb", []> {
1869*9880d681SAndroid Build Coastguard Worker    let Inst{5-4} = Rn{5-4};
1870*9880d681SAndroid Build Coastguard Worker    let DecoderMethod = "DecodeVLDST2Instruction";
1871*9880d681SAndroid Build Coastguard Worker  }
1872*9880d681SAndroid Build Coastguard Worker}
1873*9880d681SAndroid Build Coastguard Worker
1874*9880d681SAndroid Build Coastguard Workerdefm VST2d8wb    : VST2DWB<0b1000, {0,0,?,?}, "8",  VecListDPair,
1875*9880d681SAndroid Build Coastguard Worker                           addrmode6align64or128>;
1876*9880d681SAndroid Build Coastguard Workerdefm VST2d16wb   : VST2DWB<0b1000, {0,1,?,?}, "16", VecListDPair,
1877*9880d681SAndroid Build Coastguard Worker                           addrmode6align64or128>;
1878*9880d681SAndroid Build Coastguard Workerdefm VST2d32wb   : VST2DWB<0b1000, {1,0,?,?}, "32", VecListDPair,
1879*9880d681SAndroid Build Coastguard Worker                           addrmode6align64or128>;
1880*9880d681SAndroid Build Coastguard Worker
1881*9880d681SAndroid Build Coastguard Workerdefm VST2q8wb    : VST2QWB<{0,0,?,?}, "8", addrmode6align64or128or256>;
1882*9880d681SAndroid Build Coastguard Workerdefm VST2q16wb   : VST2QWB<{0,1,?,?}, "16", addrmode6align64or128or256>;
1883*9880d681SAndroid Build Coastguard Workerdefm VST2q32wb   : VST2QWB<{1,0,?,?}, "32", addrmode6align64or128or256>;
1884*9880d681SAndroid Build Coastguard Worker
1885*9880d681SAndroid Build Coastguard Workerdef VST2q8PseudoWB_fixed     : VSTQQWBfixedPseudo<IIC_VST2x2u>;
1886*9880d681SAndroid Build Coastguard Workerdef VST2q16PseudoWB_fixed    : VSTQQWBfixedPseudo<IIC_VST2x2u>;
1887*9880d681SAndroid Build Coastguard Workerdef VST2q32PseudoWB_fixed    : VSTQQWBfixedPseudo<IIC_VST2x2u>;
1888*9880d681SAndroid Build Coastguard Workerdef VST2q8PseudoWB_register  : VSTQQWBregisterPseudo<IIC_VST2x2u>;
1889*9880d681SAndroid Build Coastguard Workerdef VST2q16PseudoWB_register : VSTQQWBregisterPseudo<IIC_VST2x2u>;
1890*9880d681SAndroid Build Coastguard Workerdef VST2q32PseudoWB_register : VSTQQWBregisterPseudo<IIC_VST2x2u>;
1891*9880d681SAndroid Build Coastguard Worker
1892*9880d681SAndroid Build Coastguard Worker// ...with double-spaced registers
1893*9880d681SAndroid Build Coastguard Workerdef VST2b8      : VST2<0b1001, {0,0,?,?}, "8",  VecListDPairSpaced, IIC_VST2,
1894*9880d681SAndroid Build Coastguard Worker                      addrmode6align64or128>;
1895*9880d681SAndroid Build Coastguard Workerdef VST2b16     : VST2<0b1001, {0,1,?,?}, "16", VecListDPairSpaced, IIC_VST2,
1896*9880d681SAndroid Build Coastguard Worker                      addrmode6align64or128>;
1897*9880d681SAndroid Build Coastguard Workerdef VST2b32     : VST2<0b1001, {1,0,?,?}, "32", VecListDPairSpaced, IIC_VST2,
1898*9880d681SAndroid Build Coastguard Worker                      addrmode6align64or128>;
1899*9880d681SAndroid Build Coastguard Workerdefm VST2b8wb   : VST2DWB<0b1001, {0,0,?,?}, "8",  VecListDPairSpaced,
1900*9880d681SAndroid Build Coastguard Worker                          addrmode6align64or128>;
1901*9880d681SAndroid Build Coastguard Workerdefm VST2b16wb  : VST2DWB<0b1001, {0,1,?,?}, "16", VecListDPairSpaced,
1902*9880d681SAndroid Build Coastguard Worker                          addrmode6align64or128>;
1903*9880d681SAndroid Build Coastguard Workerdefm VST2b32wb  : VST2DWB<0b1001, {1,0,?,?}, "32", VecListDPairSpaced,
1904*9880d681SAndroid Build Coastguard Worker                          addrmode6align64or128>;
1905*9880d681SAndroid Build Coastguard Worker
1906*9880d681SAndroid Build Coastguard Worker//   VST3     : Vector Store (multiple 3-element structures)
1907*9880d681SAndroid Build Coastguard Workerclass VST3D<bits<4> op11_8, bits<4> op7_4, string Dt>
1908*9880d681SAndroid Build Coastguard Worker  : NLdSt<0, 0b00, op11_8, op7_4, (outs),
1909*9880d681SAndroid Build Coastguard Worker          (ins addrmode6:$Rn, DPR:$Vd, DPR:$src2, DPR:$src3), IIC_VST3,
1910*9880d681SAndroid Build Coastguard Worker          "vst3", Dt, "\\{$Vd, $src2, $src3\\}, $Rn", "", []> {
1911*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
1912*9880d681SAndroid Build Coastguard Worker  let Inst{4} = Rn{4};
1913*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLDST3Instruction";
1914*9880d681SAndroid Build Coastguard Worker}
1915*9880d681SAndroid Build Coastguard Worker
1916*9880d681SAndroid Build Coastguard Workerdef  VST3d8   : VST3D<0b0100, {0,0,0,?}, "8">;
1917*9880d681SAndroid Build Coastguard Workerdef  VST3d16  : VST3D<0b0100, {0,1,0,?}, "16">;
1918*9880d681SAndroid Build Coastguard Workerdef  VST3d32  : VST3D<0b0100, {1,0,0,?}, "32">;
1919*9880d681SAndroid Build Coastguard Worker
1920*9880d681SAndroid Build Coastguard Workerdef  VST3d8Pseudo  : VSTQQPseudo<IIC_VST3>;
1921*9880d681SAndroid Build Coastguard Workerdef  VST3d16Pseudo : VSTQQPseudo<IIC_VST3>;
1922*9880d681SAndroid Build Coastguard Workerdef  VST3d32Pseudo : VSTQQPseudo<IIC_VST3>;
1923*9880d681SAndroid Build Coastguard Worker
1924*9880d681SAndroid Build Coastguard Worker// ...with address register writeback:
1925*9880d681SAndroid Build Coastguard Workerclass VST3DWB<bits<4> op11_8, bits<4> op7_4, string Dt>
1926*9880d681SAndroid Build Coastguard Worker  : NLdSt<0, 0b00, op11_8, op7_4, (outs GPR:$wb),
1927*9880d681SAndroid Build Coastguard Worker          (ins addrmode6:$Rn, am6offset:$Rm,
1928*9880d681SAndroid Build Coastguard Worker           DPR:$Vd, DPR:$src2, DPR:$src3), IIC_VST3u,
1929*9880d681SAndroid Build Coastguard Worker          "vst3", Dt, "\\{$Vd, $src2, $src3\\}, $Rn$Rm",
1930*9880d681SAndroid Build Coastguard Worker          "$Rn.addr = $wb", []> {
1931*9880d681SAndroid Build Coastguard Worker  let Inst{4} = Rn{4};
1932*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLDST3Instruction";
1933*9880d681SAndroid Build Coastguard Worker}
1934*9880d681SAndroid Build Coastguard Worker
1935*9880d681SAndroid Build Coastguard Workerdef VST3d8_UPD  : VST3DWB<0b0100, {0,0,0,?}, "8">;
1936*9880d681SAndroid Build Coastguard Workerdef VST3d16_UPD : VST3DWB<0b0100, {0,1,0,?}, "16">;
1937*9880d681SAndroid Build Coastguard Workerdef VST3d32_UPD : VST3DWB<0b0100, {1,0,0,?}, "32">;
1938*9880d681SAndroid Build Coastguard Worker
1939*9880d681SAndroid Build Coastguard Workerdef VST3d8Pseudo_UPD  : VSTQQWBPseudo<IIC_VST3u>;
1940*9880d681SAndroid Build Coastguard Workerdef VST3d16Pseudo_UPD : VSTQQWBPseudo<IIC_VST3u>;
1941*9880d681SAndroid Build Coastguard Workerdef VST3d32Pseudo_UPD : VSTQQWBPseudo<IIC_VST3u>;
1942*9880d681SAndroid Build Coastguard Worker
1943*9880d681SAndroid Build Coastguard Worker// ...with double-spaced registers:
1944*9880d681SAndroid Build Coastguard Workerdef VST3q8      : VST3D<0b0101, {0,0,0,?}, "8">;
1945*9880d681SAndroid Build Coastguard Workerdef VST3q16     : VST3D<0b0101, {0,1,0,?}, "16">;
1946*9880d681SAndroid Build Coastguard Workerdef VST3q32     : VST3D<0b0101, {1,0,0,?}, "32">;
1947*9880d681SAndroid Build Coastguard Workerdef VST3q8_UPD  : VST3DWB<0b0101, {0,0,0,?}, "8">;
1948*9880d681SAndroid Build Coastguard Workerdef VST3q16_UPD : VST3DWB<0b0101, {0,1,0,?}, "16">;
1949*9880d681SAndroid Build Coastguard Workerdef VST3q32_UPD : VST3DWB<0b0101, {1,0,0,?}, "32">;
1950*9880d681SAndroid Build Coastguard Worker
1951*9880d681SAndroid Build Coastguard Workerdef VST3q8Pseudo_UPD  : VSTQQQQWBPseudo<IIC_VST3u>;
1952*9880d681SAndroid Build Coastguard Workerdef VST3q16Pseudo_UPD : VSTQQQQWBPseudo<IIC_VST3u>;
1953*9880d681SAndroid Build Coastguard Workerdef VST3q32Pseudo_UPD : VSTQQQQWBPseudo<IIC_VST3u>;
1954*9880d681SAndroid Build Coastguard Worker
1955*9880d681SAndroid Build Coastguard Worker// ...alternate versions to be allocated odd register numbers:
1956*9880d681SAndroid Build Coastguard Workerdef VST3q8oddPseudo   : VSTQQQQPseudo<IIC_VST3>;
1957*9880d681SAndroid Build Coastguard Workerdef VST3q16oddPseudo  : VSTQQQQPseudo<IIC_VST3>;
1958*9880d681SAndroid Build Coastguard Workerdef VST3q32oddPseudo  : VSTQQQQPseudo<IIC_VST3>;
1959*9880d681SAndroid Build Coastguard Worker
1960*9880d681SAndroid Build Coastguard Workerdef VST3q8oddPseudo_UPD  : VSTQQQQWBPseudo<IIC_VST3u>;
1961*9880d681SAndroid Build Coastguard Workerdef VST3q16oddPseudo_UPD : VSTQQQQWBPseudo<IIC_VST3u>;
1962*9880d681SAndroid Build Coastguard Workerdef VST3q32oddPseudo_UPD : VSTQQQQWBPseudo<IIC_VST3u>;
1963*9880d681SAndroid Build Coastguard Worker
1964*9880d681SAndroid Build Coastguard Worker//   VST4     : Vector Store (multiple 4-element structures)
1965*9880d681SAndroid Build Coastguard Workerclass VST4D<bits<4> op11_8, bits<4> op7_4, string Dt>
1966*9880d681SAndroid Build Coastguard Worker  : NLdSt<0, 0b00, op11_8, op7_4, (outs),
1967*9880d681SAndroid Build Coastguard Worker          (ins addrmode6:$Rn, DPR:$Vd, DPR:$src2, DPR:$src3, DPR:$src4),
1968*9880d681SAndroid Build Coastguard Worker          IIC_VST4, "vst4", Dt, "\\{$Vd, $src2, $src3, $src4\\}, $Rn",
1969*9880d681SAndroid Build Coastguard Worker          "", []> {
1970*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
1971*9880d681SAndroid Build Coastguard Worker  let Inst{5-4} = Rn{5-4};
1972*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLDST4Instruction";
1973*9880d681SAndroid Build Coastguard Worker}
1974*9880d681SAndroid Build Coastguard Worker
1975*9880d681SAndroid Build Coastguard Workerdef  VST4d8   : VST4D<0b0000, {0,0,?,?}, "8">;
1976*9880d681SAndroid Build Coastguard Workerdef  VST4d16  : VST4D<0b0000, {0,1,?,?}, "16">;
1977*9880d681SAndroid Build Coastguard Workerdef  VST4d32  : VST4D<0b0000, {1,0,?,?}, "32">;
1978*9880d681SAndroid Build Coastguard Worker
1979*9880d681SAndroid Build Coastguard Workerdef  VST4d8Pseudo  : VSTQQPseudo<IIC_VST4>;
1980*9880d681SAndroid Build Coastguard Workerdef  VST4d16Pseudo : VSTQQPseudo<IIC_VST4>;
1981*9880d681SAndroid Build Coastguard Workerdef  VST4d32Pseudo : VSTQQPseudo<IIC_VST4>;
1982*9880d681SAndroid Build Coastguard Worker
1983*9880d681SAndroid Build Coastguard Worker// ...with address register writeback:
1984*9880d681SAndroid Build Coastguard Workerclass VST4DWB<bits<4> op11_8, bits<4> op7_4, string Dt>
1985*9880d681SAndroid Build Coastguard Worker  : NLdSt<0, 0b00, op11_8, op7_4, (outs GPR:$wb),
1986*9880d681SAndroid Build Coastguard Worker          (ins addrmode6:$Rn, am6offset:$Rm,
1987*9880d681SAndroid Build Coastguard Worker           DPR:$Vd, DPR:$src2, DPR:$src3, DPR:$src4), IIC_VST4u,
1988*9880d681SAndroid Build Coastguard Worker           "vst4", Dt, "\\{$Vd, $src2, $src3, $src4\\}, $Rn$Rm",
1989*9880d681SAndroid Build Coastguard Worker          "$Rn.addr = $wb", []> {
1990*9880d681SAndroid Build Coastguard Worker  let Inst{5-4} = Rn{5-4};
1991*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVLDST4Instruction";
1992*9880d681SAndroid Build Coastguard Worker}
1993*9880d681SAndroid Build Coastguard Worker
1994*9880d681SAndroid Build Coastguard Workerdef VST4d8_UPD  : VST4DWB<0b0000, {0,0,?,?}, "8">;
1995*9880d681SAndroid Build Coastguard Workerdef VST4d16_UPD : VST4DWB<0b0000, {0,1,?,?}, "16">;
1996*9880d681SAndroid Build Coastguard Workerdef VST4d32_UPD : VST4DWB<0b0000, {1,0,?,?}, "32">;
1997*9880d681SAndroid Build Coastguard Worker
1998*9880d681SAndroid Build Coastguard Workerdef VST4d8Pseudo_UPD  : VSTQQWBPseudo<IIC_VST4u>;
1999*9880d681SAndroid Build Coastguard Workerdef VST4d16Pseudo_UPD : VSTQQWBPseudo<IIC_VST4u>;
2000*9880d681SAndroid Build Coastguard Workerdef VST4d32Pseudo_UPD : VSTQQWBPseudo<IIC_VST4u>;
2001*9880d681SAndroid Build Coastguard Worker
2002*9880d681SAndroid Build Coastguard Worker// ...with double-spaced registers:
2003*9880d681SAndroid Build Coastguard Workerdef VST4q8      : VST4D<0b0001, {0,0,?,?}, "8">;
2004*9880d681SAndroid Build Coastguard Workerdef VST4q16     : VST4D<0b0001, {0,1,?,?}, "16">;
2005*9880d681SAndroid Build Coastguard Workerdef VST4q32     : VST4D<0b0001, {1,0,?,?}, "32">;
2006*9880d681SAndroid Build Coastguard Workerdef VST4q8_UPD  : VST4DWB<0b0001, {0,0,?,?}, "8">;
2007*9880d681SAndroid Build Coastguard Workerdef VST4q16_UPD : VST4DWB<0b0001, {0,1,?,?}, "16">;
2008*9880d681SAndroid Build Coastguard Workerdef VST4q32_UPD : VST4DWB<0b0001, {1,0,?,?}, "32">;
2009*9880d681SAndroid Build Coastguard Worker
2010*9880d681SAndroid Build Coastguard Workerdef VST4q8Pseudo_UPD  : VSTQQQQWBPseudo<IIC_VST4u>;
2011*9880d681SAndroid Build Coastguard Workerdef VST4q16Pseudo_UPD : VSTQQQQWBPseudo<IIC_VST4u>;
2012*9880d681SAndroid Build Coastguard Workerdef VST4q32Pseudo_UPD : VSTQQQQWBPseudo<IIC_VST4u>;
2013*9880d681SAndroid Build Coastguard Worker
2014*9880d681SAndroid Build Coastguard Worker// ...alternate versions to be allocated odd register numbers:
2015*9880d681SAndroid Build Coastguard Workerdef VST4q8oddPseudo   : VSTQQQQPseudo<IIC_VST4>;
2016*9880d681SAndroid Build Coastguard Workerdef VST4q16oddPseudo  : VSTQQQQPseudo<IIC_VST4>;
2017*9880d681SAndroid Build Coastguard Workerdef VST4q32oddPseudo  : VSTQQQQPseudo<IIC_VST4>;
2018*9880d681SAndroid Build Coastguard Worker
2019*9880d681SAndroid Build Coastguard Workerdef VST4q8oddPseudo_UPD  : VSTQQQQWBPseudo<IIC_VST4u>;
2020*9880d681SAndroid Build Coastguard Workerdef VST4q16oddPseudo_UPD : VSTQQQQWBPseudo<IIC_VST4u>;
2021*9880d681SAndroid Build Coastguard Workerdef VST4q32oddPseudo_UPD : VSTQQQQWBPseudo<IIC_VST4u>;
2022*9880d681SAndroid Build Coastguard Worker
2023*9880d681SAndroid Build Coastguard Worker} // mayStore = 1, hasSideEffects = 0, hasExtraSrcRegAllocReq = 1
2024*9880d681SAndroid Build Coastguard Worker
2025*9880d681SAndroid Build Coastguard Worker// Classes for VST*LN pseudo-instructions with multi-register operands.
2026*9880d681SAndroid Build Coastguard Worker// These are expanded to real instructions after register allocation.
2027*9880d681SAndroid Build Coastguard Workerclass VSTQLNPseudo<InstrItinClass itin>
2028*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs), (ins addrmode6:$addr, QPR:$src, nohash_imm:$lane),
2029*9880d681SAndroid Build Coastguard Worker                itin, "">;
2030*9880d681SAndroid Build Coastguard Workerclass VSTQLNWBPseudo<InstrItinClass itin>
2031*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs GPR:$wb),
2032*9880d681SAndroid Build Coastguard Worker                (ins addrmode6:$addr, am6offset:$offset, QPR:$src,
2033*9880d681SAndroid Build Coastguard Worker                 nohash_imm:$lane), itin, "$addr.addr = $wb">;
2034*9880d681SAndroid Build Coastguard Workerclass VSTQQLNPseudo<InstrItinClass itin>
2035*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs), (ins addrmode6:$addr, QQPR:$src, nohash_imm:$lane),
2036*9880d681SAndroid Build Coastguard Worker                itin, "">;
2037*9880d681SAndroid Build Coastguard Workerclass VSTQQLNWBPseudo<InstrItinClass itin>
2038*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs GPR:$wb),
2039*9880d681SAndroid Build Coastguard Worker                (ins addrmode6:$addr, am6offset:$offset, QQPR:$src,
2040*9880d681SAndroid Build Coastguard Worker                 nohash_imm:$lane), itin, "$addr.addr = $wb">;
2041*9880d681SAndroid Build Coastguard Workerclass VSTQQQQLNPseudo<InstrItinClass itin>
2042*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs), (ins addrmode6:$addr, QQQQPR:$src, nohash_imm:$lane),
2043*9880d681SAndroid Build Coastguard Worker                itin, "">;
2044*9880d681SAndroid Build Coastguard Workerclass VSTQQQQLNWBPseudo<InstrItinClass itin>
2045*9880d681SAndroid Build Coastguard Worker  : PseudoNLdSt<(outs GPR:$wb),
2046*9880d681SAndroid Build Coastguard Worker                (ins addrmode6:$addr, am6offset:$offset, QQQQPR:$src,
2047*9880d681SAndroid Build Coastguard Worker                 nohash_imm:$lane), itin, "$addr.addr = $wb">;
2048*9880d681SAndroid Build Coastguard Worker
2049*9880d681SAndroid Build Coastguard Worker//   VST1LN   : Vector Store (single element from one lane)
2050*9880d681SAndroid Build Coastguard Workerclass VST1LN<bits<4> op11_8, bits<4> op7_4, string Dt, ValueType Ty,
2051*9880d681SAndroid Build Coastguard Worker             PatFrag StoreOp, SDNode ExtractOp, Operand AddrMode>
2052*9880d681SAndroid Build Coastguard Worker  : NLdStLn<1, 0b00, op11_8, op7_4, (outs),
2053*9880d681SAndroid Build Coastguard Worker          (ins AddrMode:$Rn, DPR:$Vd, nohash_imm:$lane),
2054*9880d681SAndroid Build Coastguard Worker          IIC_VST1ln, "vst1", Dt, "\\{$Vd[$lane]\\}, $Rn", "",
2055*9880d681SAndroid Build Coastguard Worker          [(StoreOp (ExtractOp (Ty DPR:$Vd), imm:$lane), AddrMode:$Rn)]> {
2056*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
2057*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVST1LN";
2058*9880d681SAndroid Build Coastguard Worker}
2059*9880d681SAndroid Build Coastguard Workerclass VST1QLNPseudo<ValueType Ty, PatFrag StoreOp, SDNode ExtractOp>
2060*9880d681SAndroid Build Coastguard Worker  : VSTQLNPseudo<IIC_VST1ln> {
2061*9880d681SAndroid Build Coastguard Worker  let Pattern = [(StoreOp (ExtractOp (Ty QPR:$src), imm:$lane),
2062*9880d681SAndroid Build Coastguard Worker                          addrmode6:$addr)];
2063*9880d681SAndroid Build Coastguard Worker}
2064*9880d681SAndroid Build Coastguard Worker
2065*9880d681SAndroid Build Coastguard Workerdef VST1LNd8  : VST1LN<0b0000, {?,?,?,0}, "8", v8i8, truncstorei8,
2066*9880d681SAndroid Build Coastguard Worker                       NEONvgetlaneu, addrmode6> {
2067*9880d681SAndroid Build Coastguard Worker  let Inst{7-5} = lane{2-0};
2068*9880d681SAndroid Build Coastguard Worker}
2069*9880d681SAndroid Build Coastguard Workerdef VST1LNd16 : VST1LN<0b0100, {?,?,0,?}, "16", v4i16, truncstorei16,
2070*9880d681SAndroid Build Coastguard Worker                       NEONvgetlaneu, addrmode6> {
2071*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
2072*9880d681SAndroid Build Coastguard Worker  let Inst{4}   = Rn{4};
2073*9880d681SAndroid Build Coastguard Worker}
2074*9880d681SAndroid Build Coastguard Worker
2075*9880d681SAndroid Build Coastguard Workerdef VST1LNd32 : VST1LN<0b1000, {?,0,?,?}, "32", v2i32, store, extractelt,
2076*9880d681SAndroid Build Coastguard Worker                       addrmode6oneL32> {
2077*9880d681SAndroid Build Coastguard Worker  let Inst{7}   = lane{0};
2078*9880d681SAndroid Build Coastguard Worker  let Inst{5-4} = Rn{5-4};
2079*9880d681SAndroid Build Coastguard Worker}
2080*9880d681SAndroid Build Coastguard Worker
2081*9880d681SAndroid Build Coastguard Workerdef VST1LNq8Pseudo  : VST1QLNPseudo<v16i8, truncstorei8, NEONvgetlaneu>;
2082*9880d681SAndroid Build Coastguard Workerdef VST1LNq16Pseudo : VST1QLNPseudo<v8i16, truncstorei16, NEONvgetlaneu>;
2083*9880d681SAndroid Build Coastguard Workerdef VST1LNq32Pseudo : VST1QLNPseudo<v4i32, store, extractelt>;
2084*9880d681SAndroid Build Coastguard Worker
2085*9880d681SAndroid Build Coastguard Workerdef : Pat<(store (extractelt (v2f32 DPR:$src), imm:$lane), addrmode6:$addr),
2086*9880d681SAndroid Build Coastguard Worker          (VST1LNd32 addrmode6:$addr, DPR:$src, imm:$lane)>;
2087*9880d681SAndroid Build Coastguard Workerdef : Pat<(store (extractelt (v4f32 QPR:$src), imm:$lane), addrmode6:$addr),
2088*9880d681SAndroid Build Coastguard Worker          (VST1LNq32Pseudo addrmode6:$addr, QPR:$src, imm:$lane)>;
2089*9880d681SAndroid Build Coastguard Worker
2090*9880d681SAndroid Build Coastguard Worker// ...with address register writeback:
2091*9880d681SAndroid Build Coastguard Workerclass VST1LNWB<bits<4> op11_8, bits<4> op7_4, string Dt, ValueType Ty,
2092*9880d681SAndroid Build Coastguard Worker               PatFrag StoreOp, SDNode ExtractOp, Operand AdrMode>
2093*9880d681SAndroid Build Coastguard Worker  : NLdStLn<1, 0b00, op11_8, op7_4, (outs GPR:$wb),
2094*9880d681SAndroid Build Coastguard Worker          (ins AdrMode:$Rn, am6offset:$Rm,
2095*9880d681SAndroid Build Coastguard Worker           DPR:$Vd, nohash_imm:$lane), IIC_VST1lnu, "vst1", Dt,
2096*9880d681SAndroid Build Coastguard Worker          "\\{$Vd[$lane]\\}, $Rn$Rm",
2097*9880d681SAndroid Build Coastguard Worker          "$Rn.addr = $wb",
2098*9880d681SAndroid Build Coastguard Worker          [(set GPR:$wb, (StoreOp (ExtractOp (Ty DPR:$Vd), imm:$lane),
2099*9880d681SAndroid Build Coastguard Worker                                  AdrMode:$Rn, am6offset:$Rm))]> {
2100*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVST1LN";
2101*9880d681SAndroid Build Coastguard Worker}
2102*9880d681SAndroid Build Coastguard Workerclass VST1QLNWBPseudo<ValueType Ty, PatFrag StoreOp, SDNode ExtractOp>
2103*9880d681SAndroid Build Coastguard Worker  : VSTQLNWBPseudo<IIC_VST1lnu> {
2104*9880d681SAndroid Build Coastguard Worker  let Pattern = [(set GPR:$wb, (StoreOp (ExtractOp (Ty QPR:$src), imm:$lane),
2105*9880d681SAndroid Build Coastguard Worker                                        addrmode6:$addr, am6offset:$offset))];
2106*9880d681SAndroid Build Coastguard Worker}
2107*9880d681SAndroid Build Coastguard Worker
2108*9880d681SAndroid Build Coastguard Workerdef VST1LNd8_UPD  : VST1LNWB<0b0000, {?,?,?,0}, "8", v8i8, post_truncsti8,
2109*9880d681SAndroid Build Coastguard Worker                             NEONvgetlaneu, addrmode6> {
2110*9880d681SAndroid Build Coastguard Worker  let Inst{7-5} = lane{2-0};
2111*9880d681SAndroid Build Coastguard Worker}
2112*9880d681SAndroid Build Coastguard Workerdef VST1LNd16_UPD : VST1LNWB<0b0100, {?,?,0,?}, "16", v4i16, post_truncsti16,
2113*9880d681SAndroid Build Coastguard Worker                             NEONvgetlaneu, addrmode6> {
2114*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
2115*9880d681SAndroid Build Coastguard Worker  let Inst{4}   = Rn{4};
2116*9880d681SAndroid Build Coastguard Worker}
2117*9880d681SAndroid Build Coastguard Workerdef VST1LNd32_UPD : VST1LNWB<0b1000, {?,0,?,?}, "32", v2i32, post_store,
2118*9880d681SAndroid Build Coastguard Worker                             extractelt, addrmode6oneL32> {
2119*9880d681SAndroid Build Coastguard Worker  let Inst{7}   = lane{0};
2120*9880d681SAndroid Build Coastguard Worker  let Inst{5-4} = Rn{5-4};
2121*9880d681SAndroid Build Coastguard Worker}
2122*9880d681SAndroid Build Coastguard Worker
2123*9880d681SAndroid Build Coastguard Workerdef VST1LNq8Pseudo_UPD  : VST1QLNWBPseudo<v16i8, post_truncsti8, NEONvgetlaneu>;
2124*9880d681SAndroid Build Coastguard Workerdef VST1LNq16Pseudo_UPD : VST1QLNWBPseudo<v8i16, post_truncsti16,NEONvgetlaneu>;
2125*9880d681SAndroid Build Coastguard Workerdef VST1LNq32Pseudo_UPD : VST1QLNWBPseudo<v4i32, post_store, extractelt>;
2126*9880d681SAndroid Build Coastguard Worker
2127*9880d681SAndroid Build Coastguard Workerlet mayStore = 1, hasSideEffects = 0, hasExtraSrcRegAllocReq = 1 in {
2128*9880d681SAndroid Build Coastguard Worker
2129*9880d681SAndroid Build Coastguard Worker//   VST2LN   : Vector Store (single 2-element structure from one lane)
2130*9880d681SAndroid Build Coastguard Workerclass VST2LN<bits<4> op11_8, bits<4> op7_4, string Dt>
2131*9880d681SAndroid Build Coastguard Worker  : NLdStLn<1, 0b00, op11_8, op7_4, (outs),
2132*9880d681SAndroid Build Coastguard Worker          (ins addrmode6:$Rn, DPR:$Vd, DPR:$src2, nohash_imm:$lane),
2133*9880d681SAndroid Build Coastguard Worker          IIC_VST2ln, "vst2", Dt, "\\{$Vd[$lane], $src2[$lane]\\}, $Rn",
2134*9880d681SAndroid Build Coastguard Worker          "", []> {
2135*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
2136*9880d681SAndroid Build Coastguard Worker  let Inst{4}   = Rn{4};
2137*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVST2LN";
2138*9880d681SAndroid Build Coastguard Worker}
2139*9880d681SAndroid Build Coastguard Worker
2140*9880d681SAndroid Build Coastguard Workerdef VST2LNd8  : VST2LN<0b0001, {?,?,?,?}, "8"> {
2141*9880d681SAndroid Build Coastguard Worker  let Inst{7-5} = lane{2-0};
2142*9880d681SAndroid Build Coastguard Worker}
2143*9880d681SAndroid Build Coastguard Workerdef VST2LNd16 : VST2LN<0b0101, {?,?,0,?}, "16"> {
2144*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
2145*9880d681SAndroid Build Coastguard Worker}
2146*9880d681SAndroid Build Coastguard Workerdef VST2LNd32 : VST2LN<0b1001, {?,0,0,?}, "32"> {
2147*9880d681SAndroid Build Coastguard Worker  let Inst{7}   = lane{0};
2148*9880d681SAndroid Build Coastguard Worker}
2149*9880d681SAndroid Build Coastguard Worker
2150*9880d681SAndroid Build Coastguard Workerdef VST2LNd8Pseudo  : VSTQLNPseudo<IIC_VST2ln>;
2151*9880d681SAndroid Build Coastguard Workerdef VST2LNd16Pseudo : VSTQLNPseudo<IIC_VST2ln>;
2152*9880d681SAndroid Build Coastguard Workerdef VST2LNd32Pseudo : VSTQLNPseudo<IIC_VST2ln>;
2153*9880d681SAndroid Build Coastguard Worker
2154*9880d681SAndroid Build Coastguard Worker// ...with double-spaced registers:
2155*9880d681SAndroid Build Coastguard Workerdef VST2LNq16 : VST2LN<0b0101, {?,?,1,?}, "16"> {
2156*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
2157*9880d681SAndroid Build Coastguard Worker  let Inst{4}   = Rn{4};
2158*9880d681SAndroid Build Coastguard Worker}
2159*9880d681SAndroid Build Coastguard Workerdef VST2LNq32 : VST2LN<0b1001, {?,1,0,?}, "32"> {
2160*9880d681SAndroid Build Coastguard Worker  let Inst{7}   = lane{0};
2161*9880d681SAndroid Build Coastguard Worker  let Inst{4}   = Rn{4};
2162*9880d681SAndroid Build Coastguard Worker}
2163*9880d681SAndroid Build Coastguard Worker
2164*9880d681SAndroid Build Coastguard Workerdef VST2LNq16Pseudo : VSTQQLNPseudo<IIC_VST2ln>;
2165*9880d681SAndroid Build Coastguard Workerdef VST2LNq32Pseudo : VSTQQLNPseudo<IIC_VST2ln>;
2166*9880d681SAndroid Build Coastguard Worker
2167*9880d681SAndroid Build Coastguard Worker// ...with address register writeback:
2168*9880d681SAndroid Build Coastguard Workerclass VST2LNWB<bits<4> op11_8, bits<4> op7_4, string Dt>
2169*9880d681SAndroid Build Coastguard Worker  : NLdStLn<1, 0b00, op11_8, op7_4, (outs GPR:$wb),
2170*9880d681SAndroid Build Coastguard Worker          (ins addrmode6:$Rn, am6offset:$Rm,
2171*9880d681SAndroid Build Coastguard Worker           DPR:$Vd, DPR:$src2, nohash_imm:$lane), IIC_VST2lnu, "vst2", Dt,
2172*9880d681SAndroid Build Coastguard Worker          "\\{$Vd[$lane], $src2[$lane]\\}, $Rn$Rm",
2173*9880d681SAndroid Build Coastguard Worker          "$Rn.addr = $wb", []> {
2174*9880d681SAndroid Build Coastguard Worker  let Inst{4}   = Rn{4};
2175*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVST2LN";
2176*9880d681SAndroid Build Coastguard Worker}
2177*9880d681SAndroid Build Coastguard Worker
2178*9880d681SAndroid Build Coastguard Workerdef VST2LNd8_UPD  : VST2LNWB<0b0001, {?,?,?,?}, "8"> {
2179*9880d681SAndroid Build Coastguard Worker  let Inst{7-5} = lane{2-0};
2180*9880d681SAndroid Build Coastguard Worker}
2181*9880d681SAndroid Build Coastguard Workerdef VST2LNd16_UPD : VST2LNWB<0b0101, {?,?,0,?}, "16"> {
2182*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
2183*9880d681SAndroid Build Coastguard Worker}
2184*9880d681SAndroid Build Coastguard Workerdef VST2LNd32_UPD : VST2LNWB<0b1001, {?,0,0,?}, "32"> {
2185*9880d681SAndroid Build Coastguard Worker  let Inst{7}   = lane{0};
2186*9880d681SAndroid Build Coastguard Worker}
2187*9880d681SAndroid Build Coastguard Worker
2188*9880d681SAndroid Build Coastguard Workerdef VST2LNd8Pseudo_UPD  : VSTQLNWBPseudo<IIC_VST2lnu>;
2189*9880d681SAndroid Build Coastguard Workerdef VST2LNd16Pseudo_UPD : VSTQLNWBPseudo<IIC_VST2lnu>;
2190*9880d681SAndroid Build Coastguard Workerdef VST2LNd32Pseudo_UPD : VSTQLNWBPseudo<IIC_VST2lnu>;
2191*9880d681SAndroid Build Coastguard Worker
2192*9880d681SAndroid Build Coastguard Workerdef VST2LNq16_UPD : VST2LNWB<0b0101, {?,?,1,?}, "16"> {
2193*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
2194*9880d681SAndroid Build Coastguard Worker}
2195*9880d681SAndroid Build Coastguard Workerdef VST2LNq32_UPD : VST2LNWB<0b1001, {?,1,0,?}, "32"> {
2196*9880d681SAndroid Build Coastguard Worker  let Inst{7}   = lane{0};
2197*9880d681SAndroid Build Coastguard Worker}
2198*9880d681SAndroid Build Coastguard Worker
2199*9880d681SAndroid Build Coastguard Workerdef VST2LNq16Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST2lnu>;
2200*9880d681SAndroid Build Coastguard Workerdef VST2LNq32Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST2lnu>;
2201*9880d681SAndroid Build Coastguard Worker
2202*9880d681SAndroid Build Coastguard Worker//   VST3LN   : Vector Store (single 3-element structure from one lane)
2203*9880d681SAndroid Build Coastguard Workerclass VST3LN<bits<4> op11_8, bits<4> op7_4, string Dt>
2204*9880d681SAndroid Build Coastguard Worker  : NLdStLn<1, 0b00, op11_8, op7_4, (outs),
2205*9880d681SAndroid Build Coastguard Worker          (ins addrmode6:$Rn, DPR:$Vd, DPR:$src2, DPR:$src3,
2206*9880d681SAndroid Build Coastguard Worker           nohash_imm:$lane), IIC_VST3ln, "vst3", Dt,
2207*9880d681SAndroid Build Coastguard Worker          "\\{$Vd[$lane], $src2[$lane], $src3[$lane]\\}, $Rn", "", []> {
2208*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
2209*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVST3LN";
2210*9880d681SAndroid Build Coastguard Worker}
2211*9880d681SAndroid Build Coastguard Worker
2212*9880d681SAndroid Build Coastguard Workerdef VST3LNd8  : VST3LN<0b0010, {?,?,?,0}, "8"> {
2213*9880d681SAndroid Build Coastguard Worker  let Inst{7-5} = lane{2-0};
2214*9880d681SAndroid Build Coastguard Worker}
2215*9880d681SAndroid Build Coastguard Workerdef VST3LNd16 : VST3LN<0b0110, {?,?,0,0}, "16"> {
2216*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
2217*9880d681SAndroid Build Coastguard Worker}
2218*9880d681SAndroid Build Coastguard Workerdef VST3LNd32 : VST3LN<0b1010, {?,0,0,0}, "32"> {
2219*9880d681SAndroid Build Coastguard Worker  let Inst{7}   = lane{0};
2220*9880d681SAndroid Build Coastguard Worker}
2221*9880d681SAndroid Build Coastguard Worker
2222*9880d681SAndroid Build Coastguard Workerdef VST3LNd8Pseudo  : VSTQQLNPseudo<IIC_VST3ln>;
2223*9880d681SAndroid Build Coastguard Workerdef VST3LNd16Pseudo : VSTQQLNPseudo<IIC_VST3ln>;
2224*9880d681SAndroid Build Coastguard Workerdef VST3LNd32Pseudo : VSTQQLNPseudo<IIC_VST3ln>;
2225*9880d681SAndroid Build Coastguard Worker
2226*9880d681SAndroid Build Coastguard Worker// ...with double-spaced registers:
2227*9880d681SAndroid Build Coastguard Workerdef VST3LNq16 : VST3LN<0b0110, {?,?,1,0}, "16"> {
2228*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
2229*9880d681SAndroid Build Coastguard Worker}
2230*9880d681SAndroid Build Coastguard Workerdef VST3LNq32 : VST3LN<0b1010, {?,1,0,0}, "32"> {
2231*9880d681SAndroid Build Coastguard Worker  let Inst{7}   = lane{0};
2232*9880d681SAndroid Build Coastguard Worker}
2233*9880d681SAndroid Build Coastguard Worker
2234*9880d681SAndroid Build Coastguard Workerdef VST3LNq16Pseudo : VSTQQQQLNPseudo<IIC_VST3ln>;
2235*9880d681SAndroid Build Coastguard Workerdef VST3LNq32Pseudo : VSTQQQQLNPseudo<IIC_VST3ln>;
2236*9880d681SAndroid Build Coastguard Worker
2237*9880d681SAndroid Build Coastguard Worker// ...with address register writeback:
2238*9880d681SAndroid Build Coastguard Workerclass VST3LNWB<bits<4> op11_8, bits<4> op7_4, string Dt>
2239*9880d681SAndroid Build Coastguard Worker  : NLdStLn<1, 0b00, op11_8, op7_4, (outs GPR:$wb),
2240*9880d681SAndroid Build Coastguard Worker          (ins addrmode6:$Rn, am6offset:$Rm,
2241*9880d681SAndroid Build Coastguard Worker           DPR:$Vd, DPR:$src2, DPR:$src3, nohash_imm:$lane),
2242*9880d681SAndroid Build Coastguard Worker          IIC_VST3lnu, "vst3", Dt,
2243*9880d681SAndroid Build Coastguard Worker          "\\{$Vd[$lane], $src2[$lane], $src3[$lane]\\}, $Rn$Rm",
2244*9880d681SAndroid Build Coastguard Worker          "$Rn.addr = $wb", []> {
2245*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVST3LN";
2246*9880d681SAndroid Build Coastguard Worker}
2247*9880d681SAndroid Build Coastguard Worker
2248*9880d681SAndroid Build Coastguard Workerdef VST3LNd8_UPD  : VST3LNWB<0b0010, {?,?,?,0}, "8"> {
2249*9880d681SAndroid Build Coastguard Worker  let Inst{7-5} = lane{2-0};
2250*9880d681SAndroid Build Coastguard Worker}
2251*9880d681SAndroid Build Coastguard Workerdef VST3LNd16_UPD : VST3LNWB<0b0110, {?,?,0,0}, "16"> {
2252*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
2253*9880d681SAndroid Build Coastguard Worker}
2254*9880d681SAndroid Build Coastguard Workerdef VST3LNd32_UPD : VST3LNWB<0b1010, {?,0,0,0}, "32"> {
2255*9880d681SAndroid Build Coastguard Worker  let Inst{7}   = lane{0};
2256*9880d681SAndroid Build Coastguard Worker}
2257*9880d681SAndroid Build Coastguard Worker
2258*9880d681SAndroid Build Coastguard Workerdef VST3LNd8Pseudo_UPD  : VSTQQLNWBPseudo<IIC_VST3lnu>;
2259*9880d681SAndroid Build Coastguard Workerdef VST3LNd16Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST3lnu>;
2260*9880d681SAndroid Build Coastguard Workerdef VST3LNd32Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST3lnu>;
2261*9880d681SAndroid Build Coastguard Worker
2262*9880d681SAndroid Build Coastguard Workerdef VST3LNq16_UPD : VST3LNWB<0b0110, {?,?,1,0}, "16"> {
2263*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
2264*9880d681SAndroid Build Coastguard Worker}
2265*9880d681SAndroid Build Coastguard Workerdef VST3LNq32_UPD : VST3LNWB<0b1010, {?,1,0,0}, "32"> {
2266*9880d681SAndroid Build Coastguard Worker  let Inst{7}   = lane{0};
2267*9880d681SAndroid Build Coastguard Worker}
2268*9880d681SAndroid Build Coastguard Worker
2269*9880d681SAndroid Build Coastguard Workerdef VST3LNq16Pseudo_UPD : VSTQQQQLNWBPseudo<IIC_VST3lnu>;
2270*9880d681SAndroid Build Coastguard Workerdef VST3LNq32Pseudo_UPD : VSTQQQQLNWBPseudo<IIC_VST3lnu>;
2271*9880d681SAndroid Build Coastguard Worker
2272*9880d681SAndroid Build Coastguard Worker//   VST4LN   : Vector Store (single 4-element structure from one lane)
2273*9880d681SAndroid Build Coastguard Workerclass VST4LN<bits<4> op11_8, bits<4> op7_4, string Dt>
2274*9880d681SAndroid Build Coastguard Worker  : NLdStLn<1, 0b00, op11_8, op7_4, (outs),
2275*9880d681SAndroid Build Coastguard Worker          (ins addrmode6:$Rn, DPR:$Vd, DPR:$src2, DPR:$src3, DPR:$src4,
2276*9880d681SAndroid Build Coastguard Worker           nohash_imm:$lane), IIC_VST4ln, "vst4", Dt,
2277*9880d681SAndroid Build Coastguard Worker          "\\{$Vd[$lane], $src2[$lane], $src3[$lane], $src4[$lane]\\}, $Rn",
2278*9880d681SAndroid Build Coastguard Worker          "", []> {
2279*9880d681SAndroid Build Coastguard Worker  let Rm = 0b1111;
2280*9880d681SAndroid Build Coastguard Worker  let Inst{4} = Rn{4};
2281*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVST4LN";
2282*9880d681SAndroid Build Coastguard Worker}
2283*9880d681SAndroid Build Coastguard Worker
2284*9880d681SAndroid Build Coastguard Workerdef VST4LNd8  : VST4LN<0b0011, {?,?,?,?}, "8"> {
2285*9880d681SAndroid Build Coastguard Worker  let Inst{7-5} = lane{2-0};
2286*9880d681SAndroid Build Coastguard Worker}
2287*9880d681SAndroid Build Coastguard Workerdef VST4LNd16 : VST4LN<0b0111, {?,?,0,?}, "16"> {
2288*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
2289*9880d681SAndroid Build Coastguard Worker}
2290*9880d681SAndroid Build Coastguard Workerdef VST4LNd32 : VST4LN<0b1011, {?,0,?,?}, "32"> {
2291*9880d681SAndroid Build Coastguard Worker  let Inst{7}   = lane{0};
2292*9880d681SAndroid Build Coastguard Worker  let Inst{5} = Rn{5};
2293*9880d681SAndroid Build Coastguard Worker}
2294*9880d681SAndroid Build Coastguard Worker
2295*9880d681SAndroid Build Coastguard Workerdef VST4LNd8Pseudo  : VSTQQLNPseudo<IIC_VST4ln>;
2296*9880d681SAndroid Build Coastguard Workerdef VST4LNd16Pseudo : VSTQQLNPseudo<IIC_VST4ln>;
2297*9880d681SAndroid Build Coastguard Workerdef VST4LNd32Pseudo : VSTQQLNPseudo<IIC_VST4ln>;
2298*9880d681SAndroid Build Coastguard Worker
2299*9880d681SAndroid Build Coastguard Worker// ...with double-spaced registers:
2300*9880d681SAndroid Build Coastguard Workerdef VST4LNq16 : VST4LN<0b0111, {?,?,1,?}, "16"> {
2301*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
2302*9880d681SAndroid Build Coastguard Worker}
2303*9880d681SAndroid Build Coastguard Workerdef VST4LNq32 : VST4LN<0b1011, {?,1,?,?}, "32"> {
2304*9880d681SAndroid Build Coastguard Worker  let Inst{7}   = lane{0};
2305*9880d681SAndroid Build Coastguard Worker  let Inst{5} = Rn{5};
2306*9880d681SAndroid Build Coastguard Worker}
2307*9880d681SAndroid Build Coastguard Worker
2308*9880d681SAndroid Build Coastguard Workerdef VST4LNq16Pseudo : VSTQQQQLNPseudo<IIC_VST4ln>;
2309*9880d681SAndroid Build Coastguard Workerdef VST4LNq32Pseudo : VSTQQQQLNPseudo<IIC_VST4ln>;
2310*9880d681SAndroid Build Coastguard Worker
2311*9880d681SAndroid Build Coastguard Worker// ...with address register writeback:
2312*9880d681SAndroid Build Coastguard Workerclass VST4LNWB<bits<4> op11_8, bits<4> op7_4, string Dt>
2313*9880d681SAndroid Build Coastguard Worker  : NLdStLn<1, 0b00, op11_8, op7_4, (outs GPR:$wb),
2314*9880d681SAndroid Build Coastguard Worker          (ins addrmode6:$Rn, am6offset:$Rm,
2315*9880d681SAndroid Build Coastguard Worker           DPR:$Vd, DPR:$src2, DPR:$src3, DPR:$src4, nohash_imm:$lane),
2316*9880d681SAndroid Build Coastguard Worker          IIC_VST4lnu, "vst4", Dt,
2317*9880d681SAndroid Build Coastguard Worker  "\\{$Vd[$lane], $src2[$lane], $src3[$lane], $src4[$lane]\\}, $Rn$Rm",
2318*9880d681SAndroid Build Coastguard Worker          "$Rn.addr = $wb", []> {
2319*9880d681SAndroid Build Coastguard Worker  let Inst{4} = Rn{4};
2320*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVST4LN";
2321*9880d681SAndroid Build Coastguard Worker}
2322*9880d681SAndroid Build Coastguard Worker
2323*9880d681SAndroid Build Coastguard Workerdef VST4LNd8_UPD  : VST4LNWB<0b0011, {?,?,?,?}, "8"> {
2324*9880d681SAndroid Build Coastguard Worker  let Inst{7-5} = lane{2-0};
2325*9880d681SAndroid Build Coastguard Worker}
2326*9880d681SAndroid Build Coastguard Workerdef VST4LNd16_UPD : VST4LNWB<0b0111, {?,?,0,?}, "16"> {
2327*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
2328*9880d681SAndroid Build Coastguard Worker}
2329*9880d681SAndroid Build Coastguard Workerdef VST4LNd32_UPD : VST4LNWB<0b1011, {?,0,?,?}, "32"> {
2330*9880d681SAndroid Build Coastguard Worker  let Inst{7}   = lane{0};
2331*9880d681SAndroid Build Coastguard Worker  let Inst{5} = Rn{5};
2332*9880d681SAndroid Build Coastguard Worker}
2333*9880d681SAndroid Build Coastguard Worker
2334*9880d681SAndroid Build Coastguard Workerdef VST4LNd8Pseudo_UPD  : VSTQQLNWBPseudo<IIC_VST4lnu>;
2335*9880d681SAndroid Build Coastguard Workerdef VST4LNd16Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST4lnu>;
2336*9880d681SAndroid Build Coastguard Workerdef VST4LNd32Pseudo_UPD : VSTQQLNWBPseudo<IIC_VST4lnu>;
2337*9880d681SAndroid Build Coastguard Worker
2338*9880d681SAndroid Build Coastguard Workerdef VST4LNq16_UPD : VST4LNWB<0b0111, {?,?,1,?}, "16"> {
2339*9880d681SAndroid Build Coastguard Worker  let Inst{7-6} = lane{1-0};
2340*9880d681SAndroid Build Coastguard Worker}
2341*9880d681SAndroid Build Coastguard Workerdef VST4LNq32_UPD : VST4LNWB<0b1011, {?,1,?,?}, "32"> {
2342*9880d681SAndroid Build Coastguard Worker  let Inst{7}   = lane{0};
2343*9880d681SAndroid Build Coastguard Worker  let Inst{5} = Rn{5};
2344*9880d681SAndroid Build Coastguard Worker}
2345*9880d681SAndroid Build Coastguard Worker
2346*9880d681SAndroid Build Coastguard Workerdef VST4LNq16Pseudo_UPD : VSTQQQQLNWBPseudo<IIC_VST4lnu>;
2347*9880d681SAndroid Build Coastguard Workerdef VST4LNq32Pseudo_UPD : VSTQQQQLNWBPseudo<IIC_VST4lnu>;
2348*9880d681SAndroid Build Coastguard Worker
2349*9880d681SAndroid Build Coastguard Worker} // mayStore = 1, hasSideEffects = 0, hasExtraSrcRegAllocReq = 1
2350*9880d681SAndroid Build Coastguard Worker
2351*9880d681SAndroid Build Coastguard Worker// Use vld1/vst1 for unaligned f64 load / store
2352*9880d681SAndroid Build Coastguard Workerdef : Pat<(f64 (hword_alignedload addrmode6:$addr)),
2353*9880d681SAndroid Build Coastguard Worker          (VLD1d16 addrmode6:$addr)>, Requires<[IsLE]>;
2354*9880d681SAndroid Build Coastguard Workerdef : Pat<(hword_alignedstore (f64 DPR:$value), addrmode6:$addr),
2355*9880d681SAndroid Build Coastguard Worker          (VST1d16 addrmode6:$addr, DPR:$value)>, Requires<[IsLE]>;
2356*9880d681SAndroid Build Coastguard Workerdef : Pat<(f64 (byte_alignedload addrmode6:$addr)),
2357*9880d681SAndroid Build Coastguard Worker          (VLD1d8 addrmode6:$addr)>, Requires<[IsLE]>;
2358*9880d681SAndroid Build Coastguard Workerdef : Pat<(byte_alignedstore (f64 DPR:$value), addrmode6:$addr),
2359*9880d681SAndroid Build Coastguard Worker          (VST1d8 addrmode6:$addr, DPR:$value)>, Requires<[IsLE]>;
2360*9880d681SAndroid Build Coastguard Workerdef : Pat<(f64 (non_word_alignedload addrmode6:$addr)),
2361*9880d681SAndroid Build Coastguard Worker          (VLD1d64 addrmode6:$addr)>, Requires<[IsBE]>;
2362*9880d681SAndroid Build Coastguard Workerdef : Pat<(non_word_alignedstore (f64 DPR:$value), addrmode6:$addr),
2363*9880d681SAndroid Build Coastguard Worker          (VST1d64 addrmode6:$addr, DPR:$value)>, Requires<[IsBE]>;
2364*9880d681SAndroid Build Coastguard Worker
2365*9880d681SAndroid Build Coastguard Worker// Use vld1/vst1 for Q and QQ. Also use them for unaligned v2f64
2366*9880d681SAndroid Build Coastguard Worker// load / store if it's legal.
2367*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2f64 (dword_alignedload addrmode6:$addr)),
2368*9880d681SAndroid Build Coastguard Worker          (VLD1q64 addrmode6:$addr)>;
2369*9880d681SAndroid Build Coastguard Workerdef : Pat<(dword_alignedstore (v2f64 QPR:$value), addrmode6:$addr),
2370*9880d681SAndroid Build Coastguard Worker          (VST1q64 addrmode6:$addr, QPR:$value)>;
2371*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2f64 (word_alignedload addrmode6:$addr)),
2372*9880d681SAndroid Build Coastguard Worker          (VLD1q32 addrmode6:$addr)>, Requires<[IsLE]>;
2373*9880d681SAndroid Build Coastguard Workerdef : Pat<(word_alignedstore (v2f64 QPR:$value), addrmode6:$addr),
2374*9880d681SAndroid Build Coastguard Worker          (VST1q32 addrmode6:$addr, QPR:$value)>, Requires<[IsLE]>;
2375*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2f64 (hword_alignedload addrmode6:$addr)),
2376*9880d681SAndroid Build Coastguard Worker          (VLD1q16 addrmode6:$addr)>, Requires<[IsLE]>;
2377*9880d681SAndroid Build Coastguard Workerdef : Pat<(hword_alignedstore (v2f64 QPR:$value), addrmode6:$addr),
2378*9880d681SAndroid Build Coastguard Worker          (VST1q16 addrmode6:$addr, QPR:$value)>, Requires<[IsLE]>;
2379*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2f64 (byte_alignedload addrmode6:$addr)),
2380*9880d681SAndroid Build Coastguard Worker          (VLD1q8 addrmode6:$addr)>, Requires<[IsLE]>;
2381*9880d681SAndroid Build Coastguard Workerdef : Pat<(byte_alignedstore (v2f64 QPR:$value), addrmode6:$addr),
2382*9880d681SAndroid Build Coastguard Worker          (VST1q8 addrmode6:$addr, QPR:$value)>, Requires<[IsLE]>;
2383*9880d681SAndroid Build Coastguard Worker
2384*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===//
2385*9880d681SAndroid Build Coastguard Worker// NEON pattern fragments
2386*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===//
2387*9880d681SAndroid Build Coastguard Worker
2388*9880d681SAndroid Build Coastguard Worker// Extract D sub-registers of Q registers.
2389*9880d681SAndroid Build Coastguard Workerdef DSubReg_i8_reg  : SDNodeXForm<imm, [{
2390*9880d681SAndroid Build Coastguard Worker  assert(ARM::dsub_7 == ARM::dsub_0+7 && "Unexpected subreg numbering");
2391*9880d681SAndroid Build Coastguard Worker  return CurDAG->getTargetConstant(ARM::dsub_0 + N->getZExtValue()/8, SDLoc(N),
2392*9880d681SAndroid Build Coastguard Worker                                   MVT::i32);
2393*9880d681SAndroid Build Coastguard Worker}]>;
2394*9880d681SAndroid Build Coastguard Workerdef DSubReg_i16_reg : SDNodeXForm<imm, [{
2395*9880d681SAndroid Build Coastguard Worker  assert(ARM::dsub_7 == ARM::dsub_0+7 && "Unexpected subreg numbering");
2396*9880d681SAndroid Build Coastguard Worker  return CurDAG->getTargetConstant(ARM::dsub_0 + N->getZExtValue()/4, SDLoc(N),
2397*9880d681SAndroid Build Coastguard Worker                                   MVT::i32);
2398*9880d681SAndroid Build Coastguard Worker}]>;
2399*9880d681SAndroid Build Coastguard Workerdef DSubReg_i32_reg : SDNodeXForm<imm, [{
2400*9880d681SAndroid Build Coastguard Worker  assert(ARM::dsub_7 == ARM::dsub_0+7 && "Unexpected subreg numbering");
2401*9880d681SAndroid Build Coastguard Worker  return CurDAG->getTargetConstant(ARM::dsub_0 + N->getZExtValue()/2, SDLoc(N),
2402*9880d681SAndroid Build Coastguard Worker                                   MVT::i32);
2403*9880d681SAndroid Build Coastguard Worker}]>;
2404*9880d681SAndroid Build Coastguard Workerdef DSubReg_f64_reg : SDNodeXForm<imm, [{
2405*9880d681SAndroid Build Coastguard Worker  assert(ARM::dsub_7 == ARM::dsub_0+7 && "Unexpected subreg numbering");
2406*9880d681SAndroid Build Coastguard Worker  return CurDAG->getTargetConstant(ARM::dsub_0 + N->getZExtValue(), SDLoc(N),
2407*9880d681SAndroid Build Coastguard Worker                                   MVT::i32);
2408*9880d681SAndroid Build Coastguard Worker}]>;
2409*9880d681SAndroid Build Coastguard Worker
2410*9880d681SAndroid Build Coastguard Worker// Extract S sub-registers of Q/D registers.
2411*9880d681SAndroid Build Coastguard Workerdef SSubReg_f32_reg : SDNodeXForm<imm, [{
2412*9880d681SAndroid Build Coastguard Worker  assert(ARM::ssub_3 == ARM::ssub_0+3 && "Unexpected subreg numbering");
2413*9880d681SAndroid Build Coastguard Worker  return CurDAG->getTargetConstant(ARM::ssub_0 + N->getZExtValue(), SDLoc(N),
2414*9880d681SAndroid Build Coastguard Worker                                   MVT::i32);
2415*9880d681SAndroid Build Coastguard Worker}]>;
2416*9880d681SAndroid Build Coastguard Worker
2417*9880d681SAndroid Build Coastguard Worker// Translate lane numbers from Q registers to D subregs.
2418*9880d681SAndroid Build Coastguard Workerdef SubReg_i8_lane  : SDNodeXForm<imm, [{
2419*9880d681SAndroid Build Coastguard Worker  return CurDAG->getTargetConstant(N->getZExtValue() & 7, SDLoc(N), MVT::i32);
2420*9880d681SAndroid Build Coastguard Worker}]>;
2421*9880d681SAndroid Build Coastguard Workerdef SubReg_i16_lane : SDNodeXForm<imm, [{
2422*9880d681SAndroid Build Coastguard Worker  return CurDAG->getTargetConstant(N->getZExtValue() & 3, SDLoc(N), MVT::i32);
2423*9880d681SAndroid Build Coastguard Worker}]>;
2424*9880d681SAndroid Build Coastguard Workerdef SubReg_i32_lane : SDNodeXForm<imm, [{
2425*9880d681SAndroid Build Coastguard Worker  return CurDAG->getTargetConstant(N->getZExtValue() & 1, SDLoc(N), MVT::i32);
2426*9880d681SAndroid Build Coastguard Worker}]>;
2427*9880d681SAndroid Build Coastguard Worker
2428*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===//
2429*9880d681SAndroid Build Coastguard Worker// Instruction Classes
2430*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===//
2431*9880d681SAndroid Build Coastguard Worker
2432*9880d681SAndroid Build Coastguard Worker// Basic 2-register operations: double- and quad-register.
2433*9880d681SAndroid Build Coastguard Workerclass N2VD<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18,
2434*9880d681SAndroid Build Coastguard Worker           bits<2> op17_16, bits<5> op11_7, bit op4, string OpcodeStr,
2435*9880d681SAndroid Build Coastguard Worker           string Dt, ValueType ResTy, ValueType OpTy, SDNode OpNode>
2436*9880d681SAndroid Build Coastguard Worker  : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4, (outs DPR:$Vd),
2437*9880d681SAndroid Build Coastguard Worker        (ins DPR:$Vm), IIC_VUNAD, OpcodeStr, Dt,"$Vd, $Vm", "",
2438*9880d681SAndroid Build Coastguard Worker        [(set DPR:$Vd, (ResTy (OpNode (OpTy DPR:$Vm))))]>;
2439*9880d681SAndroid Build Coastguard Workerclass N2VQ<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18,
2440*9880d681SAndroid Build Coastguard Worker           bits<2> op17_16, bits<5> op11_7, bit op4, string OpcodeStr,
2441*9880d681SAndroid Build Coastguard Worker           string Dt, ValueType ResTy, ValueType OpTy, SDNode OpNode>
2442*9880d681SAndroid Build Coastguard Worker  : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 1, op4, (outs QPR:$Vd),
2443*9880d681SAndroid Build Coastguard Worker        (ins QPR:$Vm), IIC_VUNAQ, OpcodeStr, Dt,"$Vd, $Vm", "",
2444*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd, (ResTy (OpNode (OpTy QPR:$Vm))))]>;
2445*9880d681SAndroid Build Coastguard Worker
2446*9880d681SAndroid Build Coastguard Worker// Basic 2-register intrinsics, both double- and quad-register.
2447*9880d681SAndroid Build Coastguard Workerclass N2VDInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18,
2448*9880d681SAndroid Build Coastguard Worker              bits<2> op17_16, bits<5> op11_7, bit op4,
2449*9880d681SAndroid Build Coastguard Worker              InstrItinClass itin, string OpcodeStr, string Dt,
2450*9880d681SAndroid Build Coastguard Worker              ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp>
2451*9880d681SAndroid Build Coastguard Worker  : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4, (outs DPR:$Vd),
2452*9880d681SAndroid Build Coastguard Worker        (ins DPR:$Vm), itin, OpcodeStr, Dt, "$Vd, $Vm", "",
2453*9880d681SAndroid Build Coastguard Worker        [(set DPR:$Vd, (ResTy (IntOp (OpTy DPR:$Vm))))]>;
2454*9880d681SAndroid Build Coastguard Workerclass N2VQInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18,
2455*9880d681SAndroid Build Coastguard Worker              bits<2> op17_16, bits<5> op11_7, bit op4,
2456*9880d681SAndroid Build Coastguard Worker              InstrItinClass itin, string OpcodeStr, string Dt,
2457*9880d681SAndroid Build Coastguard Worker              ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp>
2458*9880d681SAndroid Build Coastguard Worker  : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 1, op4, (outs QPR:$Vd),
2459*9880d681SAndroid Build Coastguard Worker        (ins QPR:$Vm), itin, OpcodeStr, Dt, "$Vd, $Vm", "",
2460*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$Vm))))]>;
2461*9880d681SAndroid Build Coastguard Worker
2462*9880d681SAndroid Build Coastguard Worker// Same as above, but not predicated.
2463*9880d681SAndroid Build Coastguard Workerclass N2VDIntnp<bits<2> op19_18, bits<2> op17_16, bits<3> op10_8, bit op7,
2464*9880d681SAndroid Build Coastguard Worker              InstrItinClass itin, string OpcodeStr, string Dt,
2465*9880d681SAndroid Build Coastguard Worker              ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp>
2466*9880d681SAndroid Build Coastguard Worker  : N2Vnp<op19_18, op17_16, op10_8, op7, 0,  (outs DPR:$Vd), (ins DPR:$Vm),
2467*9880d681SAndroid Build Coastguard Worker          itin, OpcodeStr, Dt,
2468*9880d681SAndroid Build Coastguard Worker          [(set DPR:$Vd, (ResTy (IntOp (OpTy DPR:$Vm))))]>;
2469*9880d681SAndroid Build Coastguard Worker
2470*9880d681SAndroid Build Coastguard Workerclass N2VQIntnp<bits<2> op19_18, bits<2> op17_16, bits<3> op10_8, bit op7,
2471*9880d681SAndroid Build Coastguard Worker              InstrItinClass itin, string OpcodeStr, string Dt,
2472*9880d681SAndroid Build Coastguard Worker              ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp>
2473*9880d681SAndroid Build Coastguard Worker  : N2Vnp<op19_18, op17_16, op10_8, op7, 1,  (outs QPR:$Vd), (ins QPR:$Vm),
2474*9880d681SAndroid Build Coastguard Worker          itin, OpcodeStr, Dt,
2475*9880d681SAndroid Build Coastguard Worker          [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$Vm))))]>;
2476*9880d681SAndroid Build Coastguard Worker
2477*9880d681SAndroid Build Coastguard Worker// Similar to NV2VQIntnp with some more encoding bits exposed (crypto).
2478*9880d681SAndroid Build Coastguard Workerclass N2VQIntXnp<bits<2> op19_18, bits<2> op17_16, bits<3> op10_8, bit op6,
2479*9880d681SAndroid Build Coastguard Worker              bit op7, InstrItinClass itin, string OpcodeStr, string Dt,
2480*9880d681SAndroid Build Coastguard Worker              ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp>
2481*9880d681SAndroid Build Coastguard Worker  : N2Vnp<op19_18, op17_16, op10_8, op7, op6,  (outs QPR:$Vd), (ins QPR:$Vm),
2482*9880d681SAndroid Build Coastguard Worker          itin, OpcodeStr, Dt,
2483*9880d681SAndroid Build Coastguard Worker          [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$Vm))))]>;
2484*9880d681SAndroid Build Coastguard Worker
2485*9880d681SAndroid Build Coastguard Worker// Same as N2VQIntXnp but with Vd as a src register.
2486*9880d681SAndroid Build Coastguard Workerclass N2VQIntX2np<bits<2> op19_18, bits<2> op17_16, bits<3> op10_8, bit op6,
2487*9880d681SAndroid Build Coastguard Worker              bit op7, InstrItinClass itin, string OpcodeStr, string Dt,
2488*9880d681SAndroid Build Coastguard Worker              ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp>
2489*9880d681SAndroid Build Coastguard Worker  : N2Vnp<op19_18, op17_16, op10_8, op7, op6,
2490*9880d681SAndroid Build Coastguard Worker          (outs QPR:$Vd), (ins QPR:$src, QPR:$Vm),
2491*9880d681SAndroid Build Coastguard Worker          itin, OpcodeStr, Dt,
2492*9880d681SAndroid Build Coastguard Worker          [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$src), (OpTy QPR:$Vm))))]> {
2493*9880d681SAndroid Build Coastguard Worker  let Constraints = "$src = $Vd";
2494*9880d681SAndroid Build Coastguard Worker}
2495*9880d681SAndroid Build Coastguard Worker
2496*9880d681SAndroid Build Coastguard Worker// Narrow 2-register operations.
2497*9880d681SAndroid Build Coastguard Workerclass N2VN<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18,
2498*9880d681SAndroid Build Coastguard Worker           bits<2> op17_16, bits<5> op11_7, bit op6, bit op4,
2499*9880d681SAndroid Build Coastguard Worker           InstrItinClass itin, string OpcodeStr, string Dt,
2500*9880d681SAndroid Build Coastguard Worker           ValueType TyD, ValueType TyQ, SDNode OpNode>
2501*9880d681SAndroid Build Coastguard Worker  : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, op6, op4, (outs DPR:$Vd),
2502*9880d681SAndroid Build Coastguard Worker        (ins QPR:$Vm), itin, OpcodeStr, Dt, "$Vd, $Vm", "",
2503*9880d681SAndroid Build Coastguard Worker        [(set DPR:$Vd, (TyD (OpNode (TyQ QPR:$Vm))))]>;
2504*9880d681SAndroid Build Coastguard Worker
2505*9880d681SAndroid Build Coastguard Worker// Narrow 2-register intrinsics.
2506*9880d681SAndroid Build Coastguard Workerclass N2VNInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18,
2507*9880d681SAndroid Build Coastguard Worker              bits<2> op17_16, bits<5> op11_7, bit op6, bit op4,
2508*9880d681SAndroid Build Coastguard Worker              InstrItinClass itin, string OpcodeStr, string Dt,
2509*9880d681SAndroid Build Coastguard Worker              ValueType TyD, ValueType TyQ, SDPatternOperator IntOp>
2510*9880d681SAndroid Build Coastguard Worker  : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, op6, op4, (outs DPR:$Vd),
2511*9880d681SAndroid Build Coastguard Worker        (ins QPR:$Vm), itin, OpcodeStr, Dt, "$Vd, $Vm", "",
2512*9880d681SAndroid Build Coastguard Worker        [(set DPR:$Vd, (TyD (IntOp (TyQ QPR:$Vm))))]>;
2513*9880d681SAndroid Build Coastguard Worker
2514*9880d681SAndroid Build Coastguard Worker// Long 2-register operations (currently only used for VMOVL).
2515*9880d681SAndroid Build Coastguard Workerclass N2VL<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18,
2516*9880d681SAndroid Build Coastguard Worker           bits<2> op17_16, bits<5> op11_7, bit op6, bit op4,
2517*9880d681SAndroid Build Coastguard Worker           InstrItinClass itin, string OpcodeStr, string Dt,
2518*9880d681SAndroid Build Coastguard Worker           ValueType TyQ, ValueType TyD, SDNode OpNode>
2519*9880d681SAndroid Build Coastguard Worker  : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, op6, op4, (outs QPR:$Vd),
2520*9880d681SAndroid Build Coastguard Worker        (ins DPR:$Vm), itin, OpcodeStr, Dt, "$Vd, $Vm", "",
2521*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd, (TyQ (OpNode (TyD DPR:$Vm))))]>;
2522*9880d681SAndroid Build Coastguard Worker
2523*9880d681SAndroid Build Coastguard Worker// Long 2-register intrinsics.
2524*9880d681SAndroid Build Coastguard Workerclass N2VLInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18,
2525*9880d681SAndroid Build Coastguard Worker              bits<2> op17_16, bits<5> op11_7, bit op6, bit op4,
2526*9880d681SAndroid Build Coastguard Worker              InstrItinClass itin, string OpcodeStr, string Dt,
2527*9880d681SAndroid Build Coastguard Worker              ValueType TyQ, ValueType TyD, SDPatternOperator IntOp>
2528*9880d681SAndroid Build Coastguard Worker  : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, op6, op4, (outs QPR:$Vd),
2529*9880d681SAndroid Build Coastguard Worker        (ins DPR:$Vm), itin, OpcodeStr, Dt, "$Vd, $Vm", "",
2530*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd, (TyQ (IntOp (TyD DPR:$Vm))))]>;
2531*9880d681SAndroid Build Coastguard Worker
2532*9880d681SAndroid Build Coastguard Worker// 2-register shuffles (VTRN/VZIP/VUZP), both double- and quad-register.
2533*9880d681SAndroid Build Coastguard Workerclass N2VDShuffle<bits<2> op19_18, bits<5> op11_7, string OpcodeStr, string Dt>
2534*9880d681SAndroid Build Coastguard Worker  : N2V<0b11, 0b11, op19_18, 0b10, op11_7, 0, 0, (outs DPR:$Vd, DPR:$Vm),
2535*9880d681SAndroid Build Coastguard Worker        (ins DPR:$src1, DPR:$src2), IIC_VPERMD,
2536*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vm",
2537*9880d681SAndroid Build Coastguard Worker        "$src1 = $Vd, $src2 = $Vm", []>;
2538*9880d681SAndroid Build Coastguard Workerclass N2VQShuffle<bits<2> op19_18, bits<5> op11_7,
2539*9880d681SAndroid Build Coastguard Worker                  InstrItinClass itin, string OpcodeStr, string Dt>
2540*9880d681SAndroid Build Coastguard Worker  : N2V<0b11, 0b11, op19_18, 0b10, op11_7, 1, 0, (outs QPR:$Vd, QPR:$Vm),
2541*9880d681SAndroid Build Coastguard Worker        (ins QPR:$src1, QPR:$src2), itin, OpcodeStr, Dt, "$Vd, $Vm",
2542*9880d681SAndroid Build Coastguard Worker        "$src1 = $Vd, $src2 = $Vm", []>;
2543*9880d681SAndroid Build Coastguard Worker
2544*9880d681SAndroid Build Coastguard Worker// Basic 3-register operations: double- and quad-register.
2545*9880d681SAndroid Build Coastguard Workerclass N3VD<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2546*9880d681SAndroid Build Coastguard Worker           InstrItinClass itin, string OpcodeStr, string Dt,
2547*9880d681SAndroid Build Coastguard Worker           ValueType ResTy, ValueType OpTy, SDNode OpNode, bit Commutable>
2548*9880d681SAndroid Build Coastguard Worker  : N3V<op24, op23, op21_20, op11_8, 0, op4,
2549*9880d681SAndroid Build Coastguard Worker        (outs DPR:$Vd), (ins DPR:$Vn, DPR:$Vm), N3RegFrm, itin,
2550*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm", "",
2551*9880d681SAndroid Build Coastguard Worker        [(set DPR:$Vd, (ResTy (OpNode (OpTy DPR:$Vn), (OpTy DPR:$Vm))))]> {
2552*9880d681SAndroid Build Coastguard Worker  // All of these have a two-operand InstAlias.
2553*9880d681SAndroid Build Coastguard Worker  let TwoOperandAliasConstraint = "$Vn = $Vd";
2554*9880d681SAndroid Build Coastguard Worker  let isCommutable = Commutable;
2555*9880d681SAndroid Build Coastguard Worker}
2556*9880d681SAndroid Build Coastguard Worker// Same as N3VD but no data type.
2557*9880d681SAndroid Build Coastguard Workerclass N3VDX<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2558*9880d681SAndroid Build Coastguard Worker           InstrItinClass itin, string OpcodeStr,
2559*9880d681SAndroid Build Coastguard Worker           ValueType ResTy, ValueType OpTy,
2560*9880d681SAndroid Build Coastguard Worker           SDNode OpNode, bit Commutable>
2561*9880d681SAndroid Build Coastguard Worker  : N3VX<op24, op23, op21_20, op11_8, 0, op4,
2562*9880d681SAndroid Build Coastguard Worker         (outs DPR:$Vd), (ins DPR:$Vn, DPR:$Vm), N3RegFrm, itin,
2563*9880d681SAndroid Build Coastguard Worker         OpcodeStr, "$Vd, $Vn, $Vm", "",
2564*9880d681SAndroid Build Coastguard Worker         [(set DPR:$Vd, (ResTy (OpNode (OpTy DPR:$Vn), (OpTy DPR:$Vm))))]>{
2565*9880d681SAndroid Build Coastguard Worker  // All of these have a two-operand InstAlias.
2566*9880d681SAndroid Build Coastguard Worker  let TwoOperandAliasConstraint = "$Vn = $Vd";
2567*9880d681SAndroid Build Coastguard Worker  let isCommutable = Commutable;
2568*9880d681SAndroid Build Coastguard Worker}
2569*9880d681SAndroid Build Coastguard Worker
2570*9880d681SAndroid Build Coastguard Workerclass N3VDSL<bits<2> op21_20, bits<4> op11_8,
2571*9880d681SAndroid Build Coastguard Worker             InstrItinClass itin, string OpcodeStr, string Dt,
2572*9880d681SAndroid Build Coastguard Worker             ValueType Ty, SDNode ShOp>
2573*9880d681SAndroid Build Coastguard Worker  : N3VLane32<0, 1, op21_20, op11_8, 1, 0,
2574*9880d681SAndroid Build Coastguard Worker        (outs DPR:$Vd), (ins DPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane),
2575*9880d681SAndroid Build Coastguard Worker        NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "",
2576*9880d681SAndroid Build Coastguard Worker        [(set (Ty DPR:$Vd),
2577*9880d681SAndroid Build Coastguard Worker              (Ty (ShOp (Ty DPR:$Vn),
2578*9880d681SAndroid Build Coastguard Worker                        (Ty (NEONvduplane (Ty DPR_VFP2:$Vm),imm:$lane)))))]> {
2579*9880d681SAndroid Build Coastguard Worker  // All of these have a two-operand InstAlias.
2580*9880d681SAndroid Build Coastguard Worker  let TwoOperandAliasConstraint = "$Vn = $Vd";
2581*9880d681SAndroid Build Coastguard Worker  let isCommutable = 0;
2582*9880d681SAndroid Build Coastguard Worker}
2583*9880d681SAndroid Build Coastguard Workerclass N3VDSL16<bits<2> op21_20, bits<4> op11_8,
2584*9880d681SAndroid Build Coastguard Worker               string OpcodeStr, string Dt, ValueType Ty, SDNode ShOp>
2585*9880d681SAndroid Build Coastguard Worker  : N3VLane16<0, 1, op21_20, op11_8, 1, 0,
2586*9880d681SAndroid Build Coastguard Worker        (outs DPR:$Vd), (ins DPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane),
2587*9880d681SAndroid Build Coastguard Worker        NVMulSLFrm, IIC_VMULi16D, OpcodeStr, Dt,"$Vd, $Vn, $Vm$lane","",
2588*9880d681SAndroid Build Coastguard Worker        [(set (Ty DPR:$Vd),
2589*9880d681SAndroid Build Coastguard Worker              (Ty (ShOp (Ty DPR:$Vn),
2590*9880d681SAndroid Build Coastguard Worker                        (Ty (NEONvduplane (Ty DPR_8:$Vm), imm:$lane)))))]> {
2591*9880d681SAndroid Build Coastguard Worker  // All of these have a two-operand InstAlias.
2592*9880d681SAndroid Build Coastguard Worker  let TwoOperandAliasConstraint = "$Vn = $Vd";
2593*9880d681SAndroid Build Coastguard Worker  let isCommutable = 0;
2594*9880d681SAndroid Build Coastguard Worker}
2595*9880d681SAndroid Build Coastguard Worker
2596*9880d681SAndroid Build Coastguard Workerclass N3VQ<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2597*9880d681SAndroid Build Coastguard Worker           InstrItinClass itin, string OpcodeStr, string Dt,
2598*9880d681SAndroid Build Coastguard Worker           ValueType ResTy, ValueType OpTy, SDNode OpNode, bit Commutable>
2599*9880d681SAndroid Build Coastguard Worker  : N3V<op24, op23, op21_20, op11_8, 1, op4,
2600*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd), (ins QPR:$Vn, QPR:$Vm), N3RegFrm, itin,
2601*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm", "",
2602*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd, (ResTy (OpNode (OpTy QPR:$Vn), (OpTy QPR:$Vm))))]> {
2603*9880d681SAndroid Build Coastguard Worker  // All of these have a two-operand InstAlias.
2604*9880d681SAndroid Build Coastguard Worker  let TwoOperandAliasConstraint = "$Vn = $Vd";
2605*9880d681SAndroid Build Coastguard Worker  let isCommutable = Commutable;
2606*9880d681SAndroid Build Coastguard Worker}
2607*9880d681SAndroid Build Coastguard Workerclass N3VQX<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2608*9880d681SAndroid Build Coastguard Worker           InstrItinClass itin, string OpcodeStr,
2609*9880d681SAndroid Build Coastguard Worker           ValueType ResTy, ValueType OpTy, SDNode OpNode, bit Commutable>
2610*9880d681SAndroid Build Coastguard Worker  : N3VX<op24, op23, op21_20, op11_8, 1, op4,
2611*9880d681SAndroid Build Coastguard Worker         (outs QPR:$Vd), (ins QPR:$Vn, QPR:$Vm), N3RegFrm, itin,
2612*9880d681SAndroid Build Coastguard Worker         OpcodeStr, "$Vd, $Vn, $Vm", "",
2613*9880d681SAndroid Build Coastguard Worker         [(set QPR:$Vd, (ResTy (OpNode (OpTy QPR:$Vn), (OpTy QPR:$Vm))))]>{
2614*9880d681SAndroid Build Coastguard Worker  // All of these have a two-operand InstAlias.
2615*9880d681SAndroid Build Coastguard Worker  let TwoOperandAliasConstraint = "$Vn = $Vd";
2616*9880d681SAndroid Build Coastguard Worker  let isCommutable = Commutable;
2617*9880d681SAndroid Build Coastguard Worker}
2618*9880d681SAndroid Build Coastguard Workerclass N3VQSL<bits<2> op21_20, bits<4> op11_8,
2619*9880d681SAndroid Build Coastguard Worker             InstrItinClass itin, string OpcodeStr, string Dt,
2620*9880d681SAndroid Build Coastguard Worker             ValueType ResTy, ValueType OpTy, SDNode ShOp>
2621*9880d681SAndroid Build Coastguard Worker  : N3VLane32<1, 1, op21_20, op11_8, 1, 0,
2622*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd), (ins QPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane),
2623*9880d681SAndroid Build Coastguard Worker        NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "",
2624*9880d681SAndroid Build Coastguard Worker        [(set (ResTy QPR:$Vd),
2625*9880d681SAndroid Build Coastguard Worker              (ResTy (ShOp (ResTy QPR:$Vn),
2626*9880d681SAndroid Build Coastguard Worker                           (ResTy (NEONvduplane (OpTy DPR_VFP2:$Vm),
2627*9880d681SAndroid Build Coastguard Worker                                                imm:$lane)))))]> {
2628*9880d681SAndroid Build Coastguard Worker  // All of these have a two-operand InstAlias.
2629*9880d681SAndroid Build Coastguard Worker  let TwoOperandAliasConstraint = "$Vn = $Vd";
2630*9880d681SAndroid Build Coastguard Worker  let isCommutable = 0;
2631*9880d681SAndroid Build Coastguard Worker}
2632*9880d681SAndroid Build Coastguard Workerclass N3VQSL16<bits<2> op21_20, bits<4> op11_8, string OpcodeStr, string Dt,
2633*9880d681SAndroid Build Coastguard Worker               ValueType ResTy, ValueType OpTy, SDNode ShOp>
2634*9880d681SAndroid Build Coastguard Worker  : N3VLane16<1, 1, op21_20, op11_8, 1, 0,
2635*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd), (ins QPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane),
2636*9880d681SAndroid Build Coastguard Worker        NVMulSLFrm, IIC_VMULi16Q, OpcodeStr, Dt,"$Vd, $Vn, $Vm$lane", "",
2637*9880d681SAndroid Build Coastguard Worker        [(set (ResTy QPR:$Vd),
2638*9880d681SAndroid Build Coastguard Worker              (ResTy (ShOp (ResTy QPR:$Vn),
2639*9880d681SAndroid Build Coastguard Worker                           (ResTy (NEONvduplane (OpTy DPR_8:$Vm),
2640*9880d681SAndroid Build Coastguard Worker                                                imm:$lane)))))]> {
2641*9880d681SAndroid Build Coastguard Worker  // All of these have a two-operand InstAlias.
2642*9880d681SAndroid Build Coastguard Worker  let TwoOperandAliasConstraint = "$Vn = $Vd";
2643*9880d681SAndroid Build Coastguard Worker  let isCommutable = 0;
2644*9880d681SAndroid Build Coastguard Worker}
2645*9880d681SAndroid Build Coastguard Worker
2646*9880d681SAndroid Build Coastguard Worker// Basic 3-register intrinsics, both double- and quad-register.
2647*9880d681SAndroid Build Coastguard Workerclass N3VDInt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2648*9880d681SAndroid Build Coastguard Worker              Format f, InstrItinClass itin, string OpcodeStr, string Dt,
2649*9880d681SAndroid Build Coastguard Worker              ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp, bit Commutable>
2650*9880d681SAndroid Build Coastguard Worker  : N3V<op24, op23, op21_20, op11_8, 0, op4,
2651*9880d681SAndroid Build Coastguard Worker        (outs DPR:$Vd), (ins DPR:$Vn, DPR:$Vm), f, itin,
2652*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm", "",
2653*9880d681SAndroid Build Coastguard Worker        [(set DPR:$Vd, (ResTy (IntOp (OpTy DPR:$Vn), (OpTy DPR:$Vm))))]> {
2654*9880d681SAndroid Build Coastguard Worker  // All of these have a two-operand InstAlias.
2655*9880d681SAndroid Build Coastguard Worker  let TwoOperandAliasConstraint = "$Vn = $Vd";
2656*9880d681SAndroid Build Coastguard Worker  let isCommutable = Commutable;
2657*9880d681SAndroid Build Coastguard Worker}
2658*9880d681SAndroid Build Coastguard Worker
2659*9880d681SAndroid Build Coastguard Workerclass N3VDIntnp<bits<5> op27_23, bits<2> op21_20, bits<4> op11_8, bit op6,
2660*9880d681SAndroid Build Coastguard Worker                bit op4, Format f, InstrItinClass itin, string OpcodeStr,
2661*9880d681SAndroid Build Coastguard Worker                string Dt, ValueType ResTy, ValueType OpTy,
2662*9880d681SAndroid Build Coastguard Worker                SDPatternOperator IntOp, bit Commutable>
2663*9880d681SAndroid Build Coastguard Worker  : N3Vnp<op27_23, op21_20, op11_8, op6, op4,
2664*9880d681SAndroid Build Coastguard Worker          (outs DPR:$Vd), (ins DPR:$Vn, DPR:$Vm), N3RegFrm, itin, OpcodeStr, Dt,
2665*9880d681SAndroid Build Coastguard Worker          [(set DPR:$Vd, (ResTy (IntOp (OpTy DPR:$Vn), (OpTy DPR:$Vm))))]>;
2666*9880d681SAndroid Build Coastguard Worker
2667*9880d681SAndroid Build Coastguard Workerclass N3VDIntSL<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin,
2668*9880d681SAndroid Build Coastguard Worker                string OpcodeStr, string Dt, ValueType Ty, SDPatternOperator IntOp>
2669*9880d681SAndroid Build Coastguard Worker  : N3VLane32<0, 1, op21_20, op11_8, 1, 0,
2670*9880d681SAndroid Build Coastguard Worker        (outs DPR:$Vd), (ins DPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane),
2671*9880d681SAndroid Build Coastguard Worker        NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "",
2672*9880d681SAndroid Build Coastguard Worker        [(set (Ty DPR:$Vd),
2673*9880d681SAndroid Build Coastguard Worker              (Ty (IntOp (Ty DPR:$Vn),
2674*9880d681SAndroid Build Coastguard Worker                         (Ty (NEONvduplane (Ty DPR_VFP2:$Vm),
2675*9880d681SAndroid Build Coastguard Worker                                           imm:$lane)))))]> {
2676*9880d681SAndroid Build Coastguard Worker  let isCommutable = 0;
2677*9880d681SAndroid Build Coastguard Worker}
2678*9880d681SAndroid Build Coastguard Worker
2679*9880d681SAndroid Build Coastguard Workerclass N3VDIntSL16<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin,
2680*9880d681SAndroid Build Coastguard Worker                  string OpcodeStr, string Dt, ValueType Ty, SDPatternOperator IntOp>
2681*9880d681SAndroid Build Coastguard Worker  : N3VLane16<0, 1, op21_20, op11_8, 1, 0,
2682*9880d681SAndroid Build Coastguard Worker        (outs DPR:$Vd), (ins DPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane),
2683*9880d681SAndroid Build Coastguard Worker        NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "",
2684*9880d681SAndroid Build Coastguard Worker        [(set (Ty DPR:$Vd),
2685*9880d681SAndroid Build Coastguard Worker              (Ty (IntOp (Ty DPR:$Vn),
2686*9880d681SAndroid Build Coastguard Worker                         (Ty (NEONvduplane (Ty DPR_8:$Vm), imm:$lane)))))]> {
2687*9880d681SAndroid Build Coastguard Worker  let isCommutable = 0;
2688*9880d681SAndroid Build Coastguard Worker}
2689*9880d681SAndroid Build Coastguard Workerclass N3VDIntSh<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2690*9880d681SAndroid Build Coastguard Worker              Format f, InstrItinClass itin, string OpcodeStr, string Dt,
2691*9880d681SAndroid Build Coastguard Worker              ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp>
2692*9880d681SAndroid Build Coastguard Worker  : N3V<op24, op23, op21_20, op11_8, 0, op4,
2693*9880d681SAndroid Build Coastguard Worker        (outs DPR:$Vd), (ins DPR:$Vm, DPR:$Vn), f, itin,
2694*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vm, $Vn", "",
2695*9880d681SAndroid Build Coastguard Worker        [(set DPR:$Vd, (ResTy (IntOp (OpTy DPR:$Vm), (OpTy DPR:$Vn))))]> {
2696*9880d681SAndroid Build Coastguard Worker  let TwoOperandAliasConstraint = "$Vm = $Vd";
2697*9880d681SAndroid Build Coastguard Worker  let isCommutable = 0;
2698*9880d681SAndroid Build Coastguard Worker}
2699*9880d681SAndroid Build Coastguard Worker
2700*9880d681SAndroid Build Coastguard Workerclass N3VQInt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2701*9880d681SAndroid Build Coastguard Worker              Format f, InstrItinClass itin, string OpcodeStr, string Dt,
2702*9880d681SAndroid Build Coastguard Worker              ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp, bit Commutable>
2703*9880d681SAndroid Build Coastguard Worker  : N3V<op24, op23, op21_20, op11_8, 1, op4,
2704*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd), (ins QPR:$Vn, QPR:$Vm), f, itin,
2705*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm", "",
2706*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$Vn), (OpTy QPR:$Vm))))]> {
2707*9880d681SAndroid Build Coastguard Worker  // All of these have a two-operand InstAlias.
2708*9880d681SAndroid Build Coastguard Worker  let TwoOperandAliasConstraint = "$Vn = $Vd";
2709*9880d681SAndroid Build Coastguard Worker  let isCommutable = Commutable;
2710*9880d681SAndroid Build Coastguard Worker}
2711*9880d681SAndroid Build Coastguard Worker
2712*9880d681SAndroid Build Coastguard Workerclass N3VQIntnp<bits<5> op27_23, bits<2> op21_20, bits<4> op11_8, bit op6,
2713*9880d681SAndroid Build Coastguard Worker                bit op4, Format f, InstrItinClass itin, string OpcodeStr,
2714*9880d681SAndroid Build Coastguard Worker                string Dt, ValueType ResTy, ValueType OpTy,
2715*9880d681SAndroid Build Coastguard Worker                SDPatternOperator IntOp, bit Commutable>
2716*9880d681SAndroid Build Coastguard Worker  : N3Vnp<op27_23, op21_20, op11_8, op6, op4,
2717*9880d681SAndroid Build Coastguard Worker          (outs QPR:$Vd), (ins QPR:$Vn, QPR:$Vm), f, itin, OpcodeStr, Dt,
2718*9880d681SAndroid Build Coastguard Worker          [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$Vn), (OpTy QPR:$Vm))))]>;
2719*9880d681SAndroid Build Coastguard Worker
2720*9880d681SAndroid Build Coastguard Worker// Same as N3VQIntnp but with Vd as a src register.
2721*9880d681SAndroid Build Coastguard Workerclass N3VQInt3np<bits<5> op27_23, bits<2> op21_20, bits<4> op11_8, bit op6,
2722*9880d681SAndroid Build Coastguard Worker                bit op4, Format f, InstrItinClass itin, string OpcodeStr,
2723*9880d681SAndroid Build Coastguard Worker                string Dt, ValueType ResTy, ValueType OpTy,
2724*9880d681SAndroid Build Coastguard Worker                SDPatternOperator IntOp, bit Commutable>
2725*9880d681SAndroid Build Coastguard Worker  : N3Vnp<op27_23, op21_20, op11_8, op6, op4,
2726*9880d681SAndroid Build Coastguard Worker          (outs QPR:$Vd), (ins QPR:$src, QPR:$Vn, QPR:$Vm),
2727*9880d681SAndroid Build Coastguard Worker          f, itin, OpcodeStr, Dt,
2728*9880d681SAndroid Build Coastguard Worker          [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$src), (OpTy QPR:$Vn),
2729*9880d681SAndroid Build Coastguard Worker                                       (OpTy QPR:$Vm))))]> {
2730*9880d681SAndroid Build Coastguard Worker  let Constraints = "$src = $Vd";
2731*9880d681SAndroid Build Coastguard Worker}
2732*9880d681SAndroid Build Coastguard Worker
2733*9880d681SAndroid Build Coastguard Workerclass N3VQIntSL<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin,
2734*9880d681SAndroid Build Coastguard Worker                string OpcodeStr, string Dt,
2735*9880d681SAndroid Build Coastguard Worker                ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp>
2736*9880d681SAndroid Build Coastguard Worker  : N3VLane32<1, 1, op21_20, op11_8, 1, 0,
2737*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd), (ins QPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane),
2738*9880d681SAndroid Build Coastguard Worker        NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "",
2739*9880d681SAndroid Build Coastguard Worker        [(set (ResTy QPR:$Vd),
2740*9880d681SAndroid Build Coastguard Worker              (ResTy (IntOp (ResTy QPR:$Vn),
2741*9880d681SAndroid Build Coastguard Worker                            (ResTy (NEONvduplane (OpTy DPR_VFP2:$Vm),
2742*9880d681SAndroid Build Coastguard Worker                                                 imm:$lane)))))]> {
2743*9880d681SAndroid Build Coastguard Worker  let isCommutable = 0;
2744*9880d681SAndroid Build Coastguard Worker}
2745*9880d681SAndroid Build Coastguard Workerclass N3VQIntSL16<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin,
2746*9880d681SAndroid Build Coastguard Worker                  string OpcodeStr, string Dt,
2747*9880d681SAndroid Build Coastguard Worker                  ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp>
2748*9880d681SAndroid Build Coastguard Worker  : N3VLane16<1, 1, op21_20, op11_8, 1, 0,
2749*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd), (ins QPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane),
2750*9880d681SAndroid Build Coastguard Worker        NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "",
2751*9880d681SAndroid Build Coastguard Worker        [(set (ResTy QPR:$Vd),
2752*9880d681SAndroid Build Coastguard Worker              (ResTy (IntOp (ResTy QPR:$Vn),
2753*9880d681SAndroid Build Coastguard Worker                            (ResTy (NEONvduplane (OpTy DPR_8:$Vm),
2754*9880d681SAndroid Build Coastguard Worker                                                 imm:$lane)))))]> {
2755*9880d681SAndroid Build Coastguard Worker  let isCommutable = 0;
2756*9880d681SAndroid Build Coastguard Worker}
2757*9880d681SAndroid Build Coastguard Workerclass N3VQIntSh<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2758*9880d681SAndroid Build Coastguard Worker              Format f, InstrItinClass itin, string OpcodeStr, string Dt,
2759*9880d681SAndroid Build Coastguard Worker              ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp>
2760*9880d681SAndroid Build Coastguard Worker  : N3V<op24, op23, op21_20, op11_8, 1, op4,
2761*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd), (ins QPR:$Vm, QPR:$Vn), f, itin,
2762*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vm, $Vn", "",
2763*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$Vm), (OpTy QPR:$Vn))))]> {
2764*9880d681SAndroid Build Coastguard Worker  let TwoOperandAliasConstraint = "$Vm = $Vd";
2765*9880d681SAndroid Build Coastguard Worker  let isCommutable = 0;
2766*9880d681SAndroid Build Coastguard Worker}
2767*9880d681SAndroid Build Coastguard Worker
2768*9880d681SAndroid Build Coastguard Worker// Multiply-Add/Sub operations: double- and quad-register.
2769*9880d681SAndroid Build Coastguard Workerclass N3VDMulOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2770*9880d681SAndroid Build Coastguard Worker                InstrItinClass itin, string OpcodeStr, string Dt,
2771*9880d681SAndroid Build Coastguard Worker                ValueType Ty, SDPatternOperator MulOp, SDPatternOperator OpNode>
2772*9880d681SAndroid Build Coastguard Worker  : N3V<op24, op23, op21_20, op11_8, 0, op4,
2773*9880d681SAndroid Build Coastguard Worker        (outs DPR:$Vd), (ins DPR:$src1, DPR:$Vn, DPR:$Vm), N3RegFrm, itin,
2774*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd",
2775*9880d681SAndroid Build Coastguard Worker        [(set DPR:$Vd, (Ty (OpNode DPR:$src1,
2776*9880d681SAndroid Build Coastguard Worker                             (Ty (MulOp DPR:$Vn, DPR:$Vm)))))]>;
2777*9880d681SAndroid Build Coastguard Worker
2778*9880d681SAndroid Build Coastguard Workerclass N3VDMulOpSL<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin,
2779*9880d681SAndroid Build Coastguard Worker                  string OpcodeStr, string Dt,
2780*9880d681SAndroid Build Coastguard Worker                  ValueType Ty, SDPatternOperator MulOp, SDPatternOperator ShOp>
2781*9880d681SAndroid Build Coastguard Worker  : N3VLane32<0, 1, op21_20, op11_8, 1, 0,
2782*9880d681SAndroid Build Coastguard Worker        (outs DPR:$Vd),
2783*9880d681SAndroid Build Coastguard Worker        (ins DPR:$src1, DPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane),
2784*9880d681SAndroid Build Coastguard Worker        NVMulSLFrm, itin,
2785*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "$src1 = $Vd",
2786*9880d681SAndroid Build Coastguard Worker        [(set (Ty DPR:$Vd),
2787*9880d681SAndroid Build Coastguard Worker              (Ty (ShOp (Ty DPR:$src1),
2788*9880d681SAndroid Build Coastguard Worker                        (Ty (MulOp DPR:$Vn,
2789*9880d681SAndroid Build Coastguard Worker                                   (Ty (NEONvduplane (Ty DPR_VFP2:$Vm),
2790*9880d681SAndroid Build Coastguard Worker                                                     imm:$lane)))))))]>;
2791*9880d681SAndroid Build Coastguard Workerclass N3VDMulOpSL16<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin,
2792*9880d681SAndroid Build Coastguard Worker                    string OpcodeStr, string Dt,
2793*9880d681SAndroid Build Coastguard Worker                    ValueType Ty, SDPatternOperator MulOp, SDPatternOperator ShOp>
2794*9880d681SAndroid Build Coastguard Worker  : N3VLane16<0, 1, op21_20, op11_8, 1, 0,
2795*9880d681SAndroid Build Coastguard Worker        (outs DPR:$Vd),
2796*9880d681SAndroid Build Coastguard Worker        (ins DPR:$src1, DPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane),
2797*9880d681SAndroid Build Coastguard Worker        NVMulSLFrm, itin,
2798*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "$src1 = $Vd",
2799*9880d681SAndroid Build Coastguard Worker        [(set (Ty DPR:$Vd),
2800*9880d681SAndroid Build Coastguard Worker              (Ty (ShOp (Ty DPR:$src1),
2801*9880d681SAndroid Build Coastguard Worker                        (Ty (MulOp DPR:$Vn,
2802*9880d681SAndroid Build Coastguard Worker                                   (Ty (NEONvduplane (Ty DPR_8:$Vm),
2803*9880d681SAndroid Build Coastguard Worker                                                     imm:$lane)))))))]>;
2804*9880d681SAndroid Build Coastguard Worker
2805*9880d681SAndroid Build Coastguard Workerclass N3VQMulOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2806*9880d681SAndroid Build Coastguard Worker                InstrItinClass itin, string OpcodeStr, string Dt, ValueType Ty,
2807*9880d681SAndroid Build Coastguard Worker                SDPatternOperator MulOp, SDPatternOperator OpNode>
2808*9880d681SAndroid Build Coastguard Worker  : N3V<op24, op23, op21_20, op11_8, 1, op4,
2809*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd), (ins QPR:$src1, QPR:$Vn, QPR:$Vm), N3RegFrm, itin,
2810*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd",
2811*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd, (Ty (OpNode QPR:$src1,
2812*9880d681SAndroid Build Coastguard Worker                             (Ty (MulOp QPR:$Vn, QPR:$Vm)))))]>;
2813*9880d681SAndroid Build Coastguard Workerclass N3VQMulOpSL<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin,
2814*9880d681SAndroid Build Coastguard Worker                  string OpcodeStr, string Dt, ValueType ResTy, ValueType OpTy,
2815*9880d681SAndroid Build Coastguard Worker                  SDPatternOperator MulOp, SDPatternOperator ShOp>
2816*9880d681SAndroid Build Coastguard Worker  : N3VLane32<1, 1, op21_20, op11_8, 1, 0,
2817*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd),
2818*9880d681SAndroid Build Coastguard Worker        (ins QPR:$src1, QPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane),
2819*9880d681SAndroid Build Coastguard Worker        NVMulSLFrm, itin,
2820*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "$src1 = $Vd",
2821*9880d681SAndroid Build Coastguard Worker        [(set (ResTy QPR:$Vd),
2822*9880d681SAndroid Build Coastguard Worker              (ResTy (ShOp (ResTy QPR:$src1),
2823*9880d681SAndroid Build Coastguard Worker                           (ResTy (MulOp QPR:$Vn,
2824*9880d681SAndroid Build Coastguard Worker                                   (ResTy (NEONvduplane (OpTy DPR_VFP2:$Vm),
2825*9880d681SAndroid Build Coastguard Worker                                                        imm:$lane)))))))]>;
2826*9880d681SAndroid Build Coastguard Workerclass N3VQMulOpSL16<bits<2> op21_20, bits<4> op11_8, InstrItinClass itin,
2827*9880d681SAndroid Build Coastguard Worker                    string OpcodeStr, string Dt,
2828*9880d681SAndroid Build Coastguard Worker                    ValueType ResTy, ValueType OpTy,
2829*9880d681SAndroid Build Coastguard Worker                    SDPatternOperator MulOp, SDPatternOperator ShOp>
2830*9880d681SAndroid Build Coastguard Worker  : N3VLane16<1, 1, op21_20, op11_8, 1, 0,
2831*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd),
2832*9880d681SAndroid Build Coastguard Worker        (ins QPR:$src1, QPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane),
2833*9880d681SAndroid Build Coastguard Worker        NVMulSLFrm, itin,
2834*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "$src1 = $Vd",
2835*9880d681SAndroid Build Coastguard Worker        [(set (ResTy QPR:$Vd),
2836*9880d681SAndroid Build Coastguard Worker              (ResTy (ShOp (ResTy QPR:$src1),
2837*9880d681SAndroid Build Coastguard Worker                           (ResTy (MulOp QPR:$Vn,
2838*9880d681SAndroid Build Coastguard Worker                                   (ResTy (NEONvduplane (OpTy DPR_8:$Vm),
2839*9880d681SAndroid Build Coastguard Worker                                                        imm:$lane)))))))]>;
2840*9880d681SAndroid Build Coastguard Worker
2841*9880d681SAndroid Build Coastguard Worker// Neon Intrinsic-Op instructions (VABA): double- and quad-register.
2842*9880d681SAndroid Build Coastguard Workerclass N3VDIntOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2843*9880d681SAndroid Build Coastguard Worker                InstrItinClass itin, string OpcodeStr, string Dt,
2844*9880d681SAndroid Build Coastguard Worker                ValueType Ty, SDPatternOperator IntOp, SDNode OpNode>
2845*9880d681SAndroid Build Coastguard Worker  : N3V<op24, op23, op21_20, op11_8, 0, op4,
2846*9880d681SAndroid Build Coastguard Worker        (outs DPR:$Vd), (ins DPR:$src1, DPR:$Vn, DPR:$Vm), N3RegFrm, itin,
2847*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd",
2848*9880d681SAndroid Build Coastguard Worker        [(set DPR:$Vd, (Ty (OpNode DPR:$src1,
2849*9880d681SAndroid Build Coastguard Worker                             (Ty (IntOp (Ty DPR:$Vn), (Ty DPR:$Vm))))))]>;
2850*9880d681SAndroid Build Coastguard Workerclass N3VQIntOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2851*9880d681SAndroid Build Coastguard Worker                InstrItinClass itin, string OpcodeStr, string Dt,
2852*9880d681SAndroid Build Coastguard Worker                ValueType Ty, SDPatternOperator IntOp, SDNode OpNode>
2853*9880d681SAndroid Build Coastguard Worker  : N3V<op24, op23, op21_20, op11_8, 1, op4,
2854*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd), (ins QPR:$src1, QPR:$Vn, QPR:$Vm), N3RegFrm, itin,
2855*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd",
2856*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd, (Ty (OpNode QPR:$src1,
2857*9880d681SAndroid Build Coastguard Worker                             (Ty (IntOp (Ty QPR:$Vn), (Ty QPR:$Vm))))))]>;
2858*9880d681SAndroid Build Coastguard Worker
2859*9880d681SAndroid Build Coastguard Worker// Neon 3-argument intrinsics, both double- and quad-register.
2860*9880d681SAndroid Build Coastguard Worker// The destination register is also used as the first source operand register.
2861*9880d681SAndroid Build Coastguard Workerclass N3VDInt3<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2862*9880d681SAndroid Build Coastguard Worker               InstrItinClass itin, string OpcodeStr, string Dt,
2863*9880d681SAndroid Build Coastguard Worker               ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp>
2864*9880d681SAndroid Build Coastguard Worker  : N3V<op24, op23, op21_20, op11_8, 0, op4,
2865*9880d681SAndroid Build Coastguard Worker        (outs DPR:$Vd), (ins DPR:$src1, DPR:$Vn, DPR:$Vm), N3RegFrm, itin,
2866*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd",
2867*9880d681SAndroid Build Coastguard Worker        [(set DPR:$Vd, (ResTy (IntOp (OpTy DPR:$src1),
2868*9880d681SAndroid Build Coastguard Worker                                      (OpTy DPR:$Vn), (OpTy DPR:$Vm))))]>;
2869*9880d681SAndroid Build Coastguard Workerclass N3VQInt3<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2870*9880d681SAndroid Build Coastguard Worker               InstrItinClass itin, string OpcodeStr, string Dt,
2871*9880d681SAndroid Build Coastguard Worker               ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp>
2872*9880d681SAndroid Build Coastguard Worker  : N3V<op24, op23, op21_20, op11_8, 1, op4,
2873*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd), (ins QPR:$src1, QPR:$Vn, QPR:$Vm), N3RegFrm, itin,
2874*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd",
2875*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$src1),
2876*9880d681SAndroid Build Coastguard Worker                                      (OpTy QPR:$Vn), (OpTy QPR:$Vm))))]>;
2877*9880d681SAndroid Build Coastguard Worker
2878*9880d681SAndroid Build Coastguard Worker// Long Multiply-Add/Sub operations.
2879*9880d681SAndroid Build Coastguard Workerclass N3VLMulOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2880*9880d681SAndroid Build Coastguard Worker                InstrItinClass itin, string OpcodeStr, string Dt,
2881*9880d681SAndroid Build Coastguard Worker                ValueType TyQ, ValueType TyD, SDNode MulOp, SDNode OpNode>
2882*9880d681SAndroid Build Coastguard Worker  : N3V<op24, op23, op21_20, op11_8, 0, op4,
2883*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd), (ins QPR:$src1, DPR:$Vn, DPR:$Vm), N3RegFrm, itin,
2884*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd",
2885*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd, (OpNode (TyQ QPR:$src1),
2886*9880d681SAndroid Build Coastguard Worker                                (TyQ (MulOp (TyD DPR:$Vn),
2887*9880d681SAndroid Build Coastguard Worker                                            (TyD DPR:$Vm)))))]>;
2888*9880d681SAndroid Build Coastguard Workerclass N3VLMulOpSL<bit op24, bits<2> op21_20, bits<4> op11_8,
2889*9880d681SAndroid Build Coastguard Worker                  InstrItinClass itin, string OpcodeStr, string Dt,
2890*9880d681SAndroid Build Coastguard Worker                  ValueType TyQ, ValueType TyD, SDNode MulOp, SDNode OpNode>
2891*9880d681SAndroid Build Coastguard Worker  : N3VLane32<op24, 1, op21_20, op11_8, 1, 0, (outs QPR:$Vd),
2892*9880d681SAndroid Build Coastguard Worker        (ins QPR:$src1, DPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane),
2893*9880d681SAndroid Build Coastguard Worker        NVMulSLFrm, itin,
2894*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "$src1 = $Vd",
2895*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd,
2896*9880d681SAndroid Build Coastguard Worker          (OpNode (TyQ QPR:$src1),
2897*9880d681SAndroid Build Coastguard Worker                  (TyQ (MulOp (TyD DPR:$Vn),
2898*9880d681SAndroid Build Coastguard Worker                              (TyD (NEONvduplane (TyD DPR_VFP2:$Vm),
2899*9880d681SAndroid Build Coastguard Worker                                                 imm:$lane))))))]>;
2900*9880d681SAndroid Build Coastguard Workerclass N3VLMulOpSL16<bit op24, bits<2> op21_20, bits<4> op11_8,
2901*9880d681SAndroid Build Coastguard Worker                    InstrItinClass itin, string OpcodeStr, string Dt,
2902*9880d681SAndroid Build Coastguard Worker                    ValueType TyQ, ValueType TyD, SDNode MulOp, SDNode OpNode>
2903*9880d681SAndroid Build Coastguard Worker  : N3VLane16<op24, 1, op21_20, op11_8, 1, 0, (outs QPR:$Vd),
2904*9880d681SAndroid Build Coastguard Worker        (ins QPR:$src1, DPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane),
2905*9880d681SAndroid Build Coastguard Worker        NVMulSLFrm, itin,
2906*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "$src1 = $Vd",
2907*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd,
2908*9880d681SAndroid Build Coastguard Worker          (OpNode (TyQ QPR:$src1),
2909*9880d681SAndroid Build Coastguard Worker                  (TyQ (MulOp (TyD DPR:$Vn),
2910*9880d681SAndroid Build Coastguard Worker                              (TyD (NEONvduplane (TyD DPR_8:$Vm),
2911*9880d681SAndroid Build Coastguard Worker                                                 imm:$lane))))))]>;
2912*9880d681SAndroid Build Coastguard Worker
2913*9880d681SAndroid Build Coastguard Worker// Long Intrinsic-Op vector operations with explicit extend (VABAL).
2914*9880d681SAndroid Build Coastguard Workerclass N3VLIntExtOp<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2915*9880d681SAndroid Build Coastguard Worker                   InstrItinClass itin, string OpcodeStr, string Dt,
2916*9880d681SAndroid Build Coastguard Worker                   ValueType TyQ, ValueType TyD, SDPatternOperator IntOp, SDNode ExtOp,
2917*9880d681SAndroid Build Coastguard Worker                   SDNode OpNode>
2918*9880d681SAndroid Build Coastguard Worker  : N3V<op24, op23, op21_20, op11_8, 0, op4,
2919*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd), (ins QPR:$src1, DPR:$Vn, DPR:$Vm), N3RegFrm, itin,
2920*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd",
2921*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd, (OpNode (TyQ QPR:$src1),
2922*9880d681SAndroid Build Coastguard Worker                                (TyQ (ExtOp (TyD (IntOp (TyD DPR:$Vn),
2923*9880d681SAndroid Build Coastguard Worker                                                        (TyD DPR:$Vm)))))))]>;
2924*9880d681SAndroid Build Coastguard Worker
2925*9880d681SAndroid Build Coastguard Worker// Neon Long 3-argument intrinsic.  The destination register is
2926*9880d681SAndroid Build Coastguard Worker// a quad-register and is also used as the first source operand register.
2927*9880d681SAndroid Build Coastguard Workerclass N3VLInt3<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2928*9880d681SAndroid Build Coastguard Worker               InstrItinClass itin, string OpcodeStr, string Dt,
2929*9880d681SAndroid Build Coastguard Worker               ValueType TyQ, ValueType TyD, SDPatternOperator IntOp>
2930*9880d681SAndroid Build Coastguard Worker  : N3V<op24, op23, op21_20, op11_8, 0, op4,
2931*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd), (ins QPR:$src1, DPR:$Vn, DPR:$Vm), N3RegFrm, itin,
2932*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm", "$src1 = $Vd",
2933*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd,
2934*9880d681SAndroid Build Coastguard Worker          (TyQ (IntOp (TyQ QPR:$src1), (TyD DPR:$Vn), (TyD DPR:$Vm))))]>;
2935*9880d681SAndroid Build Coastguard Workerclass N3VLInt3SL<bit op24, bits<2> op21_20, bits<4> op11_8, InstrItinClass itin,
2936*9880d681SAndroid Build Coastguard Worker                 string OpcodeStr, string Dt,
2937*9880d681SAndroid Build Coastguard Worker                 ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp>
2938*9880d681SAndroid Build Coastguard Worker  : N3VLane32<op24, 1, op21_20, op11_8, 1, 0,
2939*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd),
2940*9880d681SAndroid Build Coastguard Worker        (ins QPR:$src1, DPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane),
2941*9880d681SAndroid Build Coastguard Worker        NVMulSLFrm, itin,
2942*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "$src1 = $Vd",
2943*9880d681SAndroid Build Coastguard Worker        [(set (ResTy QPR:$Vd),
2944*9880d681SAndroid Build Coastguard Worker              (ResTy (IntOp (ResTy QPR:$src1),
2945*9880d681SAndroid Build Coastguard Worker                            (OpTy DPR:$Vn),
2946*9880d681SAndroid Build Coastguard Worker                            (OpTy (NEONvduplane (OpTy DPR_VFP2:$Vm),
2947*9880d681SAndroid Build Coastguard Worker                                                imm:$lane)))))]>;
2948*9880d681SAndroid Build Coastguard Workerclass N3VLInt3SL16<bit op24, bits<2> op21_20, bits<4> op11_8,
2949*9880d681SAndroid Build Coastguard Worker                   InstrItinClass itin, string OpcodeStr, string Dt,
2950*9880d681SAndroid Build Coastguard Worker                   ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp>
2951*9880d681SAndroid Build Coastguard Worker  : N3VLane16<op24, 1, op21_20, op11_8, 1, 0,
2952*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd),
2953*9880d681SAndroid Build Coastguard Worker        (ins QPR:$src1, DPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane),
2954*9880d681SAndroid Build Coastguard Worker        NVMulSLFrm, itin,
2955*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "$src1 = $Vd",
2956*9880d681SAndroid Build Coastguard Worker        [(set (ResTy QPR:$Vd),
2957*9880d681SAndroid Build Coastguard Worker              (ResTy (IntOp (ResTy QPR:$src1),
2958*9880d681SAndroid Build Coastguard Worker                            (OpTy DPR:$Vn),
2959*9880d681SAndroid Build Coastguard Worker                            (OpTy (NEONvduplane (OpTy DPR_8:$Vm),
2960*9880d681SAndroid Build Coastguard Worker                                                imm:$lane)))))]>;
2961*9880d681SAndroid Build Coastguard Worker
2962*9880d681SAndroid Build Coastguard Worker// Narrowing 3-register intrinsics.
2963*9880d681SAndroid Build Coastguard Workerclass N3VNInt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2964*9880d681SAndroid Build Coastguard Worker              string OpcodeStr, string Dt, ValueType TyD, ValueType TyQ,
2965*9880d681SAndroid Build Coastguard Worker              SDPatternOperator IntOp, bit Commutable>
2966*9880d681SAndroid Build Coastguard Worker  : N3V<op24, op23, op21_20, op11_8, 0, op4,
2967*9880d681SAndroid Build Coastguard Worker        (outs DPR:$Vd), (ins QPR:$Vn, QPR:$Vm), N3RegFrm, IIC_VBINi4D,
2968*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm", "",
2969*9880d681SAndroid Build Coastguard Worker        [(set DPR:$Vd, (TyD (IntOp (TyQ QPR:$Vn), (TyQ QPR:$Vm))))]> {
2970*9880d681SAndroid Build Coastguard Worker  let isCommutable = Commutable;
2971*9880d681SAndroid Build Coastguard Worker}
2972*9880d681SAndroid Build Coastguard Worker
2973*9880d681SAndroid Build Coastguard Worker// Long 3-register operations.
2974*9880d681SAndroid Build Coastguard Workerclass N3VL<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
2975*9880d681SAndroid Build Coastguard Worker           InstrItinClass itin, string OpcodeStr, string Dt,
2976*9880d681SAndroid Build Coastguard Worker           ValueType TyQ, ValueType TyD, SDNode OpNode, bit Commutable>
2977*9880d681SAndroid Build Coastguard Worker  : N3V<op24, op23, op21_20, op11_8, 0, op4,
2978*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd), (ins DPR:$Vn, DPR:$Vm), N3RegFrm, itin,
2979*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm", "",
2980*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd, (TyQ (OpNode (TyD DPR:$Vn), (TyD DPR:$Vm))))]> {
2981*9880d681SAndroid Build Coastguard Worker  let isCommutable = Commutable;
2982*9880d681SAndroid Build Coastguard Worker}
2983*9880d681SAndroid Build Coastguard Worker
2984*9880d681SAndroid Build Coastguard Workerclass N3VLSL<bit op24, bits<2> op21_20, bits<4> op11_8,
2985*9880d681SAndroid Build Coastguard Worker             InstrItinClass itin, string OpcodeStr, string Dt,
2986*9880d681SAndroid Build Coastguard Worker             ValueType TyQ, ValueType TyD, SDNode OpNode>
2987*9880d681SAndroid Build Coastguard Worker  : N3VLane32<op24, 1, op21_20, op11_8, 1, 0,
2988*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd), (ins DPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane),
2989*9880d681SAndroid Build Coastguard Worker        NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "",
2990*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd,
2991*9880d681SAndroid Build Coastguard Worker          (TyQ (OpNode (TyD DPR:$Vn),
2992*9880d681SAndroid Build Coastguard Worker                       (TyD (NEONvduplane (TyD DPR_VFP2:$Vm),imm:$lane)))))]>;
2993*9880d681SAndroid Build Coastguard Workerclass N3VLSL16<bit op24, bits<2> op21_20, bits<4> op11_8,
2994*9880d681SAndroid Build Coastguard Worker               InstrItinClass itin, string OpcodeStr, string Dt,
2995*9880d681SAndroid Build Coastguard Worker               ValueType TyQ, ValueType TyD, SDNode OpNode>
2996*9880d681SAndroid Build Coastguard Worker  : N3VLane16<op24, 1, op21_20, op11_8, 1, 0,
2997*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd), (ins DPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane),
2998*9880d681SAndroid Build Coastguard Worker        NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "",
2999*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd,
3000*9880d681SAndroid Build Coastguard Worker          (TyQ (OpNode (TyD DPR:$Vn),
3001*9880d681SAndroid Build Coastguard Worker                       (TyD (NEONvduplane (TyD DPR_8:$Vm), imm:$lane)))))]>;
3002*9880d681SAndroid Build Coastguard Worker
3003*9880d681SAndroid Build Coastguard Worker// Long 3-register operations with explicitly extended operands.
3004*9880d681SAndroid Build Coastguard Workerclass N3VLExt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
3005*9880d681SAndroid Build Coastguard Worker              InstrItinClass itin, string OpcodeStr, string Dt,
3006*9880d681SAndroid Build Coastguard Worker              ValueType TyQ, ValueType TyD, SDNode OpNode, SDNode ExtOp,
3007*9880d681SAndroid Build Coastguard Worker              bit Commutable>
3008*9880d681SAndroid Build Coastguard Worker  : N3V<op24, op23, op21_20, op11_8, 0, op4,
3009*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd), (ins DPR:$Vn, DPR:$Vm), N3RegFrm, itin,
3010*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm", "",
3011*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd, (OpNode (TyQ (ExtOp (TyD DPR:$Vn))),
3012*9880d681SAndroid Build Coastguard Worker                                (TyQ (ExtOp (TyD DPR:$Vm)))))]> {
3013*9880d681SAndroid Build Coastguard Worker  let isCommutable = Commutable;
3014*9880d681SAndroid Build Coastguard Worker}
3015*9880d681SAndroid Build Coastguard Worker
3016*9880d681SAndroid Build Coastguard Worker// Long 3-register intrinsics with explicit extend (VABDL).
3017*9880d681SAndroid Build Coastguard Workerclass N3VLIntExt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
3018*9880d681SAndroid Build Coastguard Worker                 InstrItinClass itin, string OpcodeStr, string Dt,
3019*9880d681SAndroid Build Coastguard Worker                 ValueType TyQ, ValueType TyD, SDPatternOperator IntOp, SDNode ExtOp,
3020*9880d681SAndroid Build Coastguard Worker                 bit Commutable>
3021*9880d681SAndroid Build Coastguard Worker  : N3V<op24, op23, op21_20, op11_8, 0, op4,
3022*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd), (ins DPR:$Vn, DPR:$Vm), N3RegFrm, itin,
3023*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm", "",
3024*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd, (TyQ (ExtOp (TyD (IntOp (TyD DPR:$Vn),
3025*9880d681SAndroid Build Coastguard Worker                                                (TyD DPR:$Vm))))))]> {
3026*9880d681SAndroid Build Coastguard Worker  let isCommutable = Commutable;
3027*9880d681SAndroid Build Coastguard Worker}
3028*9880d681SAndroid Build Coastguard Worker
3029*9880d681SAndroid Build Coastguard Worker// Long 3-register intrinsics.
3030*9880d681SAndroid Build Coastguard Workerclass N3VLInt<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
3031*9880d681SAndroid Build Coastguard Worker              InstrItinClass itin, string OpcodeStr, string Dt,
3032*9880d681SAndroid Build Coastguard Worker              ValueType TyQ, ValueType TyD, SDPatternOperator IntOp, bit Commutable>
3033*9880d681SAndroid Build Coastguard Worker  : N3V<op24, op23, op21_20, op11_8, 0, op4,
3034*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd), (ins DPR:$Vn, DPR:$Vm), N3RegFrm, itin,
3035*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm", "",
3036*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd, (TyQ (IntOp (TyD DPR:$Vn), (TyD DPR:$Vm))))]> {
3037*9880d681SAndroid Build Coastguard Worker  let isCommutable = Commutable;
3038*9880d681SAndroid Build Coastguard Worker}
3039*9880d681SAndroid Build Coastguard Worker
3040*9880d681SAndroid Build Coastguard Worker// Same as above, but not predicated.
3041*9880d681SAndroid Build Coastguard Workerclass N3VLIntnp<bits<5> op27_23, bits<2> op21_20, bits<4> op11_8, bit op6,
3042*9880d681SAndroid Build Coastguard Worker                bit op4, InstrItinClass itin, string OpcodeStr,
3043*9880d681SAndroid Build Coastguard Worker                string Dt, ValueType ResTy, ValueType OpTy,
3044*9880d681SAndroid Build Coastguard Worker                SDPatternOperator IntOp, bit Commutable>
3045*9880d681SAndroid Build Coastguard Worker  : N3Vnp<op27_23, op21_20, op11_8, op6, op4,
3046*9880d681SAndroid Build Coastguard Worker          (outs QPR:$Vd), (ins DPR:$Vn, DPR:$Vm), N3RegFrm, itin, OpcodeStr, Dt,
3047*9880d681SAndroid Build Coastguard Worker          [(set QPR:$Vd, (ResTy (IntOp (OpTy DPR:$Vn), (OpTy DPR:$Vm))))]>;
3048*9880d681SAndroid Build Coastguard Worker
3049*9880d681SAndroid Build Coastguard Workerclass N3VLIntSL<bit op24, bits<2> op21_20, bits<4> op11_8, InstrItinClass itin,
3050*9880d681SAndroid Build Coastguard Worker                string OpcodeStr, string Dt,
3051*9880d681SAndroid Build Coastguard Worker                ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp>
3052*9880d681SAndroid Build Coastguard Worker  : N3VLane32<op24, 1, op21_20, op11_8, 1, 0,
3053*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd), (ins DPR:$Vn, DPR_VFP2:$Vm, VectorIndex32:$lane),
3054*9880d681SAndroid Build Coastguard Worker        NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "",
3055*9880d681SAndroid Build Coastguard Worker        [(set (ResTy QPR:$Vd),
3056*9880d681SAndroid Build Coastguard Worker              (ResTy (IntOp (OpTy DPR:$Vn),
3057*9880d681SAndroid Build Coastguard Worker                            (OpTy (NEONvduplane (OpTy DPR_VFP2:$Vm),
3058*9880d681SAndroid Build Coastguard Worker                                                imm:$lane)))))]>;
3059*9880d681SAndroid Build Coastguard Workerclass N3VLIntSL16<bit op24, bits<2> op21_20, bits<4> op11_8,
3060*9880d681SAndroid Build Coastguard Worker                  InstrItinClass itin, string OpcodeStr, string Dt,
3061*9880d681SAndroid Build Coastguard Worker                  ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp>
3062*9880d681SAndroid Build Coastguard Worker  : N3VLane16<op24, 1, op21_20, op11_8, 1, 0,
3063*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd), (ins DPR:$Vn, DPR_8:$Vm, VectorIndex16:$lane),
3064*9880d681SAndroid Build Coastguard Worker        NVMulSLFrm, itin, OpcodeStr, Dt, "$Vd, $Vn, $Vm$lane", "",
3065*9880d681SAndroid Build Coastguard Worker        [(set (ResTy QPR:$Vd),
3066*9880d681SAndroid Build Coastguard Worker              (ResTy (IntOp (OpTy DPR:$Vn),
3067*9880d681SAndroid Build Coastguard Worker                            (OpTy (NEONvduplane (OpTy DPR_8:$Vm),
3068*9880d681SAndroid Build Coastguard Worker                                                imm:$lane)))))]>;
3069*9880d681SAndroid Build Coastguard Worker
3070*9880d681SAndroid Build Coastguard Worker// Wide 3-register operations.
3071*9880d681SAndroid Build Coastguard Workerclass N3VW<bit op24, bit op23, bits<2> op21_20, bits<4> op11_8, bit op4,
3072*9880d681SAndroid Build Coastguard Worker           string OpcodeStr, string Dt, ValueType TyQ, ValueType TyD,
3073*9880d681SAndroid Build Coastguard Worker           SDNode OpNode, SDNode ExtOp, bit Commutable>
3074*9880d681SAndroid Build Coastguard Worker  : N3V<op24, op23, op21_20, op11_8, 0, op4,
3075*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd), (ins QPR:$Vn, DPR:$Vm), N3RegFrm, IIC_VSUBiD,
3076*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vn, $Vm", "",
3077*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd, (OpNode (TyQ QPR:$Vn),
3078*9880d681SAndroid Build Coastguard Worker                                (TyQ (ExtOp (TyD DPR:$Vm)))))]> {
3079*9880d681SAndroid Build Coastguard Worker  // All of these have a two-operand InstAlias.
3080*9880d681SAndroid Build Coastguard Worker  let TwoOperandAliasConstraint = "$Vn = $Vd";
3081*9880d681SAndroid Build Coastguard Worker  let isCommutable = Commutable;
3082*9880d681SAndroid Build Coastguard Worker}
3083*9880d681SAndroid Build Coastguard Worker
3084*9880d681SAndroid Build Coastguard Worker// Pairwise long 2-register intrinsics, both double- and quad-register.
3085*9880d681SAndroid Build Coastguard Workerclass N2VDPLInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18,
3086*9880d681SAndroid Build Coastguard Worker                bits<2> op17_16, bits<5> op11_7, bit op4,
3087*9880d681SAndroid Build Coastguard Worker                string OpcodeStr, string Dt,
3088*9880d681SAndroid Build Coastguard Worker                ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp>
3089*9880d681SAndroid Build Coastguard Worker  : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4, (outs DPR:$Vd),
3090*9880d681SAndroid Build Coastguard Worker        (ins DPR:$Vm), IIC_VSHLiD, OpcodeStr, Dt, "$Vd, $Vm", "",
3091*9880d681SAndroid Build Coastguard Worker        [(set DPR:$Vd, (ResTy (IntOp (OpTy DPR:$Vm))))]>;
3092*9880d681SAndroid Build Coastguard Workerclass N2VQPLInt<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18,
3093*9880d681SAndroid Build Coastguard Worker                bits<2> op17_16, bits<5> op11_7, bit op4,
3094*9880d681SAndroid Build Coastguard Worker                string OpcodeStr, string Dt,
3095*9880d681SAndroid Build Coastguard Worker                ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp>
3096*9880d681SAndroid Build Coastguard Worker  : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 1, op4, (outs QPR:$Vd),
3097*9880d681SAndroid Build Coastguard Worker        (ins QPR:$Vm), IIC_VSHLiD, OpcodeStr, Dt, "$Vd, $Vm", "",
3098*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$Vm))))]>;
3099*9880d681SAndroid Build Coastguard Worker
3100*9880d681SAndroid Build Coastguard Worker// Pairwise long 2-register accumulate intrinsics,
3101*9880d681SAndroid Build Coastguard Worker// both double- and quad-register.
3102*9880d681SAndroid Build Coastguard Worker// The destination register is also used as the first source operand register.
3103*9880d681SAndroid Build Coastguard Workerclass N2VDPLInt2<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18,
3104*9880d681SAndroid Build Coastguard Worker                 bits<2> op17_16, bits<5> op11_7, bit op4,
3105*9880d681SAndroid Build Coastguard Worker                 string OpcodeStr, string Dt,
3106*9880d681SAndroid Build Coastguard Worker                 ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp>
3107*9880d681SAndroid Build Coastguard Worker  : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 0, op4,
3108*9880d681SAndroid Build Coastguard Worker        (outs DPR:$Vd), (ins DPR:$src1, DPR:$Vm), IIC_VPALiD,
3109*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vm", "$src1 = $Vd",
3110*9880d681SAndroid Build Coastguard Worker        [(set DPR:$Vd, (ResTy (IntOp (ResTy DPR:$src1), (OpTy DPR:$Vm))))]>;
3111*9880d681SAndroid Build Coastguard Workerclass N2VQPLInt2<bits<2> op24_23, bits<2> op21_20, bits<2> op19_18,
3112*9880d681SAndroid Build Coastguard Worker                 bits<2> op17_16, bits<5> op11_7, bit op4,
3113*9880d681SAndroid Build Coastguard Worker                 string OpcodeStr, string Dt,
3114*9880d681SAndroid Build Coastguard Worker                 ValueType ResTy, ValueType OpTy, SDPatternOperator IntOp>
3115*9880d681SAndroid Build Coastguard Worker  : N2V<op24_23, op21_20, op19_18, op17_16, op11_7, 1, op4,
3116*9880d681SAndroid Build Coastguard Worker        (outs QPR:$Vd), (ins QPR:$src1, QPR:$Vm), IIC_VPALiQ,
3117*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vm", "$src1 = $Vd",
3118*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd, (ResTy (IntOp (ResTy QPR:$src1), (OpTy QPR:$Vm))))]>;
3119*9880d681SAndroid Build Coastguard Worker
3120*9880d681SAndroid Build Coastguard Worker// Shift by immediate,
3121*9880d681SAndroid Build Coastguard Worker// both double- and quad-register.
3122*9880d681SAndroid Build Coastguard Workerlet TwoOperandAliasConstraint = "$Vm = $Vd" in {
3123*9880d681SAndroid Build Coastguard Workerclass N2VDSh<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4,
3124*9880d681SAndroid Build Coastguard Worker             Format f, InstrItinClass itin, Operand ImmTy,
3125*9880d681SAndroid Build Coastguard Worker             string OpcodeStr, string Dt, ValueType Ty, SDNode OpNode>
3126*9880d681SAndroid Build Coastguard Worker  : N2VImm<op24, op23, op11_8, op7, 0, op4,
3127*9880d681SAndroid Build Coastguard Worker           (outs DPR:$Vd), (ins DPR:$Vm, ImmTy:$SIMM), f, itin,
3128*9880d681SAndroid Build Coastguard Worker           OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "",
3129*9880d681SAndroid Build Coastguard Worker           [(set DPR:$Vd, (Ty (OpNode (Ty DPR:$Vm), (i32 imm:$SIMM))))]>;
3130*9880d681SAndroid Build Coastguard Workerclass N2VQSh<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4,
3131*9880d681SAndroid Build Coastguard Worker             Format f, InstrItinClass itin, Operand ImmTy,
3132*9880d681SAndroid Build Coastguard Worker             string OpcodeStr, string Dt, ValueType Ty, SDNode OpNode>
3133*9880d681SAndroid Build Coastguard Worker  : N2VImm<op24, op23, op11_8, op7, 1, op4,
3134*9880d681SAndroid Build Coastguard Worker           (outs QPR:$Vd), (ins QPR:$Vm, ImmTy:$SIMM), f, itin,
3135*9880d681SAndroid Build Coastguard Worker           OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "",
3136*9880d681SAndroid Build Coastguard Worker           [(set QPR:$Vd, (Ty (OpNode (Ty QPR:$Vm), (i32 imm:$SIMM))))]>;
3137*9880d681SAndroid Build Coastguard Worker}
3138*9880d681SAndroid Build Coastguard Worker
3139*9880d681SAndroid Build Coastguard Worker// Long shift by immediate.
3140*9880d681SAndroid Build Coastguard Workerclass N2VLSh<bit op24, bit op23, bits<4> op11_8, bit op7, bit op6, bit op4,
3141*9880d681SAndroid Build Coastguard Worker             string OpcodeStr, string Dt,
3142*9880d681SAndroid Build Coastguard Worker             ValueType ResTy, ValueType OpTy, Operand ImmTy,
3143*9880d681SAndroid Build Coastguard Worker             SDPatternOperator OpNode>
3144*9880d681SAndroid Build Coastguard Worker  : N2VImm<op24, op23, op11_8, op7, op6, op4,
3145*9880d681SAndroid Build Coastguard Worker           (outs QPR:$Vd), (ins DPR:$Vm, ImmTy:$SIMM), N2RegVShLFrm,
3146*9880d681SAndroid Build Coastguard Worker           IIC_VSHLiD, OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "",
3147*9880d681SAndroid Build Coastguard Worker           [(set QPR:$Vd, (ResTy (OpNode (OpTy DPR:$Vm), ImmTy:$SIMM)))]>;
3148*9880d681SAndroid Build Coastguard Worker
3149*9880d681SAndroid Build Coastguard Worker// Narrow shift by immediate.
3150*9880d681SAndroid Build Coastguard Workerclass N2VNSh<bit op24, bit op23, bits<4> op11_8, bit op7, bit op6, bit op4,
3151*9880d681SAndroid Build Coastguard Worker             InstrItinClass itin, string OpcodeStr, string Dt,
3152*9880d681SAndroid Build Coastguard Worker             ValueType ResTy, ValueType OpTy, Operand ImmTy,
3153*9880d681SAndroid Build Coastguard Worker             SDPatternOperator OpNode>
3154*9880d681SAndroid Build Coastguard Worker  : N2VImm<op24, op23, op11_8, op7, op6, op4,
3155*9880d681SAndroid Build Coastguard Worker           (outs DPR:$Vd), (ins QPR:$Vm, ImmTy:$SIMM), N2RegVShRFrm, itin,
3156*9880d681SAndroid Build Coastguard Worker           OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "",
3157*9880d681SAndroid Build Coastguard Worker           [(set DPR:$Vd, (ResTy (OpNode (OpTy QPR:$Vm),
3158*9880d681SAndroid Build Coastguard Worker                                          (i32 ImmTy:$SIMM))))]>;
3159*9880d681SAndroid Build Coastguard Worker
3160*9880d681SAndroid Build Coastguard Worker// Shift right by immediate and accumulate,
3161*9880d681SAndroid Build Coastguard Worker// both double- and quad-register.
3162*9880d681SAndroid Build Coastguard Workerlet TwoOperandAliasConstraint = "$Vm = $Vd" in {
3163*9880d681SAndroid Build Coastguard Workerclass N2VDShAdd<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4,
3164*9880d681SAndroid Build Coastguard Worker                Operand ImmTy, string OpcodeStr, string Dt,
3165*9880d681SAndroid Build Coastguard Worker                ValueType Ty, SDNode ShOp>
3166*9880d681SAndroid Build Coastguard Worker  : N2VImm<op24, op23, op11_8, op7, 0, op4, (outs DPR:$Vd),
3167*9880d681SAndroid Build Coastguard Worker           (ins DPR:$src1, DPR:$Vm, ImmTy:$SIMM), N2RegVShRFrm, IIC_VPALiD,
3168*9880d681SAndroid Build Coastguard Worker           OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "$src1 = $Vd",
3169*9880d681SAndroid Build Coastguard Worker           [(set DPR:$Vd, (Ty (add DPR:$src1,
3170*9880d681SAndroid Build Coastguard Worker                                (Ty (ShOp DPR:$Vm, (i32 imm:$SIMM))))))]>;
3171*9880d681SAndroid Build Coastguard Workerclass N2VQShAdd<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4,
3172*9880d681SAndroid Build Coastguard Worker                Operand ImmTy, string OpcodeStr, string Dt,
3173*9880d681SAndroid Build Coastguard Worker                ValueType Ty, SDNode ShOp>
3174*9880d681SAndroid Build Coastguard Worker  : N2VImm<op24, op23, op11_8, op7, 1, op4, (outs QPR:$Vd),
3175*9880d681SAndroid Build Coastguard Worker           (ins QPR:$src1, QPR:$Vm, ImmTy:$SIMM), N2RegVShRFrm, IIC_VPALiD,
3176*9880d681SAndroid Build Coastguard Worker           OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "$src1 = $Vd",
3177*9880d681SAndroid Build Coastguard Worker           [(set QPR:$Vd, (Ty (add QPR:$src1,
3178*9880d681SAndroid Build Coastguard Worker                                (Ty (ShOp QPR:$Vm, (i32 imm:$SIMM))))))]>;
3179*9880d681SAndroid Build Coastguard Worker}
3180*9880d681SAndroid Build Coastguard Worker
3181*9880d681SAndroid Build Coastguard Worker// Shift by immediate and insert,
3182*9880d681SAndroid Build Coastguard Worker// both double- and quad-register.
3183*9880d681SAndroid Build Coastguard Workerlet TwoOperandAliasConstraint = "$Vm = $Vd" in {
3184*9880d681SAndroid Build Coastguard Workerclass N2VDShIns<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4,
3185*9880d681SAndroid Build Coastguard Worker                Operand ImmTy, Format f, string OpcodeStr, string Dt,
3186*9880d681SAndroid Build Coastguard Worker                ValueType Ty,SDNode ShOp>
3187*9880d681SAndroid Build Coastguard Worker  : N2VImm<op24, op23, op11_8, op7, 0, op4, (outs DPR:$Vd),
3188*9880d681SAndroid Build Coastguard Worker           (ins DPR:$src1, DPR:$Vm, ImmTy:$SIMM), f, IIC_VSHLiD,
3189*9880d681SAndroid Build Coastguard Worker           OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "$src1 = $Vd",
3190*9880d681SAndroid Build Coastguard Worker           [(set DPR:$Vd, (Ty (ShOp DPR:$src1, DPR:$Vm, (i32 imm:$SIMM))))]>;
3191*9880d681SAndroid Build Coastguard Workerclass N2VQShIns<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4,
3192*9880d681SAndroid Build Coastguard Worker                Operand ImmTy, Format f, string OpcodeStr, string Dt,
3193*9880d681SAndroid Build Coastguard Worker                ValueType Ty,SDNode ShOp>
3194*9880d681SAndroid Build Coastguard Worker  : N2VImm<op24, op23, op11_8, op7, 1, op4, (outs QPR:$Vd),
3195*9880d681SAndroid Build Coastguard Worker           (ins QPR:$src1, QPR:$Vm, ImmTy:$SIMM), f, IIC_VSHLiQ,
3196*9880d681SAndroid Build Coastguard Worker           OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "$src1 = $Vd",
3197*9880d681SAndroid Build Coastguard Worker           [(set QPR:$Vd, (Ty (ShOp QPR:$src1, QPR:$Vm, (i32 imm:$SIMM))))]>;
3198*9880d681SAndroid Build Coastguard Worker}
3199*9880d681SAndroid Build Coastguard Worker
3200*9880d681SAndroid Build Coastguard Worker// Convert, with fractional bits immediate,
3201*9880d681SAndroid Build Coastguard Worker// both double- and quad-register.
3202*9880d681SAndroid Build Coastguard Workerclass N2VCvtD<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4,
3203*9880d681SAndroid Build Coastguard Worker              string OpcodeStr, string Dt, ValueType ResTy, ValueType OpTy,
3204*9880d681SAndroid Build Coastguard Worker              SDPatternOperator IntOp>
3205*9880d681SAndroid Build Coastguard Worker  : N2VImm<op24, op23, op11_8, op7, 0, op4,
3206*9880d681SAndroid Build Coastguard Worker           (outs DPR:$Vd), (ins DPR:$Vm, neon_vcvt_imm32:$SIMM), NVCVTFrm,
3207*9880d681SAndroid Build Coastguard Worker           IIC_VUNAD, OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "",
3208*9880d681SAndroid Build Coastguard Worker           [(set DPR:$Vd, (ResTy (IntOp (OpTy DPR:$Vm), (i32 imm:$SIMM))))]>;
3209*9880d681SAndroid Build Coastguard Workerclass N2VCvtQ<bit op24, bit op23, bits<4> op11_8, bit op7, bit op4,
3210*9880d681SAndroid Build Coastguard Worker              string OpcodeStr, string Dt, ValueType ResTy, ValueType OpTy,
3211*9880d681SAndroid Build Coastguard Worker              SDPatternOperator IntOp>
3212*9880d681SAndroid Build Coastguard Worker  : N2VImm<op24, op23, op11_8, op7, 1, op4,
3213*9880d681SAndroid Build Coastguard Worker           (outs QPR:$Vd), (ins QPR:$Vm, neon_vcvt_imm32:$SIMM), NVCVTFrm,
3214*9880d681SAndroid Build Coastguard Worker           IIC_VUNAQ, OpcodeStr, Dt, "$Vd, $Vm, $SIMM", "",
3215*9880d681SAndroid Build Coastguard Worker           [(set QPR:$Vd, (ResTy (IntOp (OpTy QPR:$Vm), (i32 imm:$SIMM))))]>;
3216*9880d681SAndroid Build Coastguard Worker
3217*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===//
3218*9880d681SAndroid Build Coastguard Worker// Multiclasses
3219*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===//
3220*9880d681SAndroid Build Coastguard Worker
3221*9880d681SAndroid Build Coastguard Worker// Abbreviations used in multiclass suffixes:
3222*9880d681SAndroid Build Coastguard Worker//   Q = quarter int (8 bit) elements
3223*9880d681SAndroid Build Coastguard Worker//   H = half int (16 bit) elements
3224*9880d681SAndroid Build Coastguard Worker//   S = single int (32 bit) elements
3225*9880d681SAndroid Build Coastguard Worker//   D = double int (64 bit) elements
3226*9880d681SAndroid Build Coastguard Worker
3227*9880d681SAndroid Build Coastguard Worker// Neon 2-register vector operations and intrinsics.
3228*9880d681SAndroid Build Coastguard Worker
3229*9880d681SAndroid Build Coastguard Worker// Neon 2-register comparisons.
3230*9880d681SAndroid Build Coastguard Worker//   source operand element sizes of 8, 16 and 32 bits:
3231*9880d681SAndroid Build Coastguard Workermulticlass N2V_QHS_cmp<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16,
3232*9880d681SAndroid Build Coastguard Worker                       bits<5> op11_7, bit op4, string opc, string Dt,
3233*9880d681SAndroid Build Coastguard Worker                       string asm, SDNode OpNode> {
3234*9880d681SAndroid Build Coastguard Worker  // 64-bit vector types.
3235*9880d681SAndroid Build Coastguard Worker  def v8i8  : N2V<op24_23, op21_20, 0b00, op17_16, op11_7, 0, op4,
3236*9880d681SAndroid Build Coastguard Worker                  (outs DPR:$Vd), (ins DPR:$Vm), NoItinerary,
3237*9880d681SAndroid Build Coastguard Worker                  opc, !strconcat(Dt, "8"), asm, "",
3238*9880d681SAndroid Build Coastguard Worker                  [(set DPR:$Vd, (v8i8 (OpNode (v8i8 DPR:$Vm))))]>;
3239*9880d681SAndroid Build Coastguard Worker  def v4i16 : N2V<op24_23, op21_20, 0b01, op17_16, op11_7, 0, op4,
3240*9880d681SAndroid Build Coastguard Worker                  (outs DPR:$Vd), (ins DPR:$Vm), NoItinerary,
3241*9880d681SAndroid Build Coastguard Worker                  opc, !strconcat(Dt, "16"), asm, "",
3242*9880d681SAndroid Build Coastguard Worker                  [(set DPR:$Vd, (v4i16 (OpNode (v4i16 DPR:$Vm))))]>;
3243*9880d681SAndroid Build Coastguard Worker  def v2i32 : N2V<op24_23, op21_20, 0b10, op17_16, op11_7, 0, op4,
3244*9880d681SAndroid Build Coastguard Worker                  (outs DPR:$Vd), (ins DPR:$Vm), NoItinerary,
3245*9880d681SAndroid Build Coastguard Worker                  opc, !strconcat(Dt, "32"), asm, "",
3246*9880d681SAndroid Build Coastguard Worker                  [(set DPR:$Vd, (v2i32 (OpNode (v2i32 DPR:$Vm))))]>;
3247*9880d681SAndroid Build Coastguard Worker  def v2f32 : N2V<op24_23, op21_20, 0b10, op17_16, op11_7, 0, op4,
3248*9880d681SAndroid Build Coastguard Worker                  (outs DPR:$Vd), (ins DPR:$Vm), NoItinerary,
3249*9880d681SAndroid Build Coastguard Worker                  opc, "f32", asm, "",
3250*9880d681SAndroid Build Coastguard Worker                  [(set DPR:$Vd, (v2i32 (OpNode (v2f32 DPR:$Vm))))]> {
3251*9880d681SAndroid Build Coastguard Worker    let Inst{10} = 1; // overwrite F = 1
3252*9880d681SAndroid Build Coastguard Worker  }
3253*9880d681SAndroid Build Coastguard Worker  def v4f16 : N2V<op24_23, op21_20, 0b01, op17_16, op11_7, 0, op4,
3254*9880d681SAndroid Build Coastguard Worker                  (outs DPR:$Vd), (ins DPR:$Vm), NoItinerary,
3255*9880d681SAndroid Build Coastguard Worker                  opc, "f16", asm, "",
3256*9880d681SAndroid Build Coastguard Worker                  [(set DPR:$Vd, (v4i16 (OpNode (v4f16 DPR:$Vm))))]>,
3257*9880d681SAndroid Build Coastguard Worker              Requires<[HasNEON,HasFullFP16]> {
3258*9880d681SAndroid Build Coastguard Worker    let Inst{10} = 1; // overwrite F = 1
3259*9880d681SAndroid Build Coastguard Worker  }
3260*9880d681SAndroid Build Coastguard Worker
3261*9880d681SAndroid Build Coastguard Worker  // 128-bit vector types.
3262*9880d681SAndroid Build Coastguard Worker  def v16i8 : N2V<op24_23, op21_20, 0b00, op17_16, op11_7, 1, op4,
3263*9880d681SAndroid Build Coastguard Worker                  (outs QPR:$Vd), (ins QPR:$Vm), NoItinerary,
3264*9880d681SAndroid Build Coastguard Worker                  opc, !strconcat(Dt, "8"), asm, "",
3265*9880d681SAndroid Build Coastguard Worker                  [(set QPR:$Vd, (v16i8 (OpNode (v16i8 QPR:$Vm))))]>;
3266*9880d681SAndroid Build Coastguard Worker  def v8i16 : N2V<op24_23, op21_20, 0b01, op17_16, op11_7, 1, op4,
3267*9880d681SAndroid Build Coastguard Worker                  (outs QPR:$Vd), (ins QPR:$Vm), NoItinerary,
3268*9880d681SAndroid Build Coastguard Worker                  opc, !strconcat(Dt, "16"), asm, "",
3269*9880d681SAndroid Build Coastguard Worker                  [(set QPR:$Vd, (v8i16 (OpNode (v8i16 QPR:$Vm))))]>;
3270*9880d681SAndroid Build Coastguard Worker  def v4i32 : N2V<op24_23, op21_20, 0b10, op17_16, op11_7, 1, op4,
3271*9880d681SAndroid Build Coastguard Worker                  (outs QPR:$Vd), (ins QPR:$Vm), NoItinerary,
3272*9880d681SAndroid Build Coastguard Worker                  opc, !strconcat(Dt, "32"), asm, "",
3273*9880d681SAndroid Build Coastguard Worker                  [(set QPR:$Vd, (v4i32 (OpNode (v4i32 QPR:$Vm))))]>;
3274*9880d681SAndroid Build Coastguard Worker  def v4f32 : N2V<op24_23, op21_20, 0b10, op17_16, op11_7, 1, op4,
3275*9880d681SAndroid Build Coastguard Worker                  (outs QPR:$Vd), (ins QPR:$Vm), NoItinerary,
3276*9880d681SAndroid Build Coastguard Worker                  opc, "f32", asm, "",
3277*9880d681SAndroid Build Coastguard Worker                  [(set QPR:$Vd, (v4i32 (OpNode (v4f32 QPR:$Vm))))]> {
3278*9880d681SAndroid Build Coastguard Worker    let Inst{10} = 1; // overwrite F = 1
3279*9880d681SAndroid Build Coastguard Worker  }
3280*9880d681SAndroid Build Coastguard Worker  def v8f16 : N2V<op24_23, op21_20, 0b01, op17_16, op11_7, 1, op4,
3281*9880d681SAndroid Build Coastguard Worker                  (outs QPR:$Vd), (ins QPR:$Vm), NoItinerary,
3282*9880d681SAndroid Build Coastguard Worker                  opc, "f16", asm, "",
3283*9880d681SAndroid Build Coastguard Worker                  [(set QPR:$Vd, (v8i16 (OpNode (v8f16 QPR:$Vm))))]>,
3284*9880d681SAndroid Build Coastguard Worker              Requires<[HasNEON,HasFullFP16]> {
3285*9880d681SAndroid Build Coastguard Worker    let Inst{10} = 1; // overwrite F = 1
3286*9880d681SAndroid Build Coastguard Worker  }
3287*9880d681SAndroid Build Coastguard Worker}
3288*9880d681SAndroid Build Coastguard Worker
3289*9880d681SAndroid Build Coastguard Worker
3290*9880d681SAndroid Build Coastguard Worker// Neon 2-register vector intrinsics,
3291*9880d681SAndroid Build Coastguard Worker//   element sizes of 8, 16 and 32 bits:
3292*9880d681SAndroid Build Coastguard Workermulticlass N2VInt_QHS<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16,
3293*9880d681SAndroid Build Coastguard Worker                      bits<5> op11_7, bit op4,
3294*9880d681SAndroid Build Coastguard Worker                      InstrItinClass itinD, InstrItinClass itinQ,
3295*9880d681SAndroid Build Coastguard Worker                      string OpcodeStr, string Dt, SDPatternOperator IntOp> {
3296*9880d681SAndroid Build Coastguard Worker  // 64-bit vector types.
3297*9880d681SAndroid Build Coastguard Worker  def v8i8  : N2VDInt<op24_23, op21_20, 0b00, op17_16, op11_7, op4,
3298*9880d681SAndroid Build Coastguard Worker                      itinD, OpcodeStr, !strconcat(Dt, "8"), v8i8, v8i8, IntOp>;
3299*9880d681SAndroid Build Coastguard Worker  def v4i16 : N2VDInt<op24_23, op21_20, 0b01, op17_16, op11_7, op4,
3300*9880d681SAndroid Build Coastguard Worker                      itinD, OpcodeStr, !strconcat(Dt, "16"),v4i16,v4i16,IntOp>;
3301*9880d681SAndroid Build Coastguard Worker  def v2i32 : N2VDInt<op24_23, op21_20, 0b10, op17_16, op11_7, op4,
3302*9880d681SAndroid Build Coastguard Worker                      itinD, OpcodeStr, !strconcat(Dt, "32"),v2i32,v2i32,IntOp>;
3303*9880d681SAndroid Build Coastguard Worker
3304*9880d681SAndroid Build Coastguard Worker  // 128-bit vector types.
3305*9880d681SAndroid Build Coastguard Worker  def v16i8 : N2VQInt<op24_23, op21_20, 0b00, op17_16, op11_7, op4,
3306*9880d681SAndroid Build Coastguard Worker                      itinQ, OpcodeStr, !strconcat(Dt, "8"), v16i8,v16i8,IntOp>;
3307*9880d681SAndroid Build Coastguard Worker  def v8i16 : N2VQInt<op24_23, op21_20, 0b01, op17_16, op11_7, op4,
3308*9880d681SAndroid Build Coastguard Worker                      itinQ, OpcodeStr, !strconcat(Dt, "16"),v8i16,v8i16,IntOp>;
3309*9880d681SAndroid Build Coastguard Worker  def v4i32 : N2VQInt<op24_23, op21_20, 0b10, op17_16, op11_7, op4,
3310*9880d681SAndroid Build Coastguard Worker                      itinQ, OpcodeStr, !strconcat(Dt, "32"),v4i32,v4i32,IntOp>;
3311*9880d681SAndroid Build Coastguard Worker}
3312*9880d681SAndroid Build Coastguard Worker
3313*9880d681SAndroid Build Coastguard Worker
3314*9880d681SAndroid Build Coastguard Worker// Neon Narrowing 2-register vector operations,
3315*9880d681SAndroid Build Coastguard Worker//   source operand element sizes of 16, 32 and 64 bits:
3316*9880d681SAndroid Build Coastguard Workermulticlass N2VN_HSD<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16,
3317*9880d681SAndroid Build Coastguard Worker                    bits<5> op11_7, bit op6, bit op4,
3318*9880d681SAndroid Build Coastguard Worker                    InstrItinClass itin, string OpcodeStr, string Dt,
3319*9880d681SAndroid Build Coastguard Worker                    SDNode OpNode> {
3320*9880d681SAndroid Build Coastguard Worker  def v8i8  : N2VN<op24_23, op21_20, 0b00, op17_16, op11_7, op6, op4,
3321*9880d681SAndroid Build Coastguard Worker                   itin, OpcodeStr, !strconcat(Dt, "16"),
3322*9880d681SAndroid Build Coastguard Worker                   v8i8, v8i16, OpNode>;
3323*9880d681SAndroid Build Coastguard Worker  def v4i16 : N2VN<op24_23, op21_20, 0b01, op17_16, op11_7, op6, op4,
3324*9880d681SAndroid Build Coastguard Worker                   itin, OpcodeStr, !strconcat(Dt, "32"),
3325*9880d681SAndroid Build Coastguard Worker                   v4i16, v4i32, OpNode>;
3326*9880d681SAndroid Build Coastguard Worker  def v2i32 : N2VN<op24_23, op21_20, 0b10, op17_16, op11_7, op6, op4,
3327*9880d681SAndroid Build Coastguard Worker                   itin, OpcodeStr, !strconcat(Dt, "64"),
3328*9880d681SAndroid Build Coastguard Worker                   v2i32, v2i64, OpNode>;
3329*9880d681SAndroid Build Coastguard Worker}
3330*9880d681SAndroid Build Coastguard Worker
3331*9880d681SAndroid Build Coastguard Worker// Neon Narrowing 2-register vector intrinsics,
3332*9880d681SAndroid Build Coastguard Worker//   source operand element sizes of 16, 32 and 64 bits:
3333*9880d681SAndroid Build Coastguard Workermulticlass N2VNInt_HSD<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16,
3334*9880d681SAndroid Build Coastguard Worker                       bits<5> op11_7, bit op6, bit op4,
3335*9880d681SAndroid Build Coastguard Worker                       InstrItinClass itin, string OpcodeStr, string Dt,
3336*9880d681SAndroid Build Coastguard Worker                       SDPatternOperator IntOp> {
3337*9880d681SAndroid Build Coastguard Worker  def v8i8  : N2VNInt<op24_23, op21_20, 0b00, op17_16, op11_7, op6, op4,
3338*9880d681SAndroid Build Coastguard Worker                      itin, OpcodeStr, !strconcat(Dt, "16"),
3339*9880d681SAndroid Build Coastguard Worker                      v8i8, v8i16, IntOp>;
3340*9880d681SAndroid Build Coastguard Worker  def v4i16 : N2VNInt<op24_23, op21_20, 0b01, op17_16, op11_7, op6, op4,
3341*9880d681SAndroid Build Coastguard Worker                      itin, OpcodeStr, !strconcat(Dt, "32"),
3342*9880d681SAndroid Build Coastguard Worker                      v4i16, v4i32, IntOp>;
3343*9880d681SAndroid Build Coastguard Worker  def v2i32 : N2VNInt<op24_23, op21_20, 0b10, op17_16, op11_7, op6, op4,
3344*9880d681SAndroid Build Coastguard Worker                      itin, OpcodeStr, !strconcat(Dt, "64"),
3345*9880d681SAndroid Build Coastguard Worker                      v2i32, v2i64, IntOp>;
3346*9880d681SAndroid Build Coastguard Worker}
3347*9880d681SAndroid Build Coastguard Worker
3348*9880d681SAndroid Build Coastguard Worker
3349*9880d681SAndroid Build Coastguard Worker// Neon Lengthening 2-register vector intrinsic (currently specific to VMOVL).
3350*9880d681SAndroid Build Coastguard Worker//   source operand element sizes of 16, 32 and 64 bits:
3351*9880d681SAndroid Build Coastguard Workermulticlass N2VL_QHS<bits<2> op24_23, bits<5> op11_7, bit op6, bit op4,
3352*9880d681SAndroid Build Coastguard Worker                    string OpcodeStr, string Dt, SDNode OpNode> {
3353*9880d681SAndroid Build Coastguard Worker  def v8i16 : N2VL<op24_23, 0b00, 0b10, 0b00, op11_7, op6, op4, IIC_VQUNAiD,
3354*9880d681SAndroid Build Coastguard Worker                   OpcodeStr, !strconcat(Dt, "8"), v8i16, v8i8, OpNode>;
3355*9880d681SAndroid Build Coastguard Worker  def v4i32 : N2VL<op24_23, 0b01, 0b00, 0b00, op11_7, op6, op4, IIC_VQUNAiD,
3356*9880d681SAndroid Build Coastguard Worker                   OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16, OpNode>;
3357*9880d681SAndroid Build Coastguard Worker  def v2i64 : N2VL<op24_23, 0b10, 0b00, 0b00, op11_7, op6, op4, IIC_VQUNAiD,
3358*9880d681SAndroid Build Coastguard Worker                   OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, OpNode>;
3359*9880d681SAndroid Build Coastguard Worker}
3360*9880d681SAndroid Build Coastguard Worker
3361*9880d681SAndroid Build Coastguard Worker
3362*9880d681SAndroid Build Coastguard Worker// Neon 3-register vector operations.
3363*9880d681SAndroid Build Coastguard Worker
3364*9880d681SAndroid Build Coastguard Worker// First with only element sizes of 8, 16 and 32 bits:
3365*9880d681SAndroid Build Coastguard Workermulticlass N3V_QHS<bit op24, bit op23, bits<4> op11_8, bit op4,
3366*9880d681SAndroid Build Coastguard Worker                   InstrItinClass itinD16, InstrItinClass itinD32,
3367*9880d681SAndroid Build Coastguard Worker                   InstrItinClass itinQ16, InstrItinClass itinQ32,
3368*9880d681SAndroid Build Coastguard Worker                   string OpcodeStr, string Dt,
3369*9880d681SAndroid Build Coastguard Worker                   SDNode OpNode, bit Commutable = 0> {
3370*9880d681SAndroid Build Coastguard Worker  // 64-bit vector types.
3371*9880d681SAndroid Build Coastguard Worker  def v8i8  : N3VD<op24, op23, 0b00, op11_8, op4, itinD16,
3372*9880d681SAndroid Build Coastguard Worker                   OpcodeStr, !strconcat(Dt, "8"),
3373*9880d681SAndroid Build Coastguard Worker                   v8i8, v8i8, OpNode, Commutable>;
3374*9880d681SAndroid Build Coastguard Worker  def v4i16 : N3VD<op24, op23, 0b01, op11_8, op4, itinD16,
3375*9880d681SAndroid Build Coastguard Worker                   OpcodeStr, !strconcat(Dt, "16"),
3376*9880d681SAndroid Build Coastguard Worker                   v4i16, v4i16, OpNode, Commutable>;
3377*9880d681SAndroid Build Coastguard Worker  def v2i32 : N3VD<op24, op23, 0b10, op11_8, op4, itinD32,
3378*9880d681SAndroid Build Coastguard Worker                   OpcodeStr, !strconcat(Dt, "32"),
3379*9880d681SAndroid Build Coastguard Worker                   v2i32, v2i32, OpNode, Commutable>;
3380*9880d681SAndroid Build Coastguard Worker
3381*9880d681SAndroid Build Coastguard Worker  // 128-bit vector types.
3382*9880d681SAndroid Build Coastguard Worker  def v16i8 : N3VQ<op24, op23, 0b00, op11_8, op4, itinQ16,
3383*9880d681SAndroid Build Coastguard Worker                   OpcodeStr, !strconcat(Dt, "8"),
3384*9880d681SAndroid Build Coastguard Worker                   v16i8, v16i8, OpNode, Commutable>;
3385*9880d681SAndroid Build Coastguard Worker  def v8i16 : N3VQ<op24, op23, 0b01, op11_8, op4, itinQ16,
3386*9880d681SAndroid Build Coastguard Worker                   OpcodeStr, !strconcat(Dt, "16"),
3387*9880d681SAndroid Build Coastguard Worker                   v8i16, v8i16, OpNode, Commutable>;
3388*9880d681SAndroid Build Coastguard Worker  def v4i32 : N3VQ<op24, op23, 0b10, op11_8, op4, itinQ32,
3389*9880d681SAndroid Build Coastguard Worker                   OpcodeStr, !strconcat(Dt, "32"),
3390*9880d681SAndroid Build Coastguard Worker                   v4i32, v4i32, OpNode, Commutable>;
3391*9880d681SAndroid Build Coastguard Worker}
3392*9880d681SAndroid Build Coastguard Worker
3393*9880d681SAndroid Build Coastguard Workermulticlass N3VSL_HS<bits<4> op11_8, string OpcodeStr, SDNode ShOp> {
3394*9880d681SAndroid Build Coastguard Worker  def v4i16 : N3VDSL16<0b01, op11_8, OpcodeStr, "i16", v4i16, ShOp>;
3395*9880d681SAndroid Build Coastguard Worker  def v2i32 : N3VDSL<0b10, op11_8, IIC_VMULi32D, OpcodeStr, "i32", v2i32, ShOp>;
3396*9880d681SAndroid Build Coastguard Worker  def v8i16 : N3VQSL16<0b01, op11_8, OpcodeStr, "i16", v8i16, v4i16, ShOp>;
3397*9880d681SAndroid Build Coastguard Worker  def v4i32 : N3VQSL<0b10, op11_8, IIC_VMULi32Q, OpcodeStr, "i32",
3398*9880d681SAndroid Build Coastguard Worker                     v4i32, v2i32, ShOp>;
3399*9880d681SAndroid Build Coastguard Worker}
3400*9880d681SAndroid Build Coastguard Worker
3401*9880d681SAndroid Build Coastguard Worker// ....then also with element size 64 bits:
3402*9880d681SAndroid Build Coastguard Workermulticlass N3V_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4,
3403*9880d681SAndroid Build Coastguard Worker                    InstrItinClass itinD, InstrItinClass itinQ,
3404*9880d681SAndroid Build Coastguard Worker                    string OpcodeStr, string Dt,
3405*9880d681SAndroid Build Coastguard Worker                    SDNode OpNode, bit Commutable = 0>
3406*9880d681SAndroid Build Coastguard Worker  : N3V_QHS<op24, op23, op11_8, op4, itinD, itinD, itinQ, itinQ,
3407*9880d681SAndroid Build Coastguard Worker            OpcodeStr, Dt, OpNode, Commutable> {
3408*9880d681SAndroid Build Coastguard Worker  def v1i64 : N3VD<op24, op23, 0b11, op11_8, op4, itinD,
3409*9880d681SAndroid Build Coastguard Worker                   OpcodeStr, !strconcat(Dt, "64"),
3410*9880d681SAndroid Build Coastguard Worker                   v1i64, v1i64, OpNode, Commutable>;
3411*9880d681SAndroid Build Coastguard Worker  def v2i64 : N3VQ<op24, op23, 0b11, op11_8, op4, itinQ,
3412*9880d681SAndroid Build Coastguard Worker                   OpcodeStr, !strconcat(Dt, "64"),
3413*9880d681SAndroid Build Coastguard Worker                   v2i64, v2i64, OpNode, Commutable>;
3414*9880d681SAndroid Build Coastguard Worker}
3415*9880d681SAndroid Build Coastguard Worker
3416*9880d681SAndroid Build Coastguard Worker
3417*9880d681SAndroid Build Coastguard Worker// Neon 3-register vector intrinsics.
3418*9880d681SAndroid Build Coastguard Worker
3419*9880d681SAndroid Build Coastguard Worker// First with only element sizes of 16 and 32 bits:
3420*9880d681SAndroid Build Coastguard Workermulticlass N3VInt_HS<bit op24, bit op23, bits<4> op11_8, bit op4, Format f,
3421*9880d681SAndroid Build Coastguard Worker                     InstrItinClass itinD16, InstrItinClass itinD32,
3422*9880d681SAndroid Build Coastguard Worker                     InstrItinClass itinQ16, InstrItinClass itinQ32,
3423*9880d681SAndroid Build Coastguard Worker                     string OpcodeStr, string Dt,
3424*9880d681SAndroid Build Coastguard Worker                     SDPatternOperator IntOp, bit Commutable = 0> {
3425*9880d681SAndroid Build Coastguard Worker  // 64-bit vector types.
3426*9880d681SAndroid Build Coastguard Worker  def v4i16 : N3VDInt<op24, op23, 0b01, op11_8, op4, f, itinD16,
3427*9880d681SAndroid Build Coastguard Worker                      OpcodeStr, !strconcat(Dt, "16"),
3428*9880d681SAndroid Build Coastguard Worker                      v4i16, v4i16, IntOp, Commutable>;
3429*9880d681SAndroid Build Coastguard Worker  def v2i32 : N3VDInt<op24, op23, 0b10, op11_8, op4, f, itinD32,
3430*9880d681SAndroid Build Coastguard Worker                      OpcodeStr, !strconcat(Dt, "32"),
3431*9880d681SAndroid Build Coastguard Worker                      v2i32, v2i32, IntOp, Commutable>;
3432*9880d681SAndroid Build Coastguard Worker
3433*9880d681SAndroid Build Coastguard Worker  // 128-bit vector types.
3434*9880d681SAndroid Build Coastguard Worker  def v8i16 : N3VQInt<op24, op23, 0b01, op11_8, op4, f, itinQ16,
3435*9880d681SAndroid Build Coastguard Worker                      OpcodeStr, !strconcat(Dt, "16"),
3436*9880d681SAndroid Build Coastguard Worker                      v8i16, v8i16, IntOp, Commutable>;
3437*9880d681SAndroid Build Coastguard Worker  def v4i32 : N3VQInt<op24, op23, 0b10, op11_8, op4, f, itinQ32,
3438*9880d681SAndroid Build Coastguard Worker                      OpcodeStr, !strconcat(Dt, "32"),
3439*9880d681SAndroid Build Coastguard Worker                      v4i32, v4i32, IntOp, Commutable>;
3440*9880d681SAndroid Build Coastguard Worker}
3441*9880d681SAndroid Build Coastguard Workermulticlass N3VInt_HSSh<bit op24, bit op23, bits<4> op11_8, bit op4, Format f,
3442*9880d681SAndroid Build Coastguard Worker                     InstrItinClass itinD16, InstrItinClass itinD32,
3443*9880d681SAndroid Build Coastguard Worker                     InstrItinClass itinQ16, InstrItinClass itinQ32,
3444*9880d681SAndroid Build Coastguard Worker                     string OpcodeStr, string Dt,
3445*9880d681SAndroid Build Coastguard Worker                     SDPatternOperator IntOp> {
3446*9880d681SAndroid Build Coastguard Worker  // 64-bit vector types.
3447*9880d681SAndroid Build Coastguard Worker  def v4i16 : N3VDIntSh<op24, op23, 0b01, op11_8, op4, f, itinD16,
3448*9880d681SAndroid Build Coastguard Worker                      OpcodeStr, !strconcat(Dt, "16"),
3449*9880d681SAndroid Build Coastguard Worker                      v4i16, v4i16, IntOp>;
3450*9880d681SAndroid Build Coastguard Worker  def v2i32 : N3VDIntSh<op24, op23, 0b10, op11_8, op4, f, itinD32,
3451*9880d681SAndroid Build Coastguard Worker                      OpcodeStr, !strconcat(Dt, "32"),
3452*9880d681SAndroid Build Coastguard Worker                      v2i32, v2i32, IntOp>;
3453*9880d681SAndroid Build Coastguard Worker
3454*9880d681SAndroid Build Coastguard Worker  // 128-bit vector types.
3455*9880d681SAndroid Build Coastguard Worker  def v8i16 : N3VQIntSh<op24, op23, 0b01, op11_8, op4, f, itinQ16,
3456*9880d681SAndroid Build Coastguard Worker                      OpcodeStr, !strconcat(Dt, "16"),
3457*9880d681SAndroid Build Coastguard Worker                      v8i16, v8i16, IntOp>;
3458*9880d681SAndroid Build Coastguard Worker  def v4i32 : N3VQIntSh<op24, op23, 0b10, op11_8, op4, f, itinQ32,
3459*9880d681SAndroid Build Coastguard Worker                      OpcodeStr, !strconcat(Dt, "32"),
3460*9880d681SAndroid Build Coastguard Worker                      v4i32, v4i32, IntOp>;
3461*9880d681SAndroid Build Coastguard Worker}
3462*9880d681SAndroid Build Coastguard Worker
3463*9880d681SAndroid Build Coastguard Workermulticlass N3VIntSL_HS<bits<4> op11_8,
3464*9880d681SAndroid Build Coastguard Worker                       InstrItinClass itinD16, InstrItinClass itinD32,
3465*9880d681SAndroid Build Coastguard Worker                       InstrItinClass itinQ16, InstrItinClass itinQ32,
3466*9880d681SAndroid Build Coastguard Worker                       string OpcodeStr, string Dt, SDPatternOperator IntOp> {
3467*9880d681SAndroid Build Coastguard Worker  def v4i16 : N3VDIntSL16<0b01, op11_8, itinD16,
3468*9880d681SAndroid Build Coastguard Worker                          OpcodeStr, !strconcat(Dt, "16"), v4i16, IntOp>;
3469*9880d681SAndroid Build Coastguard Worker  def v2i32 : N3VDIntSL<0b10, op11_8, itinD32,
3470*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "32"), v2i32, IntOp>;
3471*9880d681SAndroid Build Coastguard Worker  def v8i16 : N3VQIntSL16<0b01, op11_8, itinQ16,
3472*9880d681SAndroid Build Coastguard Worker                          OpcodeStr, !strconcat(Dt, "16"), v8i16, v4i16, IntOp>;
3473*9880d681SAndroid Build Coastguard Worker  def v4i32 : N3VQIntSL<0b10, op11_8, itinQ32,
3474*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "32"), v4i32, v2i32, IntOp>;
3475*9880d681SAndroid Build Coastguard Worker}
3476*9880d681SAndroid Build Coastguard Worker
3477*9880d681SAndroid Build Coastguard Worker// ....then also with element size of 8 bits:
3478*9880d681SAndroid Build Coastguard Workermulticlass N3VInt_QHS<bit op24, bit op23, bits<4> op11_8, bit op4, Format f,
3479*9880d681SAndroid Build Coastguard Worker                      InstrItinClass itinD16, InstrItinClass itinD32,
3480*9880d681SAndroid Build Coastguard Worker                      InstrItinClass itinQ16, InstrItinClass itinQ32,
3481*9880d681SAndroid Build Coastguard Worker                      string OpcodeStr, string Dt,
3482*9880d681SAndroid Build Coastguard Worker                      SDPatternOperator IntOp, bit Commutable = 0>
3483*9880d681SAndroid Build Coastguard Worker  : N3VInt_HS<op24, op23, op11_8, op4, f, itinD16, itinD32, itinQ16, itinQ32,
3484*9880d681SAndroid Build Coastguard Worker              OpcodeStr, Dt, IntOp, Commutable> {
3485*9880d681SAndroid Build Coastguard Worker  def v8i8  : N3VDInt<op24, op23, 0b00, op11_8, op4, f, itinD16,
3486*9880d681SAndroid Build Coastguard Worker                      OpcodeStr, !strconcat(Dt, "8"),
3487*9880d681SAndroid Build Coastguard Worker                      v8i8, v8i8, IntOp, Commutable>;
3488*9880d681SAndroid Build Coastguard Worker  def v16i8 : N3VQInt<op24, op23, 0b00, op11_8, op4, f, itinQ16,
3489*9880d681SAndroid Build Coastguard Worker                      OpcodeStr, !strconcat(Dt, "8"),
3490*9880d681SAndroid Build Coastguard Worker                      v16i8, v16i8, IntOp, Commutable>;
3491*9880d681SAndroid Build Coastguard Worker}
3492*9880d681SAndroid Build Coastguard Workermulticlass N3VInt_QHSSh<bit op24, bit op23, bits<4> op11_8, bit op4, Format f,
3493*9880d681SAndroid Build Coastguard Worker                      InstrItinClass itinD16, InstrItinClass itinD32,
3494*9880d681SAndroid Build Coastguard Worker                      InstrItinClass itinQ16, InstrItinClass itinQ32,
3495*9880d681SAndroid Build Coastguard Worker                      string OpcodeStr, string Dt,
3496*9880d681SAndroid Build Coastguard Worker                      SDPatternOperator IntOp>
3497*9880d681SAndroid Build Coastguard Worker  : N3VInt_HSSh<op24, op23, op11_8, op4, f, itinD16, itinD32, itinQ16, itinQ32,
3498*9880d681SAndroid Build Coastguard Worker              OpcodeStr, Dt, IntOp> {
3499*9880d681SAndroid Build Coastguard Worker  def v8i8  : N3VDIntSh<op24, op23, 0b00, op11_8, op4, f, itinD16,
3500*9880d681SAndroid Build Coastguard Worker                      OpcodeStr, !strconcat(Dt, "8"),
3501*9880d681SAndroid Build Coastguard Worker                      v8i8, v8i8, IntOp>;
3502*9880d681SAndroid Build Coastguard Worker  def v16i8 : N3VQIntSh<op24, op23, 0b00, op11_8, op4, f, itinQ16,
3503*9880d681SAndroid Build Coastguard Worker                      OpcodeStr, !strconcat(Dt, "8"),
3504*9880d681SAndroid Build Coastguard Worker                      v16i8, v16i8, IntOp>;
3505*9880d681SAndroid Build Coastguard Worker}
3506*9880d681SAndroid Build Coastguard Worker
3507*9880d681SAndroid Build Coastguard Worker
3508*9880d681SAndroid Build Coastguard Worker// ....then also with element size of 64 bits:
3509*9880d681SAndroid Build Coastguard Workermulticlass N3VInt_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4, Format f,
3510*9880d681SAndroid Build Coastguard Worker                       InstrItinClass itinD16, InstrItinClass itinD32,
3511*9880d681SAndroid Build Coastguard Worker                       InstrItinClass itinQ16, InstrItinClass itinQ32,
3512*9880d681SAndroid Build Coastguard Worker                       string OpcodeStr, string Dt,
3513*9880d681SAndroid Build Coastguard Worker                       SDPatternOperator IntOp, bit Commutable = 0>
3514*9880d681SAndroid Build Coastguard Worker  : N3VInt_QHS<op24, op23, op11_8, op4, f, itinD16, itinD32, itinQ16, itinQ32,
3515*9880d681SAndroid Build Coastguard Worker               OpcodeStr, Dt, IntOp, Commutable> {
3516*9880d681SAndroid Build Coastguard Worker  def v1i64 : N3VDInt<op24, op23, 0b11, op11_8, op4, f, itinD32,
3517*9880d681SAndroid Build Coastguard Worker                      OpcodeStr, !strconcat(Dt, "64"),
3518*9880d681SAndroid Build Coastguard Worker                      v1i64, v1i64, IntOp, Commutable>;
3519*9880d681SAndroid Build Coastguard Worker  def v2i64 : N3VQInt<op24, op23, 0b11, op11_8, op4, f, itinQ32,
3520*9880d681SAndroid Build Coastguard Worker                      OpcodeStr, !strconcat(Dt, "64"),
3521*9880d681SAndroid Build Coastguard Worker                      v2i64, v2i64, IntOp, Commutable>;
3522*9880d681SAndroid Build Coastguard Worker}
3523*9880d681SAndroid Build Coastguard Workermulticlass N3VInt_QHSDSh<bit op24, bit op23, bits<4> op11_8, bit op4, Format f,
3524*9880d681SAndroid Build Coastguard Worker                       InstrItinClass itinD16, InstrItinClass itinD32,
3525*9880d681SAndroid Build Coastguard Worker                       InstrItinClass itinQ16, InstrItinClass itinQ32,
3526*9880d681SAndroid Build Coastguard Worker                       string OpcodeStr, string Dt,
3527*9880d681SAndroid Build Coastguard Worker                       SDPatternOperator IntOp>
3528*9880d681SAndroid Build Coastguard Worker  : N3VInt_QHSSh<op24, op23, op11_8, op4, f, itinD16, itinD32, itinQ16, itinQ32,
3529*9880d681SAndroid Build Coastguard Worker               OpcodeStr, Dt, IntOp> {
3530*9880d681SAndroid Build Coastguard Worker  def v1i64 : N3VDIntSh<op24, op23, 0b11, op11_8, op4, f, itinD32,
3531*9880d681SAndroid Build Coastguard Worker                      OpcodeStr, !strconcat(Dt, "64"),
3532*9880d681SAndroid Build Coastguard Worker                      v1i64, v1i64, IntOp>;
3533*9880d681SAndroid Build Coastguard Worker  def v2i64 : N3VQIntSh<op24, op23, 0b11, op11_8, op4, f, itinQ32,
3534*9880d681SAndroid Build Coastguard Worker                      OpcodeStr, !strconcat(Dt, "64"),
3535*9880d681SAndroid Build Coastguard Worker                      v2i64, v2i64, IntOp>;
3536*9880d681SAndroid Build Coastguard Worker}
3537*9880d681SAndroid Build Coastguard Worker
3538*9880d681SAndroid Build Coastguard Worker// Neon Narrowing 3-register vector intrinsics,
3539*9880d681SAndroid Build Coastguard Worker//   source operand element sizes of 16, 32 and 64 bits:
3540*9880d681SAndroid Build Coastguard Workermulticlass N3VNInt_HSD<bit op24, bit op23, bits<4> op11_8, bit op4,
3541*9880d681SAndroid Build Coastguard Worker                       string OpcodeStr, string Dt,
3542*9880d681SAndroid Build Coastguard Worker                       SDPatternOperator IntOp, bit Commutable = 0> {
3543*9880d681SAndroid Build Coastguard Worker  def v8i8  : N3VNInt<op24, op23, 0b00, op11_8, op4,
3544*9880d681SAndroid Build Coastguard Worker                      OpcodeStr, !strconcat(Dt, "16"),
3545*9880d681SAndroid Build Coastguard Worker                      v8i8, v8i16, IntOp, Commutable>;
3546*9880d681SAndroid Build Coastguard Worker  def v4i16 : N3VNInt<op24, op23, 0b01, op11_8, op4,
3547*9880d681SAndroid Build Coastguard Worker                      OpcodeStr, !strconcat(Dt, "32"),
3548*9880d681SAndroid Build Coastguard Worker                      v4i16, v4i32, IntOp, Commutable>;
3549*9880d681SAndroid Build Coastguard Worker  def v2i32 : N3VNInt<op24, op23, 0b10, op11_8, op4,
3550*9880d681SAndroid Build Coastguard Worker                      OpcodeStr, !strconcat(Dt, "64"),
3551*9880d681SAndroid Build Coastguard Worker                      v2i32, v2i64, IntOp, Commutable>;
3552*9880d681SAndroid Build Coastguard Worker}
3553*9880d681SAndroid Build Coastguard Worker
3554*9880d681SAndroid Build Coastguard Worker
3555*9880d681SAndroid Build Coastguard Worker// Neon Long 3-register vector operations.
3556*9880d681SAndroid Build Coastguard Worker
3557*9880d681SAndroid Build Coastguard Workermulticlass N3VL_QHS<bit op24, bit op23, bits<4> op11_8, bit op4,
3558*9880d681SAndroid Build Coastguard Worker                    InstrItinClass itin16, InstrItinClass itin32,
3559*9880d681SAndroid Build Coastguard Worker                    string OpcodeStr, string Dt,
3560*9880d681SAndroid Build Coastguard Worker                    SDNode OpNode, bit Commutable = 0> {
3561*9880d681SAndroid Build Coastguard Worker  def v8i16 : N3VL<op24, op23, 0b00, op11_8, op4, itin16,
3562*9880d681SAndroid Build Coastguard Worker                   OpcodeStr, !strconcat(Dt, "8"),
3563*9880d681SAndroid Build Coastguard Worker                   v8i16, v8i8, OpNode, Commutable>;
3564*9880d681SAndroid Build Coastguard Worker  def v4i32 : N3VL<op24, op23, 0b01, op11_8, op4, itin16,
3565*9880d681SAndroid Build Coastguard Worker                   OpcodeStr, !strconcat(Dt, "16"),
3566*9880d681SAndroid Build Coastguard Worker                   v4i32, v4i16, OpNode, Commutable>;
3567*9880d681SAndroid Build Coastguard Worker  def v2i64 : N3VL<op24, op23, 0b10, op11_8, op4, itin32,
3568*9880d681SAndroid Build Coastguard Worker                   OpcodeStr, !strconcat(Dt, "32"),
3569*9880d681SAndroid Build Coastguard Worker                   v2i64, v2i32, OpNode, Commutable>;
3570*9880d681SAndroid Build Coastguard Worker}
3571*9880d681SAndroid Build Coastguard Worker
3572*9880d681SAndroid Build Coastguard Workermulticlass N3VLSL_HS<bit op24, bits<4> op11_8,
3573*9880d681SAndroid Build Coastguard Worker                     InstrItinClass itin, string OpcodeStr, string Dt,
3574*9880d681SAndroid Build Coastguard Worker                     SDNode OpNode> {
3575*9880d681SAndroid Build Coastguard Worker  def v4i16 : N3VLSL16<op24, 0b01, op11_8, itin, OpcodeStr,
3576*9880d681SAndroid Build Coastguard Worker                       !strconcat(Dt, "16"), v4i32, v4i16, OpNode>;
3577*9880d681SAndroid Build Coastguard Worker  def v2i32 : N3VLSL<op24, 0b10, op11_8, itin, OpcodeStr,
3578*9880d681SAndroid Build Coastguard Worker                     !strconcat(Dt, "32"), v2i64, v2i32, OpNode>;
3579*9880d681SAndroid Build Coastguard Worker}
3580*9880d681SAndroid Build Coastguard Worker
3581*9880d681SAndroid Build Coastguard Workermulticlass N3VLExt_QHS<bit op24, bit op23, bits<4> op11_8, bit op4,
3582*9880d681SAndroid Build Coastguard Worker                       InstrItinClass itin16, InstrItinClass itin32,
3583*9880d681SAndroid Build Coastguard Worker                       string OpcodeStr, string Dt,
3584*9880d681SAndroid Build Coastguard Worker                       SDNode OpNode, SDNode ExtOp, bit Commutable = 0> {
3585*9880d681SAndroid Build Coastguard Worker  def v8i16 : N3VLExt<op24, op23, 0b00, op11_8, op4, itin16,
3586*9880d681SAndroid Build Coastguard Worker                      OpcodeStr, !strconcat(Dt, "8"),
3587*9880d681SAndroid Build Coastguard Worker                      v8i16, v8i8, OpNode, ExtOp, Commutable>;
3588*9880d681SAndroid Build Coastguard Worker  def v4i32 : N3VLExt<op24, op23, 0b01, op11_8, op4, itin16,
3589*9880d681SAndroid Build Coastguard Worker                      OpcodeStr, !strconcat(Dt, "16"),
3590*9880d681SAndroid Build Coastguard Worker                      v4i32, v4i16, OpNode, ExtOp, Commutable>;
3591*9880d681SAndroid Build Coastguard Worker  def v2i64 : N3VLExt<op24, op23, 0b10, op11_8, op4, itin32,
3592*9880d681SAndroid Build Coastguard Worker                      OpcodeStr, !strconcat(Dt, "32"),
3593*9880d681SAndroid Build Coastguard Worker                      v2i64, v2i32, OpNode, ExtOp, Commutable>;
3594*9880d681SAndroid Build Coastguard Worker}
3595*9880d681SAndroid Build Coastguard Worker
3596*9880d681SAndroid Build Coastguard Worker// Neon Long 3-register vector intrinsics.
3597*9880d681SAndroid Build Coastguard Worker
3598*9880d681SAndroid Build Coastguard Worker// First with only element sizes of 16 and 32 bits:
3599*9880d681SAndroid Build Coastguard Workermulticlass N3VLInt_HS<bit op24, bit op23, bits<4> op11_8, bit op4,
3600*9880d681SAndroid Build Coastguard Worker                      InstrItinClass itin16, InstrItinClass itin32,
3601*9880d681SAndroid Build Coastguard Worker                      string OpcodeStr, string Dt,
3602*9880d681SAndroid Build Coastguard Worker                      SDPatternOperator IntOp, bit Commutable = 0> {
3603*9880d681SAndroid Build Coastguard Worker  def v4i32 : N3VLInt<op24, op23, 0b01, op11_8, op4, itin16,
3604*9880d681SAndroid Build Coastguard Worker                      OpcodeStr, !strconcat(Dt, "16"),
3605*9880d681SAndroid Build Coastguard Worker                      v4i32, v4i16, IntOp, Commutable>;
3606*9880d681SAndroid Build Coastguard Worker  def v2i64 : N3VLInt<op24, op23, 0b10, op11_8, op4, itin32,
3607*9880d681SAndroid Build Coastguard Worker                      OpcodeStr, !strconcat(Dt, "32"),
3608*9880d681SAndroid Build Coastguard Worker                      v2i64, v2i32, IntOp, Commutable>;
3609*9880d681SAndroid Build Coastguard Worker}
3610*9880d681SAndroid Build Coastguard Worker
3611*9880d681SAndroid Build Coastguard Workermulticlass N3VLIntSL_HS<bit op24, bits<4> op11_8,
3612*9880d681SAndroid Build Coastguard Worker                        InstrItinClass itin, string OpcodeStr, string Dt,
3613*9880d681SAndroid Build Coastguard Worker                        SDPatternOperator IntOp> {
3614*9880d681SAndroid Build Coastguard Worker  def v4i16 : N3VLIntSL16<op24, 0b01, op11_8, itin,
3615*9880d681SAndroid Build Coastguard Worker                          OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16, IntOp>;
3616*9880d681SAndroid Build Coastguard Worker  def v2i32 : N3VLIntSL<op24, 0b10, op11_8, itin,
3617*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, IntOp>;
3618*9880d681SAndroid Build Coastguard Worker}
3619*9880d681SAndroid Build Coastguard Worker
3620*9880d681SAndroid Build Coastguard Worker// ....then also with element size of 8 bits:
3621*9880d681SAndroid Build Coastguard Workermulticlass N3VLInt_QHS<bit op24, bit op23, bits<4> op11_8, bit op4,
3622*9880d681SAndroid Build Coastguard Worker                       InstrItinClass itin16, InstrItinClass itin32,
3623*9880d681SAndroid Build Coastguard Worker                       string OpcodeStr, string Dt,
3624*9880d681SAndroid Build Coastguard Worker                       SDPatternOperator IntOp, bit Commutable = 0>
3625*9880d681SAndroid Build Coastguard Worker  : N3VLInt_HS<op24, op23, op11_8, op4, itin16, itin32, OpcodeStr, Dt,
3626*9880d681SAndroid Build Coastguard Worker               IntOp, Commutable> {
3627*9880d681SAndroid Build Coastguard Worker  def v8i16 : N3VLInt<op24, op23, 0b00, op11_8, op4, itin16,
3628*9880d681SAndroid Build Coastguard Worker                      OpcodeStr, !strconcat(Dt, "8"),
3629*9880d681SAndroid Build Coastguard Worker                      v8i16, v8i8, IntOp, Commutable>;
3630*9880d681SAndroid Build Coastguard Worker}
3631*9880d681SAndroid Build Coastguard Worker
3632*9880d681SAndroid Build Coastguard Worker// ....with explicit extend (VABDL).
3633*9880d681SAndroid Build Coastguard Workermulticlass N3VLIntExt_QHS<bit op24, bit op23, bits<4> op11_8, bit op4,
3634*9880d681SAndroid Build Coastguard Worker                       InstrItinClass itin, string OpcodeStr, string Dt,
3635*9880d681SAndroid Build Coastguard Worker                       SDPatternOperator IntOp, SDNode ExtOp, bit Commutable = 0> {
3636*9880d681SAndroid Build Coastguard Worker  def v8i16 : N3VLIntExt<op24, op23, 0b00, op11_8, op4, itin,
3637*9880d681SAndroid Build Coastguard Worker                         OpcodeStr, !strconcat(Dt, "8"),
3638*9880d681SAndroid Build Coastguard Worker                         v8i16, v8i8, IntOp, ExtOp, Commutable>;
3639*9880d681SAndroid Build Coastguard Worker  def v4i32 : N3VLIntExt<op24, op23, 0b01, op11_8, op4, itin,
3640*9880d681SAndroid Build Coastguard Worker                         OpcodeStr, !strconcat(Dt, "16"),
3641*9880d681SAndroid Build Coastguard Worker                         v4i32, v4i16, IntOp, ExtOp, Commutable>;
3642*9880d681SAndroid Build Coastguard Worker  def v2i64 : N3VLIntExt<op24, op23, 0b10, op11_8, op4, itin,
3643*9880d681SAndroid Build Coastguard Worker                         OpcodeStr, !strconcat(Dt, "32"),
3644*9880d681SAndroid Build Coastguard Worker                         v2i64, v2i32, IntOp, ExtOp, Commutable>;
3645*9880d681SAndroid Build Coastguard Worker}
3646*9880d681SAndroid Build Coastguard Worker
3647*9880d681SAndroid Build Coastguard Worker
3648*9880d681SAndroid Build Coastguard Worker// Neon Wide 3-register vector intrinsics,
3649*9880d681SAndroid Build Coastguard Worker//   source operand element sizes of 8, 16 and 32 bits:
3650*9880d681SAndroid Build Coastguard Workermulticlass N3VW_QHS<bit op24, bit op23, bits<4> op11_8, bit op4,
3651*9880d681SAndroid Build Coastguard Worker                    string OpcodeStr, string Dt,
3652*9880d681SAndroid Build Coastguard Worker                    SDNode OpNode, SDNode ExtOp, bit Commutable = 0> {
3653*9880d681SAndroid Build Coastguard Worker  def v8i16 : N3VW<op24, op23, 0b00, op11_8, op4,
3654*9880d681SAndroid Build Coastguard Worker                   OpcodeStr, !strconcat(Dt, "8"),
3655*9880d681SAndroid Build Coastguard Worker                   v8i16, v8i8, OpNode, ExtOp, Commutable>;
3656*9880d681SAndroid Build Coastguard Worker  def v4i32 : N3VW<op24, op23, 0b01, op11_8, op4,
3657*9880d681SAndroid Build Coastguard Worker                   OpcodeStr, !strconcat(Dt, "16"),
3658*9880d681SAndroid Build Coastguard Worker                   v4i32, v4i16, OpNode, ExtOp, Commutable>;
3659*9880d681SAndroid Build Coastguard Worker  def v2i64 : N3VW<op24, op23, 0b10, op11_8, op4,
3660*9880d681SAndroid Build Coastguard Worker                   OpcodeStr, !strconcat(Dt, "32"),
3661*9880d681SAndroid Build Coastguard Worker                   v2i64, v2i32, OpNode, ExtOp, Commutable>;
3662*9880d681SAndroid Build Coastguard Worker}
3663*9880d681SAndroid Build Coastguard Worker
3664*9880d681SAndroid Build Coastguard Worker
3665*9880d681SAndroid Build Coastguard Worker// Neon Multiply-Op vector operations,
3666*9880d681SAndroid Build Coastguard Worker//   element sizes of 8, 16 and 32 bits:
3667*9880d681SAndroid Build Coastguard Workermulticlass N3VMulOp_QHS<bit op24, bit op23, bits<4> op11_8, bit op4,
3668*9880d681SAndroid Build Coastguard Worker                        InstrItinClass itinD16, InstrItinClass itinD32,
3669*9880d681SAndroid Build Coastguard Worker                        InstrItinClass itinQ16, InstrItinClass itinQ32,
3670*9880d681SAndroid Build Coastguard Worker                        string OpcodeStr, string Dt, SDNode OpNode> {
3671*9880d681SAndroid Build Coastguard Worker  // 64-bit vector types.
3672*9880d681SAndroid Build Coastguard Worker  def v8i8  : N3VDMulOp<op24, op23, 0b00, op11_8, op4, itinD16,
3673*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "8"), v8i8, mul, OpNode>;
3674*9880d681SAndroid Build Coastguard Worker  def v4i16 : N3VDMulOp<op24, op23, 0b01, op11_8, op4, itinD16,
3675*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "16"), v4i16, mul, OpNode>;
3676*9880d681SAndroid Build Coastguard Worker  def v2i32 : N3VDMulOp<op24, op23, 0b10, op11_8, op4, itinD32,
3677*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "32"), v2i32, mul, OpNode>;
3678*9880d681SAndroid Build Coastguard Worker
3679*9880d681SAndroid Build Coastguard Worker  // 128-bit vector types.
3680*9880d681SAndroid Build Coastguard Worker  def v16i8 : N3VQMulOp<op24, op23, 0b00, op11_8, op4, itinQ16,
3681*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "8"), v16i8, mul, OpNode>;
3682*9880d681SAndroid Build Coastguard Worker  def v8i16 : N3VQMulOp<op24, op23, 0b01, op11_8, op4, itinQ16,
3683*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "16"), v8i16, mul, OpNode>;
3684*9880d681SAndroid Build Coastguard Worker  def v4i32 : N3VQMulOp<op24, op23, 0b10, op11_8, op4, itinQ32,
3685*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "32"), v4i32, mul, OpNode>;
3686*9880d681SAndroid Build Coastguard Worker}
3687*9880d681SAndroid Build Coastguard Worker
3688*9880d681SAndroid Build Coastguard Workermulticlass N3VMulOpSL_HS<bits<4> op11_8,
3689*9880d681SAndroid Build Coastguard Worker                         InstrItinClass itinD16, InstrItinClass itinD32,
3690*9880d681SAndroid Build Coastguard Worker                         InstrItinClass itinQ16, InstrItinClass itinQ32,
3691*9880d681SAndroid Build Coastguard Worker                         string OpcodeStr, string Dt, SDPatternOperator ShOp> {
3692*9880d681SAndroid Build Coastguard Worker  def v4i16 : N3VDMulOpSL16<0b01, op11_8, itinD16,
3693*9880d681SAndroid Build Coastguard Worker                            OpcodeStr, !strconcat(Dt, "16"), v4i16, mul, ShOp>;
3694*9880d681SAndroid Build Coastguard Worker  def v2i32 : N3VDMulOpSL<0b10, op11_8, itinD32,
3695*9880d681SAndroid Build Coastguard Worker                          OpcodeStr, !strconcat(Dt, "32"), v2i32, mul, ShOp>;
3696*9880d681SAndroid Build Coastguard Worker  def v8i16 : N3VQMulOpSL16<0b01, op11_8, itinQ16,
3697*9880d681SAndroid Build Coastguard Worker                            OpcodeStr, !strconcat(Dt, "16"), v8i16, v4i16,
3698*9880d681SAndroid Build Coastguard Worker                            mul, ShOp>;
3699*9880d681SAndroid Build Coastguard Worker  def v4i32 : N3VQMulOpSL<0b10, op11_8, itinQ32,
3700*9880d681SAndroid Build Coastguard Worker                          OpcodeStr, !strconcat(Dt, "32"), v4i32, v2i32,
3701*9880d681SAndroid Build Coastguard Worker                          mul, ShOp>;
3702*9880d681SAndroid Build Coastguard Worker}
3703*9880d681SAndroid Build Coastguard Worker
3704*9880d681SAndroid Build Coastguard Worker// Neon Intrinsic-Op vector operations,
3705*9880d681SAndroid Build Coastguard Worker//   element sizes of 8, 16 and 32 bits:
3706*9880d681SAndroid Build Coastguard Workermulticlass N3VIntOp_QHS<bit op24, bit op23, bits<4> op11_8, bit op4,
3707*9880d681SAndroid Build Coastguard Worker                        InstrItinClass itinD, InstrItinClass itinQ,
3708*9880d681SAndroid Build Coastguard Worker                        string OpcodeStr, string Dt, SDPatternOperator IntOp,
3709*9880d681SAndroid Build Coastguard Worker                        SDNode OpNode> {
3710*9880d681SAndroid Build Coastguard Worker  // 64-bit vector types.
3711*9880d681SAndroid Build Coastguard Worker  def v8i8  : N3VDIntOp<op24, op23, 0b00, op11_8, op4, itinD,
3712*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "8"), v8i8, IntOp, OpNode>;
3713*9880d681SAndroid Build Coastguard Worker  def v4i16 : N3VDIntOp<op24, op23, 0b01, op11_8, op4, itinD,
3714*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "16"), v4i16, IntOp, OpNode>;
3715*9880d681SAndroid Build Coastguard Worker  def v2i32 : N3VDIntOp<op24, op23, 0b10, op11_8, op4, itinD,
3716*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "32"), v2i32, IntOp, OpNode>;
3717*9880d681SAndroid Build Coastguard Worker
3718*9880d681SAndroid Build Coastguard Worker  // 128-bit vector types.
3719*9880d681SAndroid Build Coastguard Worker  def v16i8 : N3VQIntOp<op24, op23, 0b00, op11_8, op4, itinQ,
3720*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "8"), v16i8, IntOp, OpNode>;
3721*9880d681SAndroid Build Coastguard Worker  def v8i16 : N3VQIntOp<op24, op23, 0b01, op11_8, op4, itinQ,
3722*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "16"), v8i16, IntOp, OpNode>;
3723*9880d681SAndroid Build Coastguard Worker  def v4i32 : N3VQIntOp<op24, op23, 0b10, op11_8, op4, itinQ,
3724*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "32"), v4i32, IntOp, OpNode>;
3725*9880d681SAndroid Build Coastguard Worker}
3726*9880d681SAndroid Build Coastguard Worker
3727*9880d681SAndroid Build Coastguard Worker// Neon 3-argument intrinsics,
3728*9880d681SAndroid Build Coastguard Worker//   element sizes of 16 and 32 bits:
3729*9880d681SAndroid Build Coastguard Workermulticlass N3VInt3_HS<bit op24, bit op23, bits<4> op11_8, bit op4,
3730*9880d681SAndroid Build Coastguard Worker                       InstrItinClass itinD16, InstrItinClass itinD32,
3731*9880d681SAndroid Build Coastguard Worker                       InstrItinClass itinQ16, InstrItinClass itinQ32,
3732*9880d681SAndroid Build Coastguard Worker                       string OpcodeStr, string Dt, SDPatternOperator IntOp> {
3733*9880d681SAndroid Build Coastguard Worker  // 64-bit vector types.
3734*9880d681SAndroid Build Coastguard Worker  def v4i16 : N3VDInt3<op24, op23, 0b01, op11_8, op4, itinD16,
3735*9880d681SAndroid Build Coastguard Worker                       OpcodeStr, !strconcat(Dt, "16"), v4i16, v4i16, IntOp>;
3736*9880d681SAndroid Build Coastguard Worker  def v2i32 : N3VDInt3<op24, op23, 0b10, op11_8, op4, itinD32,
3737*9880d681SAndroid Build Coastguard Worker                       OpcodeStr, !strconcat(Dt, "32"), v2i32, v2i32, IntOp>;
3738*9880d681SAndroid Build Coastguard Worker
3739*9880d681SAndroid Build Coastguard Worker  // 128-bit vector types.
3740*9880d681SAndroid Build Coastguard Worker  def v8i16 : N3VQInt3<op24, op23, 0b01, op11_8, op4, itinQ16,
3741*9880d681SAndroid Build Coastguard Worker                       OpcodeStr, !strconcat(Dt, "16"), v8i16, v8i16, IntOp>;
3742*9880d681SAndroid Build Coastguard Worker  def v4i32 : N3VQInt3<op24, op23, 0b10, op11_8, op4, itinQ32,
3743*9880d681SAndroid Build Coastguard Worker                       OpcodeStr, !strconcat(Dt, "32"), v4i32, v4i32, IntOp>;
3744*9880d681SAndroid Build Coastguard Worker}
3745*9880d681SAndroid Build Coastguard Worker
3746*9880d681SAndroid Build Coastguard Worker//   element sizes of 8, 16 and 32 bits:
3747*9880d681SAndroid Build Coastguard Workermulticlass N3VInt3_QHS<bit op24, bit op23, bits<4> op11_8, bit op4,
3748*9880d681SAndroid Build Coastguard Worker                       InstrItinClass itinD16, InstrItinClass itinD32,
3749*9880d681SAndroid Build Coastguard Worker                       InstrItinClass itinQ16, InstrItinClass itinQ32,
3750*9880d681SAndroid Build Coastguard Worker                       string OpcodeStr, string Dt, SDPatternOperator IntOp>
3751*9880d681SAndroid Build Coastguard Worker           :N3VInt3_HS <op24, op23, op11_8, op4, itinD16, itinD32,
3752*9880d681SAndroid Build Coastguard Worker                        itinQ16, itinQ32, OpcodeStr, Dt, IntOp>{
3753*9880d681SAndroid Build Coastguard Worker  // 64-bit vector types.
3754*9880d681SAndroid Build Coastguard Worker  def v8i8  : N3VDInt3<op24, op23, 0b00, op11_8, op4, itinD16,
3755*9880d681SAndroid Build Coastguard Worker                       OpcodeStr, !strconcat(Dt, "8"), v8i8, v8i8, IntOp>;
3756*9880d681SAndroid Build Coastguard Worker  // 128-bit vector types.
3757*9880d681SAndroid Build Coastguard Worker  def v16i8 : N3VQInt3<op24, op23, 0b00, op11_8, op4, itinQ16,
3758*9880d681SAndroid Build Coastguard Worker                       OpcodeStr, !strconcat(Dt, "8"), v16i8, v16i8, IntOp>;
3759*9880d681SAndroid Build Coastguard Worker}
3760*9880d681SAndroid Build Coastguard Worker
3761*9880d681SAndroid Build Coastguard Worker// Neon Long Multiply-Op vector operations,
3762*9880d681SAndroid Build Coastguard Worker//   element sizes of 8, 16 and 32 bits:
3763*9880d681SAndroid Build Coastguard Workermulticlass N3VLMulOp_QHS<bit op24, bit op23, bits<4> op11_8, bit op4,
3764*9880d681SAndroid Build Coastguard Worker                         InstrItinClass itin16, InstrItinClass itin32,
3765*9880d681SAndroid Build Coastguard Worker                         string OpcodeStr, string Dt, SDNode MulOp,
3766*9880d681SAndroid Build Coastguard Worker                         SDNode OpNode> {
3767*9880d681SAndroid Build Coastguard Worker  def v8i16 : N3VLMulOp<op24, op23, 0b00, op11_8, op4, itin16, OpcodeStr,
3768*9880d681SAndroid Build Coastguard Worker                        !strconcat(Dt, "8"), v8i16, v8i8, MulOp, OpNode>;
3769*9880d681SAndroid Build Coastguard Worker  def v4i32 : N3VLMulOp<op24, op23, 0b01, op11_8, op4, itin16, OpcodeStr,
3770*9880d681SAndroid Build Coastguard Worker                        !strconcat(Dt, "16"), v4i32, v4i16, MulOp, OpNode>;
3771*9880d681SAndroid Build Coastguard Worker  def v2i64 : N3VLMulOp<op24, op23, 0b10, op11_8, op4, itin32, OpcodeStr,
3772*9880d681SAndroid Build Coastguard Worker                        !strconcat(Dt, "32"), v2i64, v2i32, MulOp, OpNode>;
3773*9880d681SAndroid Build Coastguard Worker}
3774*9880d681SAndroid Build Coastguard Worker
3775*9880d681SAndroid Build Coastguard Workermulticlass N3VLMulOpSL_HS<bit op24, bits<4> op11_8, string OpcodeStr,
3776*9880d681SAndroid Build Coastguard Worker                          string Dt, SDNode MulOp, SDNode OpNode> {
3777*9880d681SAndroid Build Coastguard Worker  def v4i16 : N3VLMulOpSL16<op24, 0b01, op11_8, IIC_VMACi16D, OpcodeStr,
3778*9880d681SAndroid Build Coastguard Worker                            !strconcat(Dt,"16"), v4i32, v4i16, MulOp, OpNode>;
3779*9880d681SAndroid Build Coastguard Worker  def v2i32 : N3VLMulOpSL<op24, 0b10, op11_8, IIC_VMACi32D, OpcodeStr,
3780*9880d681SAndroid Build Coastguard Worker                          !strconcat(Dt, "32"), v2i64, v2i32, MulOp, OpNode>;
3781*9880d681SAndroid Build Coastguard Worker}
3782*9880d681SAndroid Build Coastguard Worker
3783*9880d681SAndroid Build Coastguard Worker
3784*9880d681SAndroid Build Coastguard Worker// Neon Long 3-argument intrinsics.
3785*9880d681SAndroid Build Coastguard Worker
3786*9880d681SAndroid Build Coastguard Worker// First with only element sizes of 16 and 32 bits:
3787*9880d681SAndroid Build Coastguard Workermulticlass N3VLInt3_HS<bit op24, bit op23, bits<4> op11_8, bit op4,
3788*9880d681SAndroid Build Coastguard Worker                       InstrItinClass itin16, InstrItinClass itin32,
3789*9880d681SAndroid Build Coastguard Worker                       string OpcodeStr, string Dt, SDPatternOperator IntOp> {
3790*9880d681SAndroid Build Coastguard Worker  def v4i32 : N3VLInt3<op24, op23, 0b01, op11_8, op4, itin16,
3791*9880d681SAndroid Build Coastguard Worker                       OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16, IntOp>;
3792*9880d681SAndroid Build Coastguard Worker  def v2i64 : N3VLInt3<op24, op23, 0b10, op11_8, op4, itin32,
3793*9880d681SAndroid Build Coastguard Worker                       OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, IntOp>;
3794*9880d681SAndroid Build Coastguard Worker}
3795*9880d681SAndroid Build Coastguard Worker
3796*9880d681SAndroid Build Coastguard Workermulticlass N3VLInt3SL_HS<bit op24, bits<4> op11_8,
3797*9880d681SAndroid Build Coastguard Worker                         string OpcodeStr, string Dt, SDPatternOperator IntOp> {
3798*9880d681SAndroid Build Coastguard Worker  def v4i16 : N3VLInt3SL16<op24, 0b01, op11_8, IIC_VMACi16D,
3799*9880d681SAndroid Build Coastguard Worker                           OpcodeStr, !strconcat(Dt,"16"), v4i32, v4i16, IntOp>;
3800*9880d681SAndroid Build Coastguard Worker  def v2i32 : N3VLInt3SL<op24, 0b10, op11_8, IIC_VMACi32D,
3801*9880d681SAndroid Build Coastguard Worker                         OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, IntOp>;
3802*9880d681SAndroid Build Coastguard Worker}
3803*9880d681SAndroid Build Coastguard Worker
3804*9880d681SAndroid Build Coastguard Worker// ....then also with element size of 8 bits:
3805*9880d681SAndroid Build Coastguard Workermulticlass N3VLInt3_QHS<bit op24, bit op23, bits<4> op11_8, bit op4,
3806*9880d681SAndroid Build Coastguard Worker                        InstrItinClass itin16, InstrItinClass itin32,
3807*9880d681SAndroid Build Coastguard Worker                        string OpcodeStr, string Dt, SDPatternOperator IntOp>
3808*9880d681SAndroid Build Coastguard Worker  : N3VLInt3_HS<op24, op23, op11_8, op4, itin16, itin32, OpcodeStr, Dt, IntOp> {
3809*9880d681SAndroid Build Coastguard Worker  def v8i16 : N3VLInt3<op24, op23, 0b00, op11_8, op4, itin16,
3810*9880d681SAndroid Build Coastguard Worker                       OpcodeStr, !strconcat(Dt, "8"), v8i16, v8i8, IntOp>;
3811*9880d681SAndroid Build Coastguard Worker}
3812*9880d681SAndroid Build Coastguard Worker
3813*9880d681SAndroid Build Coastguard Worker// ....with explicit extend (VABAL).
3814*9880d681SAndroid Build Coastguard Workermulticlass N3VLIntExtOp_QHS<bit op24, bit op23, bits<4> op11_8, bit op4,
3815*9880d681SAndroid Build Coastguard Worker                            InstrItinClass itin, string OpcodeStr, string Dt,
3816*9880d681SAndroid Build Coastguard Worker                            SDPatternOperator IntOp, SDNode ExtOp, SDNode OpNode> {
3817*9880d681SAndroid Build Coastguard Worker  def v8i16 : N3VLIntExtOp<op24, op23, 0b00, op11_8, op4, itin,
3818*9880d681SAndroid Build Coastguard Worker                           OpcodeStr, !strconcat(Dt, "8"), v8i16, v8i8,
3819*9880d681SAndroid Build Coastguard Worker                           IntOp, ExtOp, OpNode>;
3820*9880d681SAndroid Build Coastguard Worker  def v4i32 : N3VLIntExtOp<op24, op23, 0b01, op11_8, op4, itin,
3821*9880d681SAndroid Build Coastguard Worker                           OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16,
3822*9880d681SAndroid Build Coastguard Worker                           IntOp, ExtOp, OpNode>;
3823*9880d681SAndroid Build Coastguard Worker  def v2i64 : N3VLIntExtOp<op24, op23, 0b10, op11_8, op4, itin,
3824*9880d681SAndroid Build Coastguard Worker                           OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32,
3825*9880d681SAndroid Build Coastguard Worker                           IntOp, ExtOp, OpNode>;
3826*9880d681SAndroid Build Coastguard Worker}
3827*9880d681SAndroid Build Coastguard Worker
3828*9880d681SAndroid Build Coastguard Worker
3829*9880d681SAndroid Build Coastguard Worker// Neon Pairwise long 2-register intrinsics,
3830*9880d681SAndroid Build Coastguard Worker//   element sizes of 8, 16 and 32 bits:
3831*9880d681SAndroid Build Coastguard Workermulticlass N2VPLInt_QHS<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16,
3832*9880d681SAndroid Build Coastguard Worker                        bits<5> op11_7, bit op4,
3833*9880d681SAndroid Build Coastguard Worker                        string OpcodeStr, string Dt, SDPatternOperator IntOp> {
3834*9880d681SAndroid Build Coastguard Worker  // 64-bit vector types.
3835*9880d681SAndroid Build Coastguard Worker  def v8i8  : N2VDPLInt<op24_23, op21_20, 0b00, op17_16, op11_7, op4,
3836*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "8"), v4i16, v8i8, IntOp>;
3837*9880d681SAndroid Build Coastguard Worker  def v4i16 : N2VDPLInt<op24_23, op21_20, 0b01, op17_16, op11_7, op4,
3838*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "16"), v2i32, v4i16, IntOp>;
3839*9880d681SAndroid Build Coastguard Worker  def v2i32 : N2VDPLInt<op24_23, op21_20, 0b10, op17_16, op11_7, op4,
3840*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "32"), v1i64, v2i32, IntOp>;
3841*9880d681SAndroid Build Coastguard Worker
3842*9880d681SAndroid Build Coastguard Worker  // 128-bit vector types.
3843*9880d681SAndroid Build Coastguard Worker  def v16i8 : N2VQPLInt<op24_23, op21_20, 0b00, op17_16, op11_7, op4,
3844*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "8"), v8i16, v16i8, IntOp>;
3845*9880d681SAndroid Build Coastguard Worker  def v8i16 : N2VQPLInt<op24_23, op21_20, 0b01, op17_16, op11_7, op4,
3846*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "16"), v4i32, v8i16, IntOp>;
3847*9880d681SAndroid Build Coastguard Worker  def v4i32 : N2VQPLInt<op24_23, op21_20, 0b10, op17_16, op11_7, op4,
3848*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "32"), v2i64, v4i32, IntOp>;
3849*9880d681SAndroid Build Coastguard Worker}
3850*9880d681SAndroid Build Coastguard Worker
3851*9880d681SAndroid Build Coastguard Worker
3852*9880d681SAndroid Build Coastguard Worker// Neon Pairwise long 2-register accumulate intrinsics,
3853*9880d681SAndroid Build Coastguard Worker//   element sizes of 8, 16 and 32 bits:
3854*9880d681SAndroid Build Coastguard Workermulticlass N2VPLInt2_QHS<bits<2> op24_23, bits<2> op21_20, bits<2> op17_16,
3855*9880d681SAndroid Build Coastguard Worker                         bits<5> op11_7, bit op4,
3856*9880d681SAndroid Build Coastguard Worker                         string OpcodeStr, string Dt, SDPatternOperator IntOp> {
3857*9880d681SAndroid Build Coastguard Worker  // 64-bit vector types.
3858*9880d681SAndroid Build Coastguard Worker  def v8i8  : N2VDPLInt2<op24_23, op21_20, 0b00, op17_16, op11_7, op4,
3859*9880d681SAndroid Build Coastguard Worker                         OpcodeStr, !strconcat(Dt, "8"), v4i16, v8i8, IntOp>;
3860*9880d681SAndroid Build Coastguard Worker  def v4i16 : N2VDPLInt2<op24_23, op21_20, 0b01, op17_16, op11_7, op4,
3861*9880d681SAndroid Build Coastguard Worker                         OpcodeStr, !strconcat(Dt, "16"), v2i32, v4i16, IntOp>;
3862*9880d681SAndroid Build Coastguard Worker  def v2i32 : N2VDPLInt2<op24_23, op21_20, 0b10, op17_16, op11_7, op4,
3863*9880d681SAndroid Build Coastguard Worker                         OpcodeStr, !strconcat(Dt, "32"), v1i64, v2i32, IntOp>;
3864*9880d681SAndroid Build Coastguard Worker
3865*9880d681SAndroid Build Coastguard Worker  // 128-bit vector types.
3866*9880d681SAndroid Build Coastguard Worker  def v16i8 : N2VQPLInt2<op24_23, op21_20, 0b00, op17_16, op11_7, op4,
3867*9880d681SAndroid Build Coastguard Worker                         OpcodeStr, !strconcat(Dt, "8"), v8i16, v16i8, IntOp>;
3868*9880d681SAndroid Build Coastguard Worker  def v8i16 : N2VQPLInt2<op24_23, op21_20, 0b01, op17_16, op11_7, op4,
3869*9880d681SAndroid Build Coastguard Worker                         OpcodeStr, !strconcat(Dt, "16"), v4i32, v8i16, IntOp>;
3870*9880d681SAndroid Build Coastguard Worker  def v4i32 : N2VQPLInt2<op24_23, op21_20, 0b10, op17_16, op11_7, op4,
3871*9880d681SAndroid Build Coastguard Worker                         OpcodeStr, !strconcat(Dt, "32"), v2i64, v4i32, IntOp>;
3872*9880d681SAndroid Build Coastguard Worker}
3873*9880d681SAndroid Build Coastguard Worker
3874*9880d681SAndroid Build Coastguard Worker
3875*9880d681SAndroid Build Coastguard Worker// Neon 2-register vector shift by immediate,
3876*9880d681SAndroid Build Coastguard Worker//   with f of either N2RegVShLFrm or N2RegVShRFrm
3877*9880d681SAndroid Build Coastguard Worker//   element sizes of 8, 16, 32 and 64 bits:
3878*9880d681SAndroid Build Coastguard Workermulticlass N2VShL_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4,
3879*9880d681SAndroid Build Coastguard Worker                       InstrItinClass itin, string OpcodeStr, string Dt,
3880*9880d681SAndroid Build Coastguard Worker                       SDNode OpNode> {
3881*9880d681SAndroid Build Coastguard Worker  // 64-bit vector types.
3882*9880d681SAndroid Build Coastguard Worker  def v8i8  : N2VDSh<op24, op23, op11_8, 0, op4, N2RegVShLFrm, itin, i32imm,
3883*9880d681SAndroid Build Coastguard Worker                     OpcodeStr, !strconcat(Dt, "8"), v8i8, OpNode> {
3884*9880d681SAndroid Build Coastguard Worker    let Inst{21-19} = 0b001; // imm6 = 001xxx
3885*9880d681SAndroid Build Coastguard Worker  }
3886*9880d681SAndroid Build Coastguard Worker  def v4i16 : N2VDSh<op24, op23, op11_8, 0, op4, N2RegVShLFrm, itin, i32imm,
3887*9880d681SAndroid Build Coastguard Worker                     OpcodeStr, !strconcat(Dt, "16"), v4i16, OpNode> {
3888*9880d681SAndroid Build Coastguard Worker    let Inst{21-20} = 0b01;  // imm6 = 01xxxx
3889*9880d681SAndroid Build Coastguard Worker  }
3890*9880d681SAndroid Build Coastguard Worker  def v2i32 : N2VDSh<op24, op23, op11_8, 0, op4, N2RegVShLFrm, itin, i32imm,
3891*9880d681SAndroid Build Coastguard Worker                     OpcodeStr, !strconcat(Dt, "32"), v2i32, OpNode> {
3892*9880d681SAndroid Build Coastguard Worker    let Inst{21} = 0b1;      // imm6 = 1xxxxx
3893*9880d681SAndroid Build Coastguard Worker  }
3894*9880d681SAndroid Build Coastguard Worker  def v1i64 : N2VDSh<op24, op23, op11_8, 1, op4, N2RegVShLFrm, itin, i32imm,
3895*9880d681SAndroid Build Coastguard Worker                     OpcodeStr, !strconcat(Dt, "64"), v1i64, OpNode>;
3896*9880d681SAndroid Build Coastguard Worker                             // imm6 = xxxxxx
3897*9880d681SAndroid Build Coastguard Worker
3898*9880d681SAndroid Build Coastguard Worker  // 128-bit vector types.
3899*9880d681SAndroid Build Coastguard Worker  def v16i8 : N2VQSh<op24, op23, op11_8, 0, op4, N2RegVShLFrm, itin, i32imm,
3900*9880d681SAndroid Build Coastguard Worker                     OpcodeStr, !strconcat(Dt, "8"), v16i8, OpNode> {
3901*9880d681SAndroid Build Coastguard Worker    let Inst{21-19} = 0b001; // imm6 = 001xxx
3902*9880d681SAndroid Build Coastguard Worker  }
3903*9880d681SAndroid Build Coastguard Worker  def v8i16 : N2VQSh<op24, op23, op11_8, 0, op4, N2RegVShLFrm, itin, i32imm,
3904*9880d681SAndroid Build Coastguard Worker                     OpcodeStr, !strconcat(Dt, "16"), v8i16, OpNode> {
3905*9880d681SAndroid Build Coastguard Worker    let Inst{21-20} = 0b01;  // imm6 = 01xxxx
3906*9880d681SAndroid Build Coastguard Worker  }
3907*9880d681SAndroid Build Coastguard Worker  def v4i32 : N2VQSh<op24, op23, op11_8, 0, op4, N2RegVShLFrm, itin, i32imm,
3908*9880d681SAndroid Build Coastguard Worker                     OpcodeStr, !strconcat(Dt, "32"), v4i32, OpNode> {
3909*9880d681SAndroid Build Coastguard Worker    let Inst{21} = 0b1;      // imm6 = 1xxxxx
3910*9880d681SAndroid Build Coastguard Worker  }
3911*9880d681SAndroid Build Coastguard Worker  def v2i64 : N2VQSh<op24, op23, op11_8, 1, op4, N2RegVShLFrm, itin, i32imm,
3912*9880d681SAndroid Build Coastguard Worker                     OpcodeStr, !strconcat(Dt, "64"), v2i64, OpNode>;
3913*9880d681SAndroid Build Coastguard Worker                             // imm6 = xxxxxx
3914*9880d681SAndroid Build Coastguard Worker}
3915*9880d681SAndroid Build Coastguard Workermulticlass N2VShR_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4,
3916*9880d681SAndroid Build Coastguard Worker                       InstrItinClass itin, string OpcodeStr, string Dt,
3917*9880d681SAndroid Build Coastguard Worker                       string baseOpc, SDNode OpNode> {
3918*9880d681SAndroid Build Coastguard Worker  // 64-bit vector types.
3919*9880d681SAndroid Build Coastguard Worker  def v8i8  : N2VDSh<op24, op23, op11_8, 0, op4, N2RegVShRFrm, itin, shr_imm8,
3920*9880d681SAndroid Build Coastguard Worker                     OpcodeStr, !strconcat(Dt, "8"), v8i8, OpNode> {
3921*9880d681SAndroid Build Coastguard Worker    let Inst{21-19} = 0b001; // imm6 = 001xxx
3922*9880d681SAndroid Build Coastguard Worker  }
3923*9880d681SAndroid Build Coastguard Worker  def v4i16 : N2VDSh<op24, op23, op11_8, 0, op4, N2RegVShRFrm, itin, shr_imm16,
3924*9880d681SAndroid Build Coastguard Worker                     OpcodeStr, !strconcat(Dt, "16"), v4i16, OpNode> {
3925*9880d681SAndroid Build Coastguard Worker    let Inst{21-20} = 0b01;  // imm6 = 01xxxx
3926*9880d681SAndroid Build Coastguard Worker  }
3927*9880d681SAndroid Build Coastguard Worker  def v2i32 : N2VDSh<op24, op23, op11_8, 0, op4, N2RegVShRFrm, itin, shr_imm32,
3928*9880d681SAndroid Build Coastguard Worker                     OpcodeStr, !strconcat(Dt, "32"), v2i32, OpNode> {
3929*9880d681SAndroid Build Coastguard Worker    let Inst{21} = 0b1;      // imm6 = 1xxxxx
3930*9880d681SAndroid Build Coastguard Worker  }
3931*9880d681SAndroid Build Coastguard Worker  def v1i64 : N2VDSh<op24, op23, op11_8, 1, op4, N2RegVShRFrm, itin, shr_imm64,
3932*9880d681SAndroid Build Coastguard Worker                     OpcodeStr, !strconcat(Dt, "64"), v1i64, OpNode>;
3933*9880d681SAndroid Build Coastguard Worker                             // imm6 = xxxxxx
3934*9880d681SAndroid Build Coastguard Worker
3935*9880d681SAndroid Build Coastguard Worker  // 128-bit vector types.
3936*9880d681SAndroid Build Coastguard Worker  def v16i8 : N2VQSh<op24, op23, op11_8, 0, op4, N2RegVShRFrm, itin, shr_imm8,
3937*9880d681SAndroid Build Coastguard Worker                     OpcodeStr, !strconcat(Dt, "8"), v16i8, OpNode> {
3938*9880d681SAndroid Build Coastguard Worker    let Inst{21-19} = 0b001; // imm6 = 001xxx
3939*9880d681SAndroid Build Coastguard Worker  }
3940*9880d681SAndroid Build Coastguard Worker  def v8i16 : N2VQSh<op24, op23, op11_8, 0, op4, N2RegVShRFrm, itin, shr_imm16,
3941*9880d681SAndroid Build Coastguard Worker                     OpcodeStr, !strconcat(Dt, "16"), v8i16, OpNode> {
3942*9880d681SAndroid Build Coastguard Worker    let Inst{21-20} = 0b01;  // imm6 = 01xxxx
3943*9880d681SAndroid Build Coastguard Worker  }
3944*9880d681SAndroid Build Coastguard Worker  def v4i32 : N2VQSh<op24, op23, op11_8, 0, op4, N2RegVShRFrm, itin, shr_imm32,
3945*9880d681SAndroid Build Coastguard Worker                     OpcodeStr, !strconcat(Dt, "32"), v4i32, OpNode> {
3946*9880d681SAndroid Build Coastguard Worker    let Inst{21} = 0b1;      // imm6 = 1xxxxx
3947*9880d681SAndroid Build Coastguard Worker  }
3948*9880d681SAndroid Build Coastguard Worker  def v2i64 : N2VQSh<op24, op23, op11_8, 1, op4, N2RegVShRFrm, itin, shr_imm64,
3949*9880d681SAndroid Build Coastguard Worker                     OpcodeStr, !strconcat(Dt, "64"), v2i64, OpNode>;
3950*9880d681SAndroid Build Coastguard Worker                             // imm6 = xxxxxx
3951*9880d681SAndroid Build Coastguard Worker}
3952*9880d681SAndroid Build Coastguard Worker
3953*9880d681SAndroid Build Coastguard Worker// Neon Shift-Accumulate vector operations,
3954*9880d681SAndroid Build Coastguard Worker//   element sizes of 8, 16, 32 and 64 bits:
3955*9880d681SAndroid Build Coastguard Workermulticlass N2VShAdd_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4,
3956*9880d681SAndroid Build Coastguard Worker                         string OpcodeStr, string Dt, SDNode ShOp> {
3957*9880d681SAndroid Build Coastguard Worker  // 64-bit vector types.
3958*9880d681SAndroid Build Coastguard Worker  def v8i8  : N2VDShAdd<op24, op23, op11_8, 0, op4, shr_imm8,
3959*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "8"), v8i8, ShOp> {
3960*9880d681SAndroid Build Coastguard Worker    let Inst{21-19} = 0b001; // imm6 = 001xxx
3961*9880d681SAndroid Build Coastguard Worker  }
3962*9880d681SAndroid Build Coastguard Worker  def v4i16 : N2VDShAdd<op24, op23, op11_8, 0, op4, shr_imm16,
3963*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "16"), v4i16, ShOp> {
3964*9880d681SAndroid Build Coastguard Worker    let Inst{21-20} = 0b01;  // imm6 = 01xxxx
3965*9880d681SAndroid Build Coastguard Worker  }
3966*9880d681SAndroid Build Coastguard Worker  def v2i32 : N2VDShAdd<op24, op23, op11_8, 0, op4, shr_imm32,
3967*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "32"), v2i32, ShOp> {
3968*9880d681SAndroid Build Coastguard Worker    let Inst{21} = 0b1;      // imm6 = 1xxxxx
3969*9880d681SAndroid Build Coastguard Worker  }
3970*9880d681SAndroid Build Coastguard Worker  def v1i64 : N2VDShAdd<op24, op23, op11_8, 1, op4, shr_imm64,
3971*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "64"), v1i64, ShOp>;
3972*9880d681SAndroid Build Coastguard Worker                             // imm6 = xxxxxx
3973*9880d681SAndroid Build Coastguard Worker
3974*9880d681SAndroid Build Coastguard Worker  // 128-bit vector types.
3975*9880d681SAndroid Build Coastguard Worker  def v16i8 : N2VQShAdd<op24, op23, op11_8, 0, op4, shr_imm8,
3976*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "8"), v16i8, ShOp> {
3977*9880d681SAndroid Build Coastguard Worker    let Inst{21-19} = 0b001; // imm6 = 001xxx
3978*9880d681SAndroid Build Coastguard Worker  }
3979*9880d681SAndroid Build Coastguard Worker  def v8i16 : N2VQShAdd<op24, op23, op11_8, 0, op4, shr_imm16,
3980*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "16"), v8i16, ShOp> {
3981*9880d681SAndroid Build Coastguard Worker    let Inst{21-20} = 0b01;  // imm6 = 01xxxx
3982*9880d681SAndroid Build Coastguard Worker  }
3983*9880d681SAndroid Build Coastguard Worker  def v4i32 : N2VQShAdd<op24, op23, op11_8, 0, op4, shr_imm32,
3984*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "32"), v4i32, ShOp> {
3985*9880d681SAndroid Build Coastguard Worker    let Inst{21} = 0b1;      // imm6 = 1xxxxx
3986*9880d681SAndroid Build Coastguard Worker  }
3987*9880d681SAndroid Build Coastguard Worker  def v2i64 : N2VQShAdd<op24, op23, op11_8, 1, op4, shr_imm64,
3988*9880d681SAndroid Build Coastguard Worker                        OpcodeStr, !strconcat(Dt, "64"), v2i64, ShOp>;
3989*9880d681SAndroid Build Coastguard Worker                             // imm6 = xxxxxx
3990*9880d681SAndroid Build Coastguard Worker}
3991*9880d681SAndroid Build Coastguard Worker
3992*9880d681SAndroid Build Coastguard Worker// Neon Shift-Insert vector operations,
3993*9880d681SAndroid Build Coastguard Worker//   with f of either N2RegVShLFrm or N2RegVShRFrm
3994*9880d681SAndroid Build Coastguard Worker//   element sizes of 8, 16, 32 and 64 bits:
3995*9880d681SAndroid Build Coastguard Workermulticlass N2VShInsL_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4,
3996*9880d681SAndroid Build Coastguard Worker                          string OpcodeStr> {
3997*9880d681SAndroid Build Coastguard Worker  // 64-bit vector types.
3998*9880d681SAndroid Build Coastguard Worker  def v8i8  : N2VDShIns<op24, op23, op11_8, 0, op4, i32imm,
3999*9880d681SAndroid Build Coastguard Worker                        N2RegVShLFrm, OpcodeStr, "8", v8i8, NEONvsli> {
4000*9880d681SAndroid Build Coastguard Worker    let Inst{21-19} = 0b001; // imm6 = 001xxx
4001*9880d681SAndroid Build Coastguard Worker  }
4002*9880d681SAndroid Build Coastguard Worker  def v4i16 : N2VDShIns<op24, op23, op11_8, 0, op4, i32imm,
4003*9880d681SAndroid Build Coastguard Worker                        N2RegVShLFrm, OpcodeStr, "16", v4i16, NEONvsli> {
4004*9880d681SAndroid Build Coastguard Worker    let Inst{21-20} = 0b01;  // imm6 = 01xxxx
4005*9880d681SAndroid Build Coastguard Worker  }
4006*9880d681SAndroid Build Coastguard Worker  def v2i32 : N2VDShIns<op24, op23, op11_8, 0, op4, i32imm,
4007*9880d681SAndroid Build Coastguard Worker                        N2RegVShLFrm, OpcodeStr, "32", v2i32, NEONvsli> {
4008*9880d681SAndroid Build Coastguard Worker    let Inst{21} = 0b1;      // imm6 = 1xxxxx
4009*9880d681SAndroid Build Coastguard Worker  }
4010*9880d681SAndroid Build Coastguard Worker  def v1i64 : N2VDShIns<op24, op23, op11_8, 1, op4, i32imm,
4011*9880d681SAndroid Build Coastguard Worker                        N2RegVShLFrm, OpcodeStr, "64", v1i64, NEONvsli>;
4012*9880d681SAndroid Build Coastguard Worker                             // imm6 = xxxxxx
4013*9880d681SAndroid Build Coastguard Worker
4014*9880d681SAndroid Build Coastguard Worker  // 128-bit vector types.
4015*9880d681SAndroid Build Coastguard Worker  def v16i8 : N2VQShIns<op24, op23, op11_8, 0, op4, i32imm,
4016*9880d681SAndroid Build Coastguard Worker                        N2RegVShLFrm, OpcodeStr, "8", v16i8, NEONvsli> {
4017*9880d681SAndroid Build Coastguard Worker    let Inst{21-19} = 0b001; // imm6 = 001xxx
4018*9880d681SAndroid Build Coastguard Worker  }
4019*9880d681SAndroid Build Coastguard Worker  def v8i16 : N2VQShIns<op24, op23, op11_8, 0, op4, i32imm,
4020*9880d681SAndroid Build Coastguard Worker                        N2RegVShLFrm, OpcodeStr, "16", v8i16, NEONvsli> {
4021*9880d681SAndroid Build Coastguard Worker    let Inst{21-20} = 0b01;  // imm6 = 01xxxx
4022*9880d681SAndroid Build Coastguard Worker  }
4023*9880d681SAndroid Build Coastguard Worker  def v4i32 : N2VQShIns<op24, op23, op11_8, 0, op4, i32imm,
4024*9880d681SAndroid Build Coastguard Worker                        N2RegVShLFrm, OpcodeStr, "32", v4i32, NEONvsli> {
4025*9880d681SAndroid Build Coastguard Worker    let Inst{21} = 0b1;      // imm6 = 1xxxxx
4026*9880d681SAndroid Build Coastguard Worker  }
4027*9880d681SAndroid Build Coastguard Worker  def v2i64 : N2VQShIns<op24, op23, op11_8, 1, op4, i32imm,
4028*9880d681SAndroid Build Coastguard Worker                        N2RegVShLFrm, OpcodeStr, "64", v2i64, NEONvsli>;
4029*9880d681SAndroid Build Coastguard Worker                             // imm6 = xxxxxx
4030*9880d681SAndroid Build Coastguard Worker}
4031*9880d681SAndroid Build Coastguard Workermulticlass N2VShInsR_QHSD<bit op24, bit op23, bits<4> op11_8, bit op4,
4032*9880d681SAndroid Build Coastguard Worker                          string OpcodeStr> {
4033*9880d681SAndroid Build Coastguard Worker  // 64-bit vector types.
4034*9880d681SAndroid Build Coastguard Worker  def v8i8  : N2VDShIns<op24, op23, op11_8, 0, op4, shr_imm8,
4035*9880d681SAndroid Build Coastguard Worker                        N2RegVShRFrm, OpcodeStr, "8", v8i8, NEONvsri> {
4036*9880d681SAndroid Build Coastguard Worker    let Inst{21-19} = 0b001; // imm6 = 001xxx
4037*9880d681SAndroid Build Coastguard Worker  }
4038*9880d681SAndroid Build Coastguard Worker  def v4i16 : N2VDShIns<op24, op23, op11_8, 0, op4, shr_imm16,
4039*9880d681SAndroid Build Coastguard Worker                        N2RegVShRFrm, OpcodeStr, "16", v4i16, NEONvsri> {
4040*9880d681SAndroid Build Coastguard Worker    let Inst{21-20} = 0b01;  // imm6 = 01xxxx
4041*9880d681SAndroid Build Coastguard Worker  }
4042*9880d681SAndroid Build Coastguard Worker  def v2i32 : N2VDShIns<op24, op23, op11_8, 0, op4, shr_imm32,
4043*9880d681SAndroid Build Coastguard Worker                        N2RegVShRFrm, OpcodeStr, "32", v2i32, NEONvsri> {
4044*9880d681SAndroid Build Coastguard Worker    let Inst{21} = 0b1;      // imm6 = 1xxxxx
4045*9880d681SAndroid Build Coastguard Worker  }
4046*9880d681SAndroid Build Coastguard Worker  def v1i64 : N2VDShIns<op24, op23, op11_8, 1, op4, shr_imm64,
4047*9880d681SAndroid Build Coastguard Worker                        N2RegVShRFrm, OpcodeStr, "64", v1i64, NEONvsri>;
4048*9880d681SAndroid Build Coastguard Worker                             // imm6 = xxxxxx
4049*9880d681SAndroid Build Coastguard Worker
4050*9880d681SAndroid Build Coastguard Worker  // 128-bit vector types.
4051*9880d681SAndroid Build Coastguard Worker  def v16i8 : N2VQShIns<op24, op23, op11_8, 0, op4, shr_imm8,
4052*9880d681SAndroid Build Coastguard Worker                        N2RegVShRFrm, OpcodeStr, "8", v16i8, NEONvsri> {
4053*9880d681SAndroid Build Coastguard Worker    let Inst{21-19} = 0b001; // imm6 = 001xxx
4054*9880d681SAndroid Build Coastguard Worker  }
4055*9880d681SAndroid Build Coastguard Worker  def v8i16 : N2VQShIns<op24, op23, op11_8, 0, op4, shr_imm16,
4056*9880d681SAndroid Build Coastguard Worker                        N2RegVShRFrm, OpcodeStr, "16", v8i16, NEONvsri> {
4057*9880d681SAndroid Build Coastguard Worker    let Inst{21-20} = 0b01;  // imm6 = 01xxxx
4058*9880d681SAndroid Build Coastguard Worker  }
4059*9880d681SAndroid Build Coastguard Worker  def v4i32 : N2VQShIns<op24, op23, op11_8, 0, op4, shr_imm32,
4060*9880d681SAndroid Build Coastguard Worker                        N2RegVShRFrm, OpcodeStr, "32", v4i32, NEONvsri> {
4061*9880d681SAndroid Build Coastguard Worker    let Inst{21} = 0b1;      // imm6 = 1xxxxx
4062*9880d681SAndroid Build Coastguard Worker  }
4063*9880d681SAndroid Build Coastguard Worker  def v2i64 : N2VQShIns<op24, op23, op11_8, 1, op4, shr_imm64,
4064*9880d681SAndroid Build Coastguard Worker                        N2RegVShRFrm, OpcodeStr, "64", v2i64, NEONvsri>;
4065*9880d681SAndroid Build Coastguard Worker                             // imm6 = xxxxxx
4066*9880d681SAndroid Build Coastguard Worker}
4067*9880d681SAndroid Build Coastguard Worker
4068*9880d681SAndroid Build Coastguard Worker// Neon Shift Long operations,
4069*9880d681SAndroid Build Coastguard Worker//   element sizes of 8, 16, 32 bits:
4070*9880d681SAndroid Build Coastguard Workermulticlass N2VLSh_QHS<bit op24, bit op23, bits<4> op11_8, bit op7, bit op6,
4071*9880d681SAndroid Build Coastguard Worker                      bit op4, string OpcodeStr, string Dt,
4072*9880d681SAndroid Build Coastguard Worker                      SDPatternOperator OpNode> {
4073*9880d681SAndroid Build Coastguard Worker  def v8i16 : N2VLSh<op24, op23, op11_8, op7, op6, op4,
4074*9880d681SAndroid Build Coastguard Worker              OpcodeStr, !strconcat(Dt, "8"), v8i16, v8i8, imm1_7, OpNode> {
4075*9880d681SAndroid Build Coastguard Worker    let Inst{21-19} = 0b001; // imm6 = 001xxx
4076*9880d681SAndroid Build Coastguard Worker  }
4077*9880d681SAndroid Build Coastguard Worker  def v4i32 : N2VLSh<op24, op23, op11_8, op7, op6, op4,
4078*9880d681SAndroid Build Coastguard Worker               OpcodeStr, !strconcat(Dt, "16"), v4i32, v4i16, imm1_15, OpNode> {
4079*9880d681SAndroid Build Coastguard Worker    let Inst{21-20} = 0b01;  // imm6 = 01xxxx
4080*9880d681SAndroid Build Coastguard Worker  }
4081*9880d681SAndroid Build Coastguard Worker  def v2i64 : N2VLSh<op24, op23, op11_8, op7, op6, op4,
4082*9880d681SAndroid Build Coastguard Worker               OpcodeStr, !strconcat(Dt, "32"), v2i64, v2i32, imm1_31, OpNode> {
4083*9880d681SAndroid Build Coastguard Worker    let Inst{21} = 0b1;      // imm6 = 1xxxxx
4084*9880d681SAndroid Build Coastguard Worker  }
4085*9880d681SAndroid Build Coastguard Worker}
4086*9880d681SAndroid Build Coastguard Worker
4087*9880d681SAndroid Build Coastguard Worker// Neon Shift Narrow operations,
4088*9880d681SAndroid Build Coastguard Worker//   element sizes of 16, 32, 64 bits:
4089*9880d681SAndroid Build Coastguard Workermulticlass N2VNSh_HSD<bit op24, bit op23, bits<4> op11_8, bit op7, bit op6,
4090*9880d681SAndroid Build Coastguard Worker                      bit op4, InstrItinClass itin, string OpcodeStr, string Dt,
4091*9880d681SAndroid Build Coastguard Worker                      SDPatternOperator OpNode> {
4092*9880d681SAndroid Build Coastguard Worker  def v8i8 : N2VNSh<op24, op23, op11_8, op7, op6, op4, itin,
4093*9880d681SAndroid Build Coastguard Worker                    OpcodeStr, !strconcat(Dt, "16"),
4094*9880d681SAndroid Build Coastguard Worker                    v8i8, v8i16, shr_imm8, OpNode> {
4095*9880d681SAndroid Build Coastguard Worker    let Inst{21-19} = 0b001; // imm6 = 001xxx
4096*9880d681SAndroid Build Coastguard Worker  }
4097*9880d681SAndroid Build Coastguard Worker  def v4i16 : N2VNSh<op24, op23, op11_8, op7, op6, op4, itin,
4098*9880d681SAndroid Build Coastguard Worker                     OpcodeStr, !strconcat(Dt, "32"),
4099*9880d681SAndroid Build Coastguard Worker                     v4i16, v4i32, shr_imm16, OpNode> {
4100*9880d681SAndroid Build Coastguard Worker    let Inst{21-20} = 0b01;  // imm6 = 01xxxx
4101*9880d681SAndroid Build Coastguard Worker  }
4102*9880d681SAndroid Build Coastguard Worker  def v2i32 : N2VNSh<op24, op23, op11_8, op7, op6, op4, itin,
4103*9880d681SAndroid Build Coastguard Worker                     OpcodeStr, !strconcat(Dt, "64"),
4104*9880d681SAndroid Build Coastguard Worker                     v2i32, v2i64, shr_imm32, OpNode> {
4105*9880d681SAndroid Build Coastguard Worker    let Inst{21} = 0b1;      // imm6 = 1xxxxx
4106*9880d681SAndroid Build Coastguard Worker  }
4107*9880d681SAndroid Build Coastguard Worker}
4108*9880d681SAndroid Build Coastguard Worker
4109*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===//
4110*9880d681SAndroid Build Coastguard Worker// Instruction Definitions.
4111*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===//
4112*9880d681SAndroid Build Coastguard Worker
4113*9880d681SAndroid Build Coastguard Worker// Vector Add Operations.
4114*9880d681SAndroid Build Coastguard Worker
4115*9880d681SAndroid Build Coastguard Worker//   VADD     : Vector Add (integer and floating-point)
4116*9880d681SAndroid Build Coastguard Workerdefm VADD     : N3V_QHSD<0, 0, 0b1000, 0, IIC_VBINiD, IIC_VBINiQ, "vadd", "i",
4117*9880d681SAndroid Build Coastguard Worker                         add, 1>;
4118*9880d681SAndroid Build Coastguard Workerdef  VADDfd   : N3VD<0, 0, 0b00, 0b1101, 0, IIC_VBIND, "vadd", "f32",
4119*9880d681SAndroid Build Coastguard Worker                     v2f32, v2f32, fadd, 1>;
4120*9880d681SAndroid Build Coastguard Workerdef  VADDfq   : N3VQ<0, 0, 0b00, 0b1101, 0, IIC_VBINQ, "vadd", "f32",
4121*9880d681SAndroid Build Coastguard Worker                     v4f32, v4f32, fadd, 1>;
4122*9880d681SAndroid Build Coastguard Workerdef  VADDhd   : N3VD<0, 0, 0b01, 0b1101, 0, IIC_VBIND, "vadd", "f16",
4123*9880d681SAndroid Build Coastguard Worker                     v4f16, v4f16, fadd, 1>,
4124*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON,HasFullFP16]>;
4125*9880d681SAndroid Build Coastguard Workerdef  VADDhq   : N3VQ<0, 0, 0b01, 0b1101, 0, IIC_VBINQ, "vadd", "f16",
4126*9880d681SAndroid Build Coastguard Worker                     v8f16, v8f16, fadd, 1>,
4127*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON,HasFullFP16]>;
4128*9880d681SAndroid Build Coastguard Worker//   VADDL    : Vector Add Long (Q = D + D)
4129*9880d681SAndroid Build Coastguard Workerdefm VADDLs   : N3VLExt_QHS<0,1,0b0000,0, IIC_VSHLiD, IIC_VSHLiD,
4130*9880d681SAndroid Build Coastguard Worker                            "vaddl", "s", add, sext, 1>;
4131*9880d681SAndroid Build Coastguard Workerdefm VADDLu   : N3VLExt_QHS<1,1,0b0000,0, IIC_VSHLiD, IIC_VSHLiD,
4132*9880d681SAndroid Build Coastguard Worker                            "vaddl", "u", add, zext, 1>;
4133*9880d681SAndroid Build Coastguard Worker//   VADDW    : Vector Add Wide (Q = Q + D)
4134*9880d681SAndroid Build Coastguard Workerdefm VADDWs   : N3VW_QHS<0,1,0b0001,0, "vaddw", "s", add, sext, 0>;
4135*9880d681SAndroid Build Coastguard Workerdefm VADDWu   : N3VW_QHS<1,1,0b0001,0, "vaddw", "u", add, zext, 0>;
4136*9880d681SAndroid Build Coastguard Worker//   VHADD    : Vector Halving Add
4137*9880d681SAndroid Build Coastguard Workerdefm VHADDs   : N3VInt_QHS<0, 0, 0b0000, 0, N3RegFrm,
4138*9880d681SAndroid Build Coastguard Worker                           IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, IIC_VBINi4Q,
4139*9880d681SAndroid Build Coastguard Worker                           "vhadd", "s", int_arm_neon_vhadds, 1>;
4140*9880d681SAndroid Build Coastguard Workerdefm VHADDu   : N3VInt_QHS<1, 0, 0b0000, 0, N3RegFrm,
4141*9880d681SAndroid Build Coastguard Worker                           IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, IIC_VBINi4Q,
4142*9880d681SAndroid Build Coastguard Worker                           "vhadd", "u", int_arm_neon_vhaddu, 1>;
4143*9880d681SAndroid Build Coastguard Worker//   VRHADD   : Vector Rounding Halving Add
4144*9880d681SAndroid Build Coastguard Workerdefm VRHADDs  : N3VInt_QHS<0, 0, 0b0001, 0, N3RegFrm,
4145*9880d681SAndroid Build Coastguard Worker                           IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, IIC_VBINi4Q,
4146*9880d681SAndroid Build Coastguard Worker                           "vrhadd", "s", int_arm_neon_vrhadds, 1>;
4147*9880d681SAndroid Build Coastguard Workerdefm VRHADDu  : N3VInt_QHS<1, 0, 0b0001, 0, N3RegFrm,
4148*9880d681SAndroid Build Coastguard Worker                           IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, IIC_VBINi4Q,
4149*9880d681SAndroid Build Coastguard Worker                           "vrhadd", "u", int_arm_neon_vrhaddu, 1>;
4150*9880d681SAndroid Build Coastguard Worker//   VQADD    : Vector Saturating Add
4151*9880d681SAndroid Build Coastguard Workerdefm VQADDs   : N3VInt_QHSD<0, 0, 0b0000, 1, N3RegFrm,
4152*9880d681SAndroid Build Coastguard Worker                            IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, IIC_VBINi4Q,
4153*9880d681SAndroid Build Coastguard Worker                            "vqadd", "s", int_arm_neon_vqadds, 1>;
4154*9880d681SAndroid Build Coastguard Workerdefm VQADDu   : N3VInt_QHSD<1, 0, 0b0000, 1, N3RegFrm,
4155*9880d681SAndroid Build Coastguard Worker                            IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q, IIC_VBINi4Q,
4156*9880d681SAndroid Build Coastguard Worker                            "vqadd", "u", int_arm_neon_vqaddu, 1>;
4157*9880d681SAndroid Build Coastguard Worker//   VADDHN   : Vector Add and Narrow Returning High Half (D = Q + Q)
4158*9880d681SAndroid Build Coastguard Workerdefm VADDHN   : N3VNInt_HSD<0,1,0b0100,0, "vaddhn", "i", null_frag, 1>;
4159*9880d681SAndroid Build Coastguard Worker//   VRADDHN  : Vector Rounding Add and Narrow Returning High Half (D = Q + Q)
4160*9880d681SAndroid Build Coastguard Workerdefm VRADDHN  : N3VNInt_HSD<1,1,0b0100,0, "vraddhn", "i",
4161*9880d681SAndroid Build Coastguard Worker                            int_arm_neon_vraddhn, 1>;
4162*9880d681SAndroid Build Coastguard Worker
4163*9880d681SAndroid Build Coastguard Workerdef : Pat<(v8i8  (trunc (NEONvshru (add (v8i16 QPR:$Vn), QPR:$Vm), 8))),
4164*9880d681SAndroid Build Coastguard Worker          (VADDHNv8i8 QPR:$Vn, QPR:$Vm)>;
4165*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i16 (trunc (NEONvshru (add (v4i32 QPR:$Vn), QPR:$Vm), 16))),
4166*9880d681SAndroid Build Coastguard Worker          (VADDHNv4i16 QPR:$Vn, QPR:$Vm)>;
4167*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2i32 (trunc (NEONvshru (add (v2i64 QPR:$Vn), QPR:$Vm), 32))),
4168*9880d681SAndroid Build Coastguard Worker          (VADDHNv2i32 QPR:$Vn, QPR:$Vm)>;
4169*9880d681SAndroid Build Coastguard Worker
4170*9880d681SAndroid Build Coastguard Worker// Vector Multiply Operations.
4171*9880d681SAndroid Build Coastguard Worker
4172*9880d681SAndroid Build Coastguard Worker//   VMUL     : Vector Multiply (integer, polynomial and floating-point)
4173*9880d681SAndroid Build Coastguard Workerdefm VMUL     : N3V_QHS<0, 0, 0b1001, 1, IIC_VMULi16D, IIC_VMULi32D,
4174*9880d681SAndroid Build Coastguard Worker                        IIC_VMULi16Q, IIC_VMULi32Q, "vmul", "i", mul, 1>;
4175*9880d681SAndroid Build Coastguard Workerdef  VMULpd   : N3VDInt<1, 0, 0b00, 0b1001, 1, N3RegFrm, IIC_VMULi16D, "vmul",
4176*9880d681SAndroid Build Coastguard Worker                        "p8", v8i8, v8i8, int_arm_neon_vmulp, 1>;
4177*9880d681SAndroid Build Coastguard Workerdef  VMULpq   : N3VQInt<1, 0, 0b00, 0b1001, 1, N3RegFrm, IIC_VMULi16Q, "vmul",
4178*9880d681SAndroid Build Coastguard Worker                        "p8", v16i8, v16i8, int_arm_neon_vmulp, 1>;
4179*9880d681SAndroid Build Coastguard Workerdef  VMULfd   : N3VD<1, 0, 0b00, 0b1101, 1, IIC_VFMULD, "vmul", "f32",
4180*9880d681SAndroid Build Coastguard Worker                     v2f32, v2f32, fmul, 1>;
4181*9880d681SAndroid Build Coastguard Workerdef  VMULfq   : N3VQ<1, 0, 0b00, 0b1101, 1, IIC_VFMULQ, "vmul", "f32",
4182*9880d681SAndroid Build Coastguard Worker                     v4f32, v4f32, fmul, 1>;
4183*9880d681SAndroid Build Coastguard Workerdef  VMULhd   : N3VD<1, 0, 0b01, 0b1101, 1, IIC_VFMULD, "vmul", "f16",
4184*9880d681SAndroid Build Coastguard Worker                     v4f16, v4f16, fmul, 1>,
4185*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON,HasFullFP16]>;
4186*9880d681SAndroid Build Coastguard Workerdef  VMULhq   : N3VQ<1, 0, 0b01, 0b1101, 1, IIC_VFMULQ, "vmul", "f16",
4187*9880d681SAndroid Build Coastguard Worker                     v8f16, v8f16, fmul, 1>,
4188*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON,HasFullFP16]>;
4189*9880d681SAndroid Build Coastguard Workerdefm VMULsl   : N3VSL_HS<0b1000, "vmul", mul>;
4190*9880d681SAndroid Build Coastguard Workerdef  VMULslfd : N3VDSL<0b10, 0b1001, IIC_VBIND, "vmul", "f32", v2f32, fmul>;
4191*9880d681SAndroid Build Coastguard Workerdef  VMULslfq : N3VQSL<0b10, 0b1001, IIC_VBINQ, "vmul", "f32", v4f32,
4192*9880d681SAndroid Build Coastguard Worker                       v2f32, fmul>;
4193*9880d681SAndroid Build Coastguard Workerdef  VMULslhd : N3VDSL16<0b01, 0b1001, "vmul", "f16", v4f16, fmul>,
4194*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON,HasFullFP16]>;
4195*9880d681SAndroid Build Coastguard Workerdef  VMULslhq : N3VQSL16<0b01, 0b1001, "vmul", "f16", v8f16,
4196*9880d681SAndroid Build Coastguard Worker                       v4f16, fmul>,
4197*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON,HasFullFP16]>;
4198*9880d681SAndroid Build Coastguard Worker
4199*9880d681SAndroid Build Coastguard Workerdef : Pat<(v8i16 (mul (v8i16 QPR:$src1),
4200*9880d681SAndroid Build Coastguard Worker                      (v8i16 (NEONvduplane (v8i16 QPR:$src2), imm:$lane)))),
4201*9880d681SAndroid Build Coastguard Worker          (v8i16 (VMULslv8i16 (v8i16 QPR:$src1),
4202*9880d681SAndroid Build Coastguard Worker                              (v4i16 (EXTRACT_SUBREG QPR:$src2,
4203*9880d681SAndroid Build Coastguard Worker                                      (DSubReg_i16_reg imm:$lane))),
4204*9880d681SAndroid Build Coastguard Worker                              (SubReg_i16_lane imm:$lane)))>;
4205*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i32 (mul (v4i32 QPR:$src1),
4206*9880d681SAndroid Build Coastguard Worker                      (v4i32 (NEONvduplane (v4i32 QPR:$src2), imm:$lane)))),
4207*9880d681SAndroid Build Coastguard Worker          (v4i32 (VMULslv4i32 (v4i32 QPR:$src1),
4208*9880d681SAndroid Build Coastguard Worker                              (v2i32 (EXTRACT_SUBREG QPR:$src2,
4209*9880d681SAndroid Build Coastguard Worker                                      (DSubReg_i32_reg imm:$lane))),
4210*9880d681SAndroid Build Coastguard Worker                              (SubReg_i32_lane imm:$lane)))>;
4211*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4f32 (fmul (v4f32 QPR:$src1),
4212*9880d681SAndroid Build Coastguard Worker                       (v4f32 (NEONvduplane (v4f32 QPR:$src2), imm:$lane)))),
4213*9880d681SAndroid Build Coastguard Worker          (v4f32 (VMULslfq (v4f32 QPR:$src1),
4214*9880d681SAndroid Build Coastguard Worker                           (v2f32 (EXTRACT_SUBREG QPR:$src2,
4215*9880d681SAndroid Build Coastguard Worker                                   (DSubReg_i32_reg imm:$lane))),
4216*9880d681SAndroid Build Coastguard Worker                           (SubReg_i32_lane imm:$lane)))>;
4217*9880d681SAndroid Build Coastguard Worker
4218*9880d681SAndroid Build Coastguard Worker
4219*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2f32 (fmul DPR:$Rn, (NEONvdup (f32 SPR:$Rm)))),
4220*9880d681SAndroid Build Coastguard Worker          (VMULslfd DPR:$Rn,
4221*9880d681SAndroid Build Coastguard Worker            (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), SPR:$Rm, ssub_0),
4222*9880d681SAndroid Build Coastguard Worker            (i32 0))>;
4223*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4f32 (fmul QPR:$Rn, (NEONvdup (f32 SPR:$Rm)))),
4224*9880d681SAndroid Build Coastguard Worker          (VMULslfq QPR:$Rn,
4225*9880d681SAndroid Build Coastguard Worker            (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), SPR:$Rm, ssub_0),
4226*9880d681SAndroid Build Coastguard Worker            (i32 0))>;
4227*9880d681SAndroid Build Coastguard Worker
4228*9880d681SAndroid Build Coastguard Worker
4229*9880d681SAndroid Build Coastguard Worker//   VQDMULH  : Vector Saturating Doubling Multiply Returning High Half
4230*9880d681SAndroid Build Coastguard Workerdefm VQDMULH  : N3VInt_HS<0, 0, 0b1011, 0, N3RegFrm, IIC_VMULi16D, IIC_VMULi32D,
4231*9880d681SAndroid Build Coastguard Worker                          IIC_VMULi16Q, IIC_VMULi32Q,
4232*9880d681SAndroid Build Coastguard Worker                          "vqdmulh", "s", int_arm_neon_vqdmulh, 1>;
4233*9880d681SAndroid Build Coastguard Workerdefm VQDMULHsl: N3VIntSL_HS<0b1100, IIC_VMULi16D, IIC_VMULi32D,
4234*9880d681SAndroid Build Coastguard Worker                            IIC_VMULi16Q, IIC_VMULi32Q,
4235*9880d681SAndroid Build Coastguard Worker                            "vqdmulh", "s",  int_arm_neon_vqdmulh>;
4236*9880d681SAndroid Build Coastguard Workerdef : Pat<(v8i16 (int_arm_neon_vqdmulh (v8i16 QPR:$src1),
4237*9880d681SAndroid Build Coastguard Worker                                       (v8i16 (NEONvduplane (v8i16 QPR:$src2),
4238*9880d681SAndroid Build Coastguard Worker                                                            imm:$lane)))),
4239*9880d681SAndroid Build Coastguard Worker          (v8i16 (VQDMULHslv8i16 (v8i16 QPR:$src1),
4240*9880d681SAndroid Build Coastguard Worker                                 (v4i16 (EXTRACT_SUBREG QPR:$src2,
4241*9880d681SAndroid Build Coastguard Worker                                         (DSubReg_i16_reg imm:$lane))),
4242*9880d681SAndroid Build Coastguard Worker                                 (SubReg_i16_lane imm:$lane)))>;
4243*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i32 (int_arm_neon_vqdmulh (v4i32 QPR:$src1),
4244*9880d681SAndroid Build Coastguard Worker                                       (v4i32 (NEONvduplane (v4i32 QPR:$src2),
4245*9880d681SAndroid Build Coastguard Worker                                                            imm:$lane)))),
4246*9880d681SAndroid Build Coastguard Worker          (v4i32 (VQDMULHslv4i32 (v4i32 QPR:$src1),
4247*9880d681SAndroid Build Coastguard Worker                                 (v2i32 (EXTRACT_SUBREG QPR:$src2,
4248*9880d681SAndroid Build Coastguard Worker                                         (DSubReg_i32_reg imm:$lane))),
4249*9880d681SAndroid Build Coastguard Worker                                 (SubReg_i32_lane imm:$lane)))>;
4250*9880d681SAndroid Build Coastguard Worker
4251*9880d681SAndroid Build Coastguard Worker//   VQRDMULH : Vector Rounding Saturating Doubling Multiply Returning High Half
4252*9880d681SAndroid Build Coastguard Workerdefm VQRDMULH   : N3VInt_HS<1, 0, 0b1011, 0, N3RegFrm,
4253*9880d681SAndroid Build Coastguard Worker                            IIC_VMULi16D,IIC_VMULi32D,IIC_VMULi16Q,IIC_VMULi32Q,
4254*9880d681SAndroid Build Coastguard Worker                            "vqrdmulh", "s", int_arm_neon_vqrdmulh, 1>;
4255*9880d681SAndroid Build Coastguard Workerdefm VQRDMULHsl : N3VIntSL_HS<0b1101, IIC_VMULi16D, IIC_VMULi32D,
4256*9880d681SAndroid Build Coastguard Worker                              IIC_VMULi16Q, IIC_VMULi32Q,
4257*9880d681SAndroid Build Coastguard Worker                              "vqrdmulh", "s",  int_arm_neon_vqrdmulh>;
4258*9880d681SAndroid Build Coastguard Workerdef : Pat<(v8i16 (int_arm_neon_vqrdmulh (v8i16 QPR:$src1),
4259*9880d681SAndroid Build Coastguard Worker                                        (v8i16 (NEONvduplane (v8i16 QPR:$src2),
4260*9880d681SAndroid Build Coastguard Worker                                                             imm:$lane)))),
4261*9880d681SAndroid Build Coastguard Worker          (v8i16 (VQRDMULHslv8i16 (v8i16 QPR:$src1),
4262*9880d681SAndroid Build Coastguard Worker                                  (v4i16 (EXTRACT_SUBREG QPR:$src2,
4263*9880d681SAndroid Build Coastguard Worker                                          (DSubReg_i16_reg imm:$lane))),
4264*9880d681SAndroid Build Coastguard Worker                                  (SubReg_i16_lane imm:$lane)))>;
4265*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i32 (int_arm_neon_vqrdmulh (v4i32 QPR:$src1),
4266*9880d681SAndroid Build Coastguard Worker                                        (v4i32 (NEONvduplane (v4i32 QPR:$src2),
4267*9880d681SAndroid Build Coastguard Worker                                                             imm:$lane)))),
4268*9880d681SAndroid Build Coastguard Worker          (v4i32 (VQRDMULHslv4i32 (v4i32 QPR:$src1),
4269*9880d681SAndroid Build Coastguard Worker                                  (v2i32 (EXTRACT_SUBREG QPR:$src2,
4270*9880d681SAndroid Build Coastguard Worker                                          (DSubReg_i32_reg imm:$lane))),
4271*9880d681SAndroid Build Coastguard Worker                                  (SubReg_i32_lane imm:$lane)))>;
4272*9880d681SAndroid Build Coastguard Worker
4273*9880d681SAndroid Build Coastguard Worker//   VMULL    : Vector Multiply Long (integer and polynomial) (Q = D * D)
4274*9880d681SAndroid Build Coastguard Workerlet PostEncoderMethod = "NEONThumb2DataIPostEncoder",
4275*9880d681SAndroid Build Coastguard Worker    DecoderNamespace = "NEONData" in {
4276*9880d681SAndroid Build Coastguard Worker  defm VMULLs   : N3VL_QHS<0,1,0b1100,0, IIC_VMULi16D, IIC_VMULi32D,
4277*9880d681SAndroid Build Coastguard Worker                           "vmull", "s", NEONvmulls, 1>;
4278*9880d681SAndroid Build Coastguard Worker  defm VMULLu   : N3VL_QHS<1,1,0b1100,0, IIC_VMULi16D, IIC_VMULi32D,
4279*9880d681SAndroid Build Coastguard Worker                           "vmull", "u", NEONvmullu, 1>;
4280*9880d681SAndroid Build Coastguard Worker  def  VMULLp8   :  N3VLInt<0, 1, 0b00, 0b1110, 0, IIC_VMULi16D, "vmull", "p8",
4281*9880d681SAndroid Build Coastguard Worker                            v8i16, v8i8, int_arm_neon_vmullp, 1>;
4282*9880d681SAndroid Build Coastguard Worker  def  VMULLp64  : N3VLIntnp<0b00101, 0b10, 0b1110, 0, 0, NoItinerary,
4283*9880d681SAndroid Build Coastguard Worker                          "vmull", "p64", v2i64, v1i64, int_arm_neon_vmullp, 1>,
4284*9880d681SAndroid Build Coastguard Worker                    Requires<[HasV8, HasCrypto]>;
4285*9880d681SAndroid Build Coastguard Worker}
4286*9880d681SAndroid Build Coastguard Workerdefm VMULLsls : N3VLSL_HS<0, 0b1010, IIC_VMULi16D, "vmull", "s", NEONvmulls>;
4287*9880d681SAndroid Build Coastguard Workerdefm VMULLslu : N3VLSL_HS<1, 0b1010, IIC_VMULi16D, "vmull", "u", NEONvmullu>;
4288*9880d681SAndroid Build Coastguard Worker
4289*9880d681SAndroid Build Coastguard Worker//   VQDMULL  : Vector Saturating Doubling Multiply Long (Q = D * D)
4290*9880d681SAndroid Build Coastguard Workerdefm VQDMULL  : N3VLInt_HS<0,1,0b1101,0, IIC_VMULi16D, IIC_VMULi32D,
4291*9880d681SAndroid Build Coastguard Worker                           "vqdmull", "s", int_arm_neon_vqdmull, 1>;
4292*9880d681SAndroid Build Coastguard Workerdefm VQDMULLsl: N3VLIntSL_HS<0, 0b1011, IIC_VMULi16D,
4293*9880d681SAndroid Build Coastguard Worker                             "vqdmull", "s", int_arm_neon_vqdmull>;
4294*9880d681SAndroid Build Coastguard Worker
4295*9880d681SAndroid Build Coastguard Worker// Vector Multiply-Accumulate and Multiply-Subtract Operations.
4296*9880d681SAndroid Build Coastguard Worker
4297*9880d681SAndroid Build Coastguard Worker//   VMLA     : Vector Multiply Accumulate (integer and floating-point)
4298*9880d681SAndroid Build Coastguard Workerdefm VMLA     : N3VMulOp_QHS<0, 0, 0b1001, 0, IIC_VMACi16D, IIC_VMACi32D,
4299*9880d681SAndroid Build Coastguard Worker                             IIC_VMACi16Q, IIC_VMACi32Q, "vmla", "i", add>;
4300*9880d681SAndroid Build Coastguard Workerdef  VMLAfd   : N3VDMulOp<0, 0, 0b00, 0b1101, 1, IIC_VMACD, "vmla", "f32",
4301*9880d681SAndroid Build Coastguard Worker                          v2f32, fmul_su, fadd_mlx>,
4302*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, UseFPVMLx, DontUseFusedMAC]>;
4303*9880d681SAndroid Build Coastguard Workerdef  VMLAfq   : N3VQMulOp<0, 0, 0b00, 0b1101, 1, IIC_VMACQ, "vmla", "f32",
4304*9880d681SAndroid Build Coastguard Worker                          v4f32, fmul_su, fadd_mlx>,
4305*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, UseFPVMLx, DontUseFusedMAC]>;
4306*9880d681SAndroid Build Coastguard Workerdef  VMLAhd   : N3VDMulOp<0, 0, 0b01, 0b1101, 1, IIC_VMACD, "vmla", "f16",
4307*9880d681SAndroid Build Coastguard Worker                          v4f16, fmul_su, fadd_mlx>,
4308*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16, UseFPVMLx, DontUseFusedMAC]>;
4309*9880d681SAndroid Build Coastguard Workerdef  VMLAhq   : N3VQMulOp<0, 0, 0b01, 0b1101, 1, IIC_VMACQ, "vmla", "f16",
4310*9880d681SAndroid Build Coastguard Worker                          v8f16, fmul_su, fadd_mlx>,
4311*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16, UseFPVMLx, DontUseFusedMAC]>;
4312*9880d681SAndroid Build Coastguard Workerdefm VMLAsl   : N3VMulOpSL_HS<0b0000, IIC_VMACi16D, IIC_VMACi32D,
4313*9880d681SAndroid Build Coastguard Worker                              IIC_VMACi16Q, IIC_VMACi32Q, "vmla", "i", add>;
4314*9880d681SAndroid Build Coastguard Workerdef  VMLAslfd : N3VDMulOpSL<0b10, 0b0001, IIC_VMACD, "vmla", "f32",
4315*9880d681SAndroid Build Coastguard Worker                            v2f32, fmul_su, fadd_mlx>,
4316*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, UseFPVMLx]>;
4317*9880d681SAndroid Build Coastguard Workerdef  VMLAslfq : N3VQMulOpSL<0b10, 0b0001, IIC_VMACQ, "vmla", "f32",
4318*9880d681SAndroid Build Coastguard Worker                            v4f32, v2f32, fmul_su, fadd_mlx>,
4319*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, UseFPVMLx]>;
4320*9880d681SAndroid Build Coastguard Workerdef  VMLAslhd : N3VDMulOpSL16<0b01, 0b0001, IIC_VMACD, "vmla", "f16",
4321*9880d681SAndroid Build Coastguard Worker                            v4f16, fmul, fadd>,
4322*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16, UseFPVMLx]>;
4323*9880d681SAndroid Build Coastguard Workerdef  VMLAslhq : N3VQMulOpSL16<0b01, 0b0001, IIC_VMACQ, "vmla", "f16",
4324*9880d681SAndroid Build Coastguard Worker                            v8f16, v4f16, fmul, fadd>,
4325*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16, UseFPVMLx]>;
4326*9880d681SAndroid Build Coastguard Worker
4327*9880d681SAndroid Build Coastguard Workerdef : Pat<(v8i16 (add (v8i16 QPR:$src1),
4328*9880d681SAndroid Build Coastguard Worker                  (mul (v8i16 QPR:$src2),
4329*9880d681SAndroid Build Coastguard Worker                       (v8i16 (NEONvduplane (v8i16 QPR:$src3), imm:$lane))))),
4330*9880d681SAndroid Build Coastguard Worker          (v8i16 (VMLAslv8i16 (v8i16 QPR:$src1), (v8i16 QPR:$src2),
4331*9880d681SAndroid Build Coastguard Worker                              (v4i16 (EXTRACT_SUBREG QPR:$src3,
4332*9880d681SAndroid Build Coastguard Worker                                      (DSubReg_i16_reg imm:$lane))),
4333*9880d681SAndroid Build Coastguard Worker                              (SubReg_i16_lane imm:$lane)))>;
4334*9880d681SAndroid Build Coastguard Worker
4335*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i32 (add (v4i32 QPR:$src1),
4336*9880d681SAndroid Build Coastguard Worker                  (mul (v4i32 QPR:$src2),
4337*9880d681SAndroid Build Coastguard Worker                       (v4i32 (NEONvduplane (v4i32 QPR:$src3), imm:$lane))))),
4338*9880d681SAndroid Build Coastguard Worker          (v4i32 (VMLAslv4i32 (v4i32 QPR:$src1), (v4i32 QPR:$src2),
4339*9880d681SAndroid Build Coastguard Worker                              (v2i32 (EXTRACT_SUBREG QPR:$src3,
4340*9880d681SAndroid Build Coastguard Worker                                      (DSubReg_i32_reg imm:$lane))),
4341*9880d681SAndroid Build Coastguard Worker                              (SubReg_i32_lane imm:$lane)))>;
4342*9880d681SAndroid Build Coastguard Worker
4343*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4f32 (fadd_mlx (v4f32 QPR:$src1),
4344*9880d681SAndroid Build Coastguard Worker                  (fmul_su (v4f32 QPR:$src2),
4345*9880d681SAndroid Build Coastguard Worker                        (v4f32 (NEONvduplane (v4f32 QPR:$src3), imm:$lane))))),
4346*9880d681SAndroid Build Coastguard Worker          (v4f32 (VMLAslfq (v4f32 QPR:$src1),
4347*9880d681SAndroid Build Coastguard Worker                           (v4f32 QPR:$src2),
4348*9880d681SAndroid Build Coastguard Worker                           (v2f32 (EXTRACT_SUBREG QPR:$src3,
4349*9880d681SAndroid Build Coastguard Worker                                   (DSubReg_i32_reg imm:$lane))),
4350*9880d681SAndroid Build Coastguard Worker                           (SubReg_i32_lane imm:$lane)))>,
4351*9880d681SAndroid Build Coastguard Worker          Requires<[HasNEON, UseFPVMLx]>;
4352*9880d681SAndroid Build Coastguard Worker
4353*9880d681SAndroid Build Coastguard Worker//   VMLAL    : Vector Multiply Accumulate Long (Q += D * D)
4354*9880d681SAndroid Build Coastguard Workerdefm VMLALs   : N3VLMulOp_QHS<0,1,0b1000,0, IIC_VMACi16D, IIC_VMACi32D,
4355*9880d681SAndroid Build Coastguard Worker                              "vmlal", "s", NEONvmulls, add>;
4356*9880d681SAndroid Build Coastguard Workerdefm VMLALu   : N3VLMulOp_QHS<1,1,0b1000,0, IIC_VMACi16D, IIC_VMACi32D,
4357*9880d681SAndroid Build Coastguard Worker                              "vmlal", "u", NEONvmullu, add>;
4358*9880d681SAndroid Build Coastguard Worker
4359*9880d681SAndroid Build Coastguard Workerdefm VMLALsls : N3VLMulOpSL_HS<0, 0b0010, "vmlal", "s", NEONvmulls, add>;
4360*9880d681SAndroid Build Coastguard Workerdefm VMLALslu : N3VLMulOpSL_HS<1, 0b0010, "vmlal", "u", NEONvmullu, add>;
4361*9880d681SAndroid Build Coastguard Worker
4362*9880d681SAndroid Build Coastguard Workerlet Predicates = [HasNEON, HasV8_1a] in {
4363*9880d681SAndroid Build Coastguard Worker  // v8.1a Neon Rounding Double Multiply-Op vector operations,
4364*9880d681SAndroid Build Coastguard Worker  // VQRDMLAH : Vector Saturating Rounding Doubling Multiply Accumulate Long
4365*9880d681SAndroid Build Coastguard Worker  //            (Q += D * D)
4366*9880d681SAndroid Build Coastguard Worker  defm VQRDMLAH : N3VInt3_HS<1, 0, 0b1011, 1, IIC_VMACi16D, IIC_VMACi32D,
4367*9880d681SAndroid Build Coastguard Worker                             IIC_VMACi16Q, IIC_VMACi32Q, "vqrdmlah", "s",
4368*9880d681SAndroid Build Coastguard Worker                             null_frag>;
4369*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4i16 (int_arm_neon_vqadds
4370*9880d681SAndroid Build Coastguard Worker                     (v4i16 DPR:$src1),
4371*9880d681SAndroid Build Coastguard Worker                     (v4i16 (int_arm_neon_vqrdmulh (v4i16 DPR:$Vn),
4372*9880d681SAndroid Build Coastguard Worker                                                   (v4i16 DPR:$Vm))))),
4373*9880d681SAndroid Build Coastguard Worker            (v4i16 (VQRDMLAHv4i16 DPR:$src1, DPR:$Vn, DPR:$Vm))>;
4374*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2i32 (int_arm_neon_vqadds
4375*9880d681SAndroid Build Coastguard Worker                     (v2i32 DPR:$src1),
4376*9880d681SAndroid Build Coastguard Worker                     (v2i32 (int_arm_neon_vqrdmulh (v2i32 DPR:$Vn),
4377*9880d681SAndroid Build Coastguard Worker                                                   (v2i32 DPR:$Vm))))),
4378*9880d681SAndroid Build Coastguard Worker            (v2i32 (VQRDMLAHv2i32 DPR:$src1, DPR:$Vn, DPR:$Vm))>;
4379*9880d681SAndroid Build Coastguard Worker  def : Pat<(v8i16 (int_arm_neon_vqadds
4380*9880d681SAndroid Build Coastguard Worker                     (v8i16 QPR:$src1),
4381*9880d681SAndroid Build Coastguard Worker                     (v8i16 (int_arm_neon_vqrdmulh (v8i16 QPR:$Vn),
4382*9880d681SAndroid Build Coastguard Worker                                                   (v8i16 QPR:$Vm))))),
4383*9880d681SAndroid Build Coastguard Worker            (v8i16 (VQRDMLAHv8i16 QPR:$src1, QPR:$Vn, QPR:$Vm))>;
4384*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4i32 (int_arm_neon_vqadds
4385*9880d681SAndroid Build Coastguard Worker                     (v4i32 QPR:$src1),
4386*9880d681SAndroid Build Coastguard Worker                     (v4i32 (int_arm_neon_vqrdmulh (v4i32 QPR:$Vn),
4387*9880d681SAndroid Build Coastguard Worker                                                   (v4i32 QPR:$Vm))))),
4388*9880d681SAndroid Build Coastguard Worker            (v4i32 (VQRDMLAHv4i32 QPR:$src1, QPR:$Vn, QPR:$Vm))>;
4389*9880d681SAndroid Build Coastguard Worker
4390*9880d681SAndroid Build Coastguard Worker  defm VQRDMLAHsl : N3VMulOpSL_HS<0b1110, IIC_VMACi16D, IIC_VMACi32D,
4391*9880d681SAndroid Build Coastguard Worker                                  IIC_VMACi16Q, IIC_VMACi32Q, "vqrdmlah", "s",
4392*9880d681SAndroid Build Coastguard Worker                                  null_frag>;
4393*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4i16 (int_arm_neon_vqadds
4394*9880d681SAndroid Build Coastguard Worker                     (v4i16 DPR:$src1),
4395*9880d681SAndroid Build Coastguard Worker                     (v4i16 (int_arm_neon_vqrdmulh
4396*9880d681SAndroid Build Coastguard Worker                              (v4i16 DPR:$Vn),
4397*9880d681SAndroid Build Coastguard Worker                              (v4i16 (NEONvduplane (v4i16 DPR_8:$Vm),
4398*9880d681SAndroid Build Coastguard Worker                                                   imm:$lane)))))),
4399*9880d681SAndroid Build Coastguard Worker            (v4i16 (VQRDMLAHslv4i16 DPR:$src1, DPR:$Vn, DPR_8:$Vm,
4400*9880d681SAndroid Build Coastguard Worker                                    imm:$lane))>;
4401*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2i32 (int_arm_neon_vqadds
4402*9880d681SAndroid Build Coastguard Worker                     (v2i32 DPR:$src1),
4403*9880d681SAndroid Build Coastguard Worker                     (v2i32 (int_arm_neon_vqrdmulh
4404*9880d681SAndroid Build Coastguard Worker                              (v2i32 DPR:$Vn),
4405*9880d681SAndroid Build Coastguard Worker                              (v2i32 (NEONvduplane (v2i32 DPR_VFP2:$Vm),
4406*9880d681SAndroid Build Coastguard Worker                                                   imm:$lane)))))),
4407*9880d681SAndroid Build Coastguard Worker            (v2i32 (VQRDMLAHslv2i32 DPR:$src1, DPR:$Vn, DPR_VFP2:$Vm,
4408*9880d681SAndroid Build Coastguard Worker                                    imm:$lane))>;
4409*9880d681SAndroid Build Coastguard Worker  def : Pat<(v8i16 (int_arm_neon_vqadds
4410*9880d681SAndroid Build Coastguard Worker                     (v8i16 QPR:$src1),
4411*9880d681SAndroid Build Coastguard Worker                     (v8i16 (int_arm_neon_vqrdmulh
4412*9880d681SAndroid Build Coastguard Worker                              (v8i16 QPR:$src2),
4413*9880d681SAndroid Build Coastguard Worker                              (v8i16 (NEONvduplane (v8i16 QPR:$src3),
4414*9880d681SAndroid Build Coastguard Worker                                                   imm:$lane)))))),
4415*9880d681SAndroid Build Coastguard Worker            (v8i16 (VQRDMLAHslv8i16 (v8i16 QPR:$src1),
4416*9880d681SAndroid Build Coastguard Worker                                    (v8i16 QPR:$src2),
4417*9880d681SAndroid Build Coastguard Worker                                    (v4i16 (EXTRACT_SUBREG
4418*9880d681SAndroid Build Coastguard Worker                                             QPR:$src3,
4419*9880d681SAndroid Build Coastguard Worker                                             (DSubReg_i16_reg imm:$lane))),
4420*9880d681SAndroid Build Coastguard Worker                                    (SubReg_i16_lane imm:$lane)))>;
4421*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4i32 (int_arm_neon_vqadds
4422*9880d681SAndroid Build Coastguard Worker                     (v4i32 QPR:$src1),
4423*9880d681SAndroid Build Coastguard Worker                     (v4i32 (int_arm_neon_vqrdmulh
4424*9880d681SAndroid Build Coastguard Worker                              (v4i32 QPR:$src2),
4425*9880d681SAndroid Build Coastguard Worker                              (v4i32 (NEONvduplane (v4i32 QPR:$src3),
4426*9880d681SAndroid Build Coastguard Worker                                                   imm:$lane)))))),
4427*9880d681SAndroid Build Coastguard Worker            (v4i32 (VQRDMLAHslv4i32 (v4i32 QPR:$src1),
4428*9880d681SAndroid Build Coastguard Worker                                    (v4i32 QPR:$src2),
4429*9880d681SAndroid Build Coastguard Worker                                    (v2i32 (EXTRACT_SUBREG
4430*9880d681SAndroid Build Coastguard Worker                                             QPR:$src3,
4431*9880d681SAndroid Build Coastguard Worker                                             (DSubReg_i32_reg imm:$lane))),
4432*9880d681SAndroid Build Coastguard Worker                                    (SubReg_i32_lane imm:$lane)))>;
4433*9880d681SAndroid Build Coastguard Worker
4434*9880d681SAndroid Build Coastguard Worker  //   VQRDMLSH : Vector Saturating Rounding Doubling Multiply Subtract Long
4435*9880d681SAndroid Build Coastguard Worker  //              (Q -= D * D)
4436*9880d681SAndroid Build Coastguard Worker  defm VQRDMLSH : N3VInt3_HS<1, 0, 0b1100, 1, IIC_VMACi16D, IIC_VMACi32D,
4437*9880d681SAndroid Build Coastguard Worker                             IIC_VMACi16Q, IIC_VMACi32Q, "vqrdmlsh", "s",
4438*9880d681SAndroid Build Coastguard Worker                             null_frag>;
4439*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4i16 (int_arm_neon_vqsubs
4440*9880d681SAndroid Build Coastguard Worker                     (v4i16 DPR:$src1),
4441*9880d681SAndroid Build Coastguard Worker                     (v4i16 (int_arm_neon_vqrdmulh (v4i16 DPR:$Vn),
4442*9880d681SAndroid Build Coastguard Worker                                                   (v4i16 DPR:$Vm))))),
4443*9880d681SAndroid Build Coastguard Worker            (v4i16 (VQRDMLSHv4i16 DPR:$src1, DPR:$Vn, DPR:$Vm))>;
4444*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2i32 (int_arm_neon_vqsubs
4445*9880d681SAndroid Build Coastguard Worker                     (v2i32 DPR:$src1),
4446*9880d681SAndroid Build Coastguard Worker                     (v2i32 (int_arm_neon_vqrdmulh (v2i32 DPR:$Vn),
4447*9880d681SAndroid Build Coastguard Worker                                                   (v2i32 DPR:$Vm))))),
4448*9880d681SAndroid Build Coastguard Worker            (v2i32 (VQRDMLSHv2i32 DPR:$src1, DPR:$Vn, DPR:$Vm))>;
4449*9880d681SAndroid Build Coastguard Worker  def : Pat<(v8i16 (int_arm_neon_vqsubs
4450*9880d681SAndroid Build Coastguard Worker                     (v8i16 QPR:$src1),
4451*9880d681SAndroid Build Coastguard Worker                     (v8i16 (int_arm_neon_vqrdmulh (v8i16 QPR:$Vn),
4452*9880d681SAndroid Build Coastguard Worker                                                   (v8i16 QPR:$Vm))))),
4453*9880d681SAndroid Build Coastguard Worker            (v8i16 (VQRDMLSHv8i16 QPR:$src1, QPR:$Vn, QPR:$Vm))>;
4454*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4i32 (int_arm_neon_vqsubs
4455*9880d681SAndroid Build Coastguard Worker                     (v4i32 QPR:$src1),
4456*9880d681SAndroid Build Coastguard Worker                     (v4i32 (int_arm_neon_vqrdmulh (v4i32 QPR:$Vn),
4457*9880d681SAndroid Build Coastguard Worker                                                   (v4i32 QPR:$Vm))))),
4458*9880d681SAndroid Build Coastguard Worker            (v4i32 (VQRDMLSHv4i32 QPR:$src1, QPR:$Vn, QPR:$Vm))>;
4459*9880d681SAndroid Build Coastguard Worker
4460*9880d681SAndroid Build Coastguard Worker  defm VQRDMLSHsl : N3VMulOpSL_HS<0b1111, IIC_VMACi16D, IIC_VMACi32D,
4461*9880d681SAndroid Build Coastguard Worker                                  IIC_VMACi16Q, IIC_VMACi32Q, "vqrdmlsh", "s",
4462*9880d681SAndroid Build Coastguard Worker                                  null_frag>;
4463*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4i16 (int_arm_neon_vqsubs
4464*9880d681SAndroid Build Coastguard Worker                     (v4i16 DPR:$src1),
4465*9880d681SAndroid Build Coastguard Worker                     (v4i16 (int_arm_neon_vqrdmulh
4466*9880d681SAndroid Build Coastguard Worker                              (v4i16 DPR:$Vn),
4467*9880d681SAndroid Build Coastguard Worker                              (v4i16 (NEONvduplane (v4i16 DPR_8:$Vm),
4468*9880d681SAndroid Build Coastguard Worker                                                   imm:$lane)))))),
4469*9880d681SAndroid Build Coastguard Worker            (v4i16 (VQRDMLSHslv4i16 DPR:$src1, DPR:$Vn, DPR_8:$Vm, imm:$lane))>;
4470*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2i32 (int_arm_neon_vqsubs
4471*9880d681SAndroid Build Coastguard Worker                     (v2i32 DPR:$src1),
4472*9880d681SAndroid Build Coastguard Worker                     (v2i32 (int_arm_neon_vqrdmulh
4473*9880d681SAndroid Build Coastguard Worker                              (v2i32 DPR:$Vn),
4474*9880d681SAndroid Build Coastguard Worker                              (v2i32 (NEONvduplane (v2i32 DPR_VFP2:$Vm),
4475*9880d681SAndroid Build Coastguard Worker                                                   imm:$lane)))))),
4476*9880d681SAndroid Build Coastguard Worker            (v2i32 (VQRDMLSHslv2i32 DPR:$src1, DPR:$Vn, DPR_VFP2:$Vm,
4477*9880d681SAndroid Build Coastguard Worker                                    imm:$lane))>;
4478*9880d681SAndroid Build Coastguard Worker  def : Pat<(v8i16 (int_arm_neon_vqsubs
4479*9880d681SAndroid Build Coastguard Worker                     (v8i16 QPR:$src1),
4480*9880d681SAndroid Build Coastguard Worker                     (v8i16 (int_arm_neon_vqrdmulh
4481*9880d681SAndroid Build Coastguard Worker                              (v8i16 QPR:$src2),
4482*9880d681SAndroid Build Coastguard Worker                              (v8i16 (NEONvduplane (v8i16 QPR:$src3),
4483*9880d681SAndroid Build Coastguard Worker                                                   imm:$lane)))))),
4484*9880d681SAndroid Build Coastguard Worker            (v8i16 (VQRDMLSHslv8i16 (v8i16 QPR:$src1),
4485*9880d681SAndroid Build Coastguard Worker                                    (v8i16 QPR:$src2),
4486*9880d681SAndroid Build Coastguard Worker                                    (v4i16 (EXTRACT_SUBREG
4487*9880d681SAndroid Build Coastguard Worker                                             QPR:$src3,
4488*9880d681SAndroid Build Coastguard Worker                                             (DSubReg_i16_reg imm:$lane))),
4489*9880d681SAndroid Build Coastguard Worker                                    (SubReg_i16_lane imm:$lane)))>;
4490*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4i32 (int_arm_neon_vqsubs
4491*9880d681SAndroid Build Coastguard Worker                     (v4i32 QPR:$src1),
4492*9880d681SAndroid Build Coastguard Worker                     (v4i32 (int_arm_neon_vqrdmulh
4493*9880d681SAndroid Build Coastguard Worker                              (v4i32 QPR:$src2),
4494*9880d681SAndroid Build Coastguard Worker                              (v4i32 (NEONvduplane (v4i32 QPR:$src3),
4495*9880d681SAndroid Build Coastguard Worker                                                    imm:$lane)))))),
4496*9880d681SAndroid Build Coastguard Worker            (v4i32 (VQRDMLSHslv4i32 (v4i32 QPR:$src1),
4497*9880d681SAndroid Build Coastguard Worker                                    (v4i32 QPR:$src2),
4498*9880d681SAndroid Build Coastguard Worker                                    (v2i32 (EXTRACT_SUBREG
4499*9880d681SAndroid Build Coastguard Worker                                             QPR:$src3,
4500*9880d681SAndroid Build Coastguard Worker                                             (DSubReg_i32_reg imm:$lane))),
4501*9880d681SAndroid Build Coastguard Worker                                    (SubReg_i32_lane imm:$lane)))>;
4502*9880d681SAndroid Build Coastguard Worker}
4503*9880d681SAndroid Build Coastguard Worker//   VQDMLAL  : Vector Saturating Doubling Multiply Accumulate Long (Q += D * D)
4504*9880d681SAndroid Build Coastguard Workerdefm VQDMLAL  : N3VLInt3_HS<0, 1, 0b1001, 0, IIC_VMACi16D, IIC_VMACi32D,
4505*9880d681SAndroid Build Coastguard Worker                            "vqdmlal", "s", null_frag>;
4506*9880d681SAndroid Build Coastguard Workerdefm VQDMLALsl: N3VLInt3SL_HS<0, 0b0011, "vqdmlal", "s", null_frag>;
4507*9880d681SAndroid Build Coastguard Worker
4508*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i32 (int_arm_neon_vqadds (v4i32 QPR:$src1),
4509*9880d681SAndroid Build Coastguard Worker                     (v4i32 (int_arm_neon_vqdmull (v4i16 DPR:$Vn),
4510*9880d681SAndroid Build Coastguard Worker                                                  (v4i16 DPR:$Vm))))),
4511*9880d681SAndroid Build Coastguard Worker          (VQDMLALv4i32 QPR:$src1, DPR:$Vn, DPR:$Vm)>;
4512*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2i64 (int_arm_neon_vqadds (v2i64 QPR:$src1),
4513*9880d681SAndroid Build Coastguard Worker                     (v2i64 (int_arm_neon_vqdmull (v2i32 DPR:$Vn),
4514*9880d681SAndroid Build Coastguard Worker                                                  (v2i32 DPR:$Vm))))),
4515*9880d681SAndroid Build Coastguard Worker          (VQDMLALv2i64 QPR:$src1, DPR:$Vn, DPR:$Vm)>;
4516*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i32 (int_arm_neon_vqadds (v4i32 QPR:$src1),
4517*9880d681SAndroid Build Coastguard Worker                     (v4i32 (int_arm_neon_vqdmull (v4i16 DPR:$Vn),
4518*9880d681SAndroid Build Coastguard Worker                                (v4i16 (NEONvduplane (v4i16 DPR_8:$Vm),
4519*9880d681SAndroid Build Coastguard Worker                                                     imm:$lane)))))),
4520*9880d681SAndroid Build Coastguard Worker          (VQDMLALslv4i16 QPR:$src1, DPR:$Vn, DPR_8:$Vm, imm:$lane)>;
4521*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2i64 (int_arm_neon_vqadds (v2i64 QPR:$src1),
4522*9880d681SAndroid Build Coastguard Worker                     (v2i64 (int_arm_neon_vqdmull (v2i32 DPR:$Vn),
4523*9880d681SAndroid Build Coastguard Worker                                (v2i32 (NEONvduplane (v2i32 DPR_VFP2:$Vm),
4524*9880d681SAndroid Build Coastguard Worker                                                     imm:$lane)))))),
4525*9880d681SAndroid Build Coastguard Worker          (VQDMLALslv2i32 QPR:$src1, DPR:$Vn, DPR_VFP2:$Vm, imm:$lane)>;
4526*9880d681SAndroid Build Coastguard Worker
4527*9880d681SAndroid Build Coastguard Worker//   VMLS     : Vector Multiply Subtract (integer and floating-point)
4528*9880d681SAndroid Build Coastguard Workerdefm VMLS     : N3VMulOp_QHS<1, 0, 0b1001, 0, IIC_VMACi16D, IIC_VMACi32D,
4529*9880d681SAndroid Build Coastguard Worker                             IIC_VMACi16Q, IIC_VMACi32Q, "vmls", "i", sub>;
4530*9880d681SAndroid Build Coastguard Workerdef  VMLSfd   : N3VDMulOp<0, 0, 0b10, 0b1101, 1, IIC_VMACD, "vmls", "f32",
4531*9880d681SAndroid Build Coastguard Worker                          v2f32, fmul_su, fsub_mlx>,
4532*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, UseFPVMLx, DontUseFusedMAC]>;
4533*9880d681SAndroid Build Coastguard Workerdef  VMLSfq   : N3VQMulOp<0, 0, 0b10, 0b1101, 1, IIC_VMACQ, "vmls", "f32",
4534*9880d681SAndroid Build Coastguard Worker                          v4f32, fmul_su, fsub_mlx>,
4535*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, UseFPVMLx, DontUseFusedMAC]>;
4536*9880d681SAndroid Build Coastguard Workerdef  VMLShd   : N3VDMulOp<0, 0, 0b11, 0b1101, 1, IIC_VMACD, "vmls", "f16",
4537*9880d681SAndroid Build Coastguard Worker                          v4f16, fmul, fsub>,
4538*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16, UseFPVMLx, DontUseFusedMAC]>;
4539*9880d681SAndroid Build Coastguard Workerdef  VMLShq   : N3VQMulOp<0, 0, 0b11, 0b1101, 1, IIC_VMACQ, "vmls", "f16",
4540*9880d681SAndroid Build Coastguard Worker                          v8f16, fmul, fsub>,
4541*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16, UseFPVMLx, DontUseFusedMAC]>;
4542*9880d681SAndroid Build Coastguard Workerdefm VMLSsl   : N3VMulOpSL_HS<0b0100, IIC_VMACi16D, IIC_VMACi32D,
4543*9880d681SAndroid Build Coastguard Worker                              IIC_VMACi16Q, IIC_VMACi32Q, "vmls", "i", sub>;
4544*9880d681SAndroid Build Coastguard Workerdef  VMLSslfd : N3VDMulOpSL<0b10, 0b0101, IIC_VMACD, "vmls", "f32",
4545*9880d681SAndroid Build Coastguard Worker                            v2f32, fmul_su, fsub_mlx>,
4546*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, UseFPVMLx]>;
4547*9880d681SAndroid Build Coastguard Workerdef  VMLSslfq : N3VQMulOpSL<0b10, 0b0101, IIC_VMACQ, "vmls", "f32",
4548*9880d681SAndroid Build Coastguard Worker                            v4f32, v2f32, fmul_su, fsub_mlx>,
4549*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, UseFPVMLx]>;
4550*9880d681SAndroid Build Coastguard Workerdef  VMLSslhd : N3VDMulOpSL16<0b01, 0b0101, IIC_VMACD, "vmls", "f16",
4551*9880d681SAndroid Build Coastguard Worker                            v4f16, fmul, fsub>,
4552*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16, UseFPVMLx]>;
4553*9880d681SAndroid Build Coastguard Workerdef  VMLSslhq : N3VQMulOpSL16<0b01, 0b0101, IIC_VMACQ, "vmls", "f16",
4554*9880d681SAndroid Build Coastguard Worker                            v8f16, v4f16, fmul, fsub>,
4555*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16, UseFPVMLx]>;
4556*9880d681SAndroid Build Coastguard Worker
4557*9880d681SAndroid Build Coastguard Workerdef : Pat<(v8i16 (sub (v8i16 QPR:$src1),
4558*9880d681SAndroid Build Coastguard Worker                  (mul (v8i16 QPR:$src2),
4559*9880d681SAndroid Build Coastguard Worker                       (v8i16 (NEONvduplane (v8i16 QPR:$src3), imm:$lane))))),
4560*9880d681SAndroid Build Coastguard Worker          (v8i16 (VMLSslv8i16 (v8i16 QPR:$src1), (v8i16 QPR:$src2),
4561*9880d681SAndroid Build Coastguard Worker                              (v4i16 (EXTRACT_SUBREG QPR:$src3,
4562*9880d681SAndroid Build Coastguard Worker                                      (DSubReg_i16_reg imm:$lane))),
4563*9880d681SAndroid Build Coastguard Worker                              (SubReg_i16_lane imm:$lane)))>;
4564*9880d681SAndroid Build Coastguard Worker
4565*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i32 (sub (v4i32 QPR:$src1),
4566*9880d681SAndroid Build Coastguard Worker                  (mul (v4i32 QPR:$src2),
4567*9880d681SAndroid Build Coastguard Worker                     (v4i32 (NEONvduplane (v4i32 QPR:$src3), imm:$lane))))),
4568*9880d681SAndroid Build Coastguard Worker          (v4i32 (VMLSslv4i32 (v4i32 QPR:$src1), (v4i32 QPR:$src2),
4569*9880d681SAndroid Build Coastguard Worker                              (v2i32 (EXTRACT_SUBREG QPR:$src3,
4570*9880d681SAndroid Build Coastguard Worker                                      (DSubReg_i32_reg imm:$lane))),
4571*9880d681SAndroid Build Coastguard Worker                              (SubReg_i32_lane imm:$lane)))>;
4572*9880d681SAndroid Build Coastguard Worker
4573*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4f32 (fsub_mlx (v4f32 QPR:$src1),
4574*9880d681SAndroid Build Coastguard Worker                  (fmul_su (v4f32 QPR:$src2),
4575*9880d681SAndroid Build Coastguard Worker                        (v4f32 (NEONvduplane (v4f32 QPR:$src3), imm:$lane))))),
4576*9880d681SAndroid Build Coastguard Worker          (v4f32 (VMLSslfq (v4f32 QPR:$src1), (v4f32 QPR:$src2),
4577*9880d681SAndroid Build Coastguard Worker                           (v2f32 (EXTRACT_SUBREG QPR:$src3,
4578*9880d681SAndroid Build Coastguard Worker                                   (DSubReg_i32_reg imm:$lane))),
4579*9880d681SAndroid Build Coastguard Worker                           (SubReg_i32_lane imm:$lane)))>,
4580*9880d681SAndroid Build Coastguard Worker          Requires<[HasNEON, UseFPVMLx]>;
4581*9880d681SAndroid Build Coastguard Worker
4582*9880d681SAndroid Build Coastguard Worker//   VMLSL    : Vector Multiply Subtract Long (Q -= D * D)
4583*9880d681SAndroid Build Coastguard Workerdefm VMLSLs   : N3VLMulOp_QHS<0,1,0b1010,0, IIC_VMACi16D, IIC_VMACi32D,
4584*9880d681SAndroid Build Coastguard Worker                              "vmlsl", "s", NEONvmulls, sub>;
4585*9880d681SAndroid Build Coastguard Workerdefm VMLSLu   : N3VLMulOp_QHS<1,1,0b1010,0, IIC_VMACi16D, IIC_VMACi32D,
4586*9880d681SAndroid Build Coastguard Worker                              "vmlsl", "u", NEONvmullu, sub>;
4587*9880d681SAndroid Build Coastguard Worker
4588*9880d681SAndroid Build Coastguard Workerdefm VMLSLsls : N3VLMulOpSL_HS<0, 0b0110, "vmlsl", "s", NEONvmulls, sub>;
4589*9880d681SAndroid Build Coastguard Workerdefm VMLSLslu : N3VLMulOpSL_HS<1, 0b0110, "vmlsl", "u", NEONvmullu, sub>;
4590*9880d681SAndroid Build Coastguard Worker
4591*9880d681SAndroid Build Coastguard Worker//   VQDMLSL  : Vector Saturating Doubling Multiply Subtract Long (Q -= D * D)
4592*9880d681SAndroid Build Coastguard Workerdefm VQDMLSL  : N3VLInt3_HS<0, 1, 0b1011, 0, IIC_VMACi16D, IIC_VMACi32D,
4593*9880d681SAndroid Build Coastguard Worker                            "vqdmlsl", "s", null_frag>;
4594*9880d681SAndroid Build Coastguard Workerdefm VQDMLSLsl: N3VLInt3SL_HS<0, 0b0111, "vqdmlsl", "s", null_frag>;
4595*9880d681SAndroid Build Coastguard Worker
4596*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i32 (int_arm_neon_vqsubs (v4i32 QPR:$src1),
4597*9880d681SAndroid Build Coastguard Worker                     (v4i32 (int_arm_neon_vqdmull (v4i16 DPR:$Vn),
4598*9880d681SAndroid Build Coastguard Worker                                                  (v4i16 DPR:$Vm))))),
4599*9880d681SAndroid Build Coastguard Worker          (VQDMLSLv4i32 QPR:$src1, DPR:$Vn, DPR:$Vm)>;
4600*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2i64 (int_arm_neon_vqsubs (v2i64 QPR:$src1),
4601*9880d681SAndroid Build Coastguard Worker                     (v2i64 (int_arm_neon_vqdmull (v2i32 DPR:$Vn),
4602*9880d681SAndroid Build Coastguard Worker                                                  (v2i32 DPR:$Vm))))),
4603*9880d681SAndroid Build Coastguard Worker          (VQDMLSLv2i64 QPR:$src1, DPR:$Vn, DPR:$Vm)>;
4604*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i32 (int_arm_neon_vqsubs (v4i32 QPR:$src1),
4605*9880d681SAndroid Build Coastguard Worker                     (v4i32 (int_arm_neon_vqdmull (v4i16 DPR:$Vn),
4606*9880d681SAndroid Build Coastguard Worker                                (v4i16 (NEONvduplane (v4i16 DPR_8:$Vm),
4607*9880d681SAndroid Build Coastguard Worker                                                     imm:$lane)))))),
4608*9880d681SAndroid Build Coastguard Worker          (VQDMLSLslv4i16 QPR:$src1, DPR:$Vn, DPR_8:$Vm, imm:$lane)>;
4609*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2i64 (int_arm_neon_vqsubs (v2i64 QPR:$src1),
4610*9880d681SAndroid Build Coastguard Worker                     (v2i64 (int_arm_neon_vqdmull (v2i32 DPR:$Vn),
4611*9880d681SAndroid Build Coastguard Worker                                (v2i32 (NEONvduplane (v2i32 DPR_VFP2:$Vm),
4612*9880d681SAndroid Build Coastguard Worker                                                     imm:$lane)))))),
4613*9880d681SAndroid Build Coastguard Worker          (VQDMLSLslv2i32 QPR:$src1, DPR:$Vn, DPR_VFP2:$Vm, imm:$lane)>;
4614*9880d681SAndroid Build Coastguard Worker
4615*9880d681SAndroid Build Coastguard Worker// Fused Vector Multiply-Accumulate and Fused Multiply-Subtract Operations.
4616*9880d681SAndroid Build Coastguard Workerdef  VFMAfd   : N3VDMulOp<0, 0, 0b00, 0b1100, 1, IIC_VFMACD, "vfma", "f32",
4617*9880d681SAndroid Build Coastguard Worker                          v2f32, fmul_su, fadd_mlx>,
4618*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON,HasVFP4,UseFusedMAC]>;
4619*9880d681SAndroid Build Coastguard Worker
4620*9880d681SAndroid Build Coastguard Workerdef  VFMAfq   : N3VQMulOp<0, 0, 0b00, 0b1100, 1, IIC_VFMACQ, "vfma", "f32",
4621*9880d681SAndroid Build Coastguard Worker                          v4f32, fmul_su, fadd_mlx>,
4622*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON,HasVFP4,UseFusedMAC]>;
4623*9880d681SAndroid Build Coastguard Workerdef  VFMAhd   : N3VDMulOp<0, 0, 0b01, 0b1100, 1, IIC_VFMACD, "vfma", "f16",
4624*9880d681SAndroid Build Coastguard Worker                          v4f16, fmul, fadd>,
4625*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON,HasFullFP16,UseFusedMAC]>;
4626*9880d681SAndroid Build Coastguard Worker
4627*9880d681SAndroid Build Coastguard Workerdef  VFMAhq   : N3VQMulOp<0, 0, 0b01, 0b1100, 1, IIC_VFMACQ, "vfma", "f16",
4628*9880d681SAndroid Build Coastguard Worker                          v8f16, fmul, fadd>,
4629*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON,HasFullFP16,UseFusedMAC]>;
4630*9880d681SAndroid Build Coastguard Worker
4631*9880d681SAndroid Build Coastguard Worker//   Fused Vector Multiply Subtract (floating-point)
4632*9880d681SAndroid Build Coastguard Workerdef  VFMSfd   : N3VDMulOp<0, 0, 0b10, 0b1100, 1, IIC_VFMACD, "vfms", "f32",
4633*9880d681SAndroid Build Coastguard Worker                          v2f32, fmul_su, fsub_mlx>,
4634*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON,HasVFP4,UseFusedMAC]>;
4635*9880d681SAndroid Build Coastguard Workerdef  VFMSfq   : N3VQMulOp<0, 0, 0b10, 0b1100, 1, IIC_VFMACQ, "vfms", "f32",
4636*9880d681SAndroid Build Coastguard Worker                          v4f32, fmul_su, fsub_mlx>,
4637*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON,HasVFP4,UseFusedMAC]>;
4638*9880d681SAndroid Build Coastguard Workerdef  VFMShd   : N3VDMulOp<0, 0, 0b11, 0b1100, 1, IIC_VFMACD, "vfms", "f16",
4639*9880d681SAndroid Build Coastguard Worker                          v4f16, fmul, fsub>,
4640*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON,HasFullFP16,UseFusedMAC]>;
4641*9880d681SAndroid Build Coastguard Workerdef  VFMShq   : N3VQMulOp<0, 0, 0b11, 0b1100, 1, IIC_VFMACQ, "vfms", "f16",
4642*9880d681SAndroid Build Coastguard Worker                          v8f16, fmul, fsub>,
4643*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON,HasFullFP16,UseFusedMAC]>;
4644*9880d681SAndroid Build Coastguard Worker
4645*9880d681SAndroid Build Coastguard Worker// Match @llvm.fma.* intrinsics
4646*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2f32 (fma DPR:$Vn, DPR:$Vm, DPR:$src1)),
4647*9880d681SAndroid Build Coastguard Worker          (VFMAfd DPR:$src1, DPR:$Vn, DPR:$Vm)>,
4648*9880d681SAndroid Build Coastguard Worker          Requires<[HasVFP4]>;
4649*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4f32 (fma QPR:$Vn, QPR:$Vm, QPR:$src1)),
4650*9880d681SAndroid Build Coastguard Worker          (VFMAfq QPR:$src1, QPR:$Vn, QPR:$Vm)>,
4651*9880d681SAndroid Build Coastguard Worker          Requires<[HasVFP4]>;
4652*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2f32 (fma (fneg DPR:$Vn), DPR:$Vm, DPR:$src1)),
4653*9880d681SAndroid Build Coastguard Worker          (VFMSfd DPR:$src1, DPR:$Vn, DPR:$Vm)>,
4654*9880d681SAndroid Build Coastguard Worker      Requires<[HasVFP4]>;
4655*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4f32 (fma (fneg QPR:$Vn), QPR:$Vm, QPR:$src1)),
4656*9880d681SAndroid Build Coastguard Worker          (VFMSfq QPR:$src1, QPR:$Vn, QPR:$Vm)>,
4657*9880d681SAndroid Build Coastguard Worker      Requires<[HasVFP4]>;
4658*9880d681SAndroid Build Coastguard Worker
4659*9880d681SAndroid Build Coastguard Worker// Vector Subtract Operations.
4660*9880d681SAndroid Build Coastguard Worker
4661*9880d681SAndroid Build Coastguard Worker//   VSUB     : Vector Subtract (integer and floating-point)
4662*9880d681SAndroid Build Coastguard Workerdefm VSUB     : N3V_QHSD<1, 0, 0b1000, 0, IIC_VSUBiD, IIC_VSUBiQ,
4663*9880d681SAndroid Build Coastguard Worker                         "vsub", "i", sub, 0>;
4664*9880d681SAndroid Build Coastguard Workerdef  VSUBfd   : N3VD<0, 0, 0b10, 0b1101, 0, IIC_VBIND, "vsub", "f32",
4665*9880d681SAndroid Build Coastguard Worker                     v2f32, v2f32, fsub, 0>;
4666*9880d681SAndroid Build Coastguard Workerdef  VSUBfq   : N3VQ<0, 0, 0b10, 0b1101, 0, IIC_VBINQ, "vsub", "f32",
4667*9880d681SAndroid Build Coastguard Worker                     v4f32, v4f32, fsub, 0>;
4668*9880d681SAndroid Build Coastguard Workerdef  VSUBhd   : N3VD<0, 0, 0b11, 0b1101, 0, IIC_VBIND, "vsub", "f16",
4669*9880d681SAndroid Build Coastguard Worker                     v4f16, v4f16, fsub, 0>,
4670*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON,HasFullFP16]>;
4671*9880d681SAndroid Build Coastguard Workerdef  VSUBhq   : N3VQ<0, 0, 0b11, 0b1101, 0, IIC_VBINQ, "vsub", "f16",
4672*9880d681SAndroid Build Coastguard Worker                     v8f16, v8f16, fsub, 0>,
4673*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON,HasFullFP16]>;
4674*9880d681SAndroid Build Coastguard Worker//   VSUBL    : Vector Subtract Long (Q = D - D)
4675*9880d681SAndroid Build Coastguard Workerdefm VSUBLs   : N3VLExt_QHS<0,1,0b0010,0, IIC_VSHLiD, IIC_VSHLiD,
4676*9880d681SAndroid Build Coastguard Worker                            "vsubl", "s", sub, sext, 0>;
4677*9880d681SAndroid Build Coastguard Workerdefm VSUBLu   : N3VLExt_QHS<1,1,0b0010,0, IIC_VSHLiD, IIC_VSHLiD,
4678*9880d681SAndroid Build Coastguard Worker                            "vsubl", "u", sub, zext, 0>;
4679*9880d681SAndroid Build Coastguard Worker//   VSUBW    : Vector Subtract Wide (Q = Q - D)
4680*9880d681SAndroid Build Coastguard Workerdefm VSUBWs   : N3VW_QHS<0,1,0b0011,0, "vsubw", "s", sub, sext, 0>;
4681*9880d681SAndroid Build Coastguard Workerdefm VSUBWu   : N3VW_QHS<1,1,0b0011,0, "vsubw", "u", sub, zext, 0>;
4682*9880d681SAndroid Build Coastguard Worker//   VHSUB    : Vector Halving Subtract
4683*9880d681SAndroid Build Coastguard Workerdefm VHSUBs   : N3VInt_QHS<0, 0, 0b0010, 0, N3RegFrm,
4684*9880d681SAndroid Build Coastguard Worker                           IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q,
4685*9880d681SAndroid Build Coastguard Worker                           "vhsub", "s", int_arm_neon_vhsubs, 0>;
4686*9880d681SAndroid Build Coastguard Workerdefm VHSUBu   : N3VInt_QHS<1, 0, 0b0010, 0, N3RegFrm,
4687*9880d681SAndroid Build Coastguard Worker                           IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q,
4688*9880d681SAndroid Build Coastguard Worker                           "vhsub", "u", int_arm_neon_vhsubu, 0>;
4689*9880d681SAndroid Build Coastguard Worker//   VQSUB    : Vector Saturing Subtract
4690*9880d681SAndroid Build Coastguard Workerdefm VQSUBs   : N3VInt_QHSD<0, 0, 0b0010, 1, N3RegFrm,
4691*9880d681SAndroid Build Coastguard Worker                            IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q,
4692*9880d681SAndroid Build Coastguard Worker                            "vqsub", "s", int_arm_neon_vqsubs, 0>;
4693*9880d681SAndroid Build Coastguard Workerdefm VQSUBu   : N3VInt_QHSD<1, 0, 0b0010, 1, N3RegFrm,
4694*9880d681SAndroid Build Coastguard Worker                            IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q,
4695*9880d681SAndroid Build Coastguard Worker                            "vqsub", "u", int_arm_neon_vqsubu, 0>;
4696*9880d681SAndroid Build Coastguard Worker//   VSUBHN   : Vector Subtract and Narrow Returning High Half (D = Q - Q)
4697*9880d681SAndroid Build Coastguard Workerdefm VSUBHN   : N3VNInt_HSD<0,1,0b0110,0, "vsubhn", "i", null_frag, 0>;
4698*9880d681SAndroid Build Coastguard Worker//   VRSUBHN  : Vector Rounding Subtract and Narrow Returning High Half (D=Q-Q)
4699*9880d681SAndroid Build Coastguard Workerdefm VRSUBHN  : N3VNInt_HSD<1,1,0b0110,0, "vrsubhn", "i",
4700*9880d681SAndroid Build Coastguard Worker                            int_arm_neon_vrsubhn, 0>;
4701*9880d681SAndroid Build Coastguard Worker
4702*9880d681SAndroid Build Coastguard Workerdef : Pat<(v8i8  (trunc (NEONvshru (sub (v8i16 QPR:$Vn), QPR:$Vm), 8))),
4703*9880d681SAndroid Build Coastguard Worker          (VSUBHNv8i8 QPR:$Vn, QPR:$Vm)>;
4704*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i16 (trunc (NEONvshru (sub (v4i32 QPR:$Vn), QPR:$Vm), 16))),
4705*9880d681SAndroid Build Coastguard Worker          (VSUBHNv4i16 QPR:$Vn, QPR:$Vm)>;
4706*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2i32 (trunc (NEONvshru (sub (v2i64 QPR:$Vn), QPR:$Vm), 32))),
4707*9880d681SAndroid Build Coastguard Worker          (VSUBHNv2i32 QPR:$Vn, QPR:$Vm)>;
4708*9880d681SAndroid Build Coastguard Worker
4709*9880d681SAndroid Build Coastguard Worker// Vector Comparisons.
4710*9880d681SAndroid Build Coastguard Worker
4711*9880d681SAndroid Build Coastguard Worker//   VCEQ     : Vector Compare Equal
4712*9880d681SAndroid Build Coastguard Workerdefm VCEQ     : N3V_QHS<1, 0, 0b1000, 1, IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q,
4713*9880d681SAndroid Build Coastguard Worker                        IIC_VSUBi4Q, "vceq", "i", NEONvceq, 1>;
4714*9880d681SAndroid Build Coastguard Workerdef  VCEQfd   : N3VD<0,0,0b00,0b1110,0, IIC_VBIND, "vceq", "f32", v2i32, v2f32,
4715*9880d681SAndroid Build Coastguard Worker                     NEONvceq, 1>;
4716*9880d681SAndroid Build Coastguard Workerdef  VCEQfq   : N3VQ<0,0,0b00,0b1110,0, IIC_VBINQ, "vceq", "f32", v4i32, v4f32,
4717*9880d681SAndroid Build Coastguard Worker                     NEONvceq, 1>;
4718*9880d681SAndroid Build Coastguard Workerdef  VCEQhd   : N3VD<0,0,0b01,0b1110,0, IIC_VBIND, "vceq", "f16", v4i16, v4f16,
4719*9880d681SAndroid Build Coastguard Worker                     NEONvceq, 1>,
4720*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
4721*9880d681SAndroid Build Coastguard Workerdef  VCEQhq   : N3VQ<0,0,0b01,0b1110,0, IIC_VBINQ, "vceq", "f16", v8i16, v8f16,
4722*9880d681SAndroid Build Coastguard Worker                     NEONvceq, 1>,
4723*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
4724*9880d681SAndroid Build Coastguard Worker
4725*9880d681SAndroid Build Coastguard Workerlet TwoOperandAliasConstraint = "$Vm = $Vd" in
4726*9880d681SAndroid Build Coastguard Workerdefm VCEQz    : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00010, 0, "vceq", "i",
4727*9880d681SAndroid Build Coastguard Worker                            "$Vd, $Vm, #0", NEONvceqz>;
4728*9880d681SAndroid Build Coastguard Worker
4729*9880d681SAndroid Build Coastguard Worker//   VCGE     : Vector Compare Greater Than or Equal
4730*9880d681SAndroid Build Coastguard Workerdefm VCGEs    : N3V_QHS<0, 0, 0b0011, 1, IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q,
4731*9880d681SAndroid Build Coastguard Worker                        IIC_VSUBi4Q, "vcge", "s", NEONvcge, 0>;
4732*9880d681SAndroid Build Coastguard Workerdefm VCGEu    : N3V_QHS<1, 0, 0b0011, 1, IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q,
4733*9880d681SAndroid Build Coastguard Worker                        IIC_VSUBi4Q, "vcge", "u", NEONvcgeu, 0>;
4734*9880d681SAndroid Build Coastguard Workerdef  VCGEfd   : N3VD<1,0,0b00,0b1110,0, IIC_VBIND, "vcge", "f32", v2i32, v2f32,
4735*9880d681SAndroid Build Coastguard Worker                     NEONvcge, 0>;
4736*9880d681SAndroid Build Coastguard Workerdef  VCGEfq   : N3VQ<1,0,0b00,0b1110,0, IIC_VBINQ, "vcge", "f32", v4i32, v4f32,
4737*9880d681SAndroid Build Coastguard Worker                     NEONvcge, 0>;
4738*9880d681SAndroid Build Coastguard Workerdef  VCGEhd   : N3VD<1,0,0b01,0b1110,0, IIC_VBIND, "vcge", "f16", v4i16, v4f16,
4739*9880d681SAndroid Build Coastguard Worker                     NEONvcge, 0>,
4740*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
4741*9880d681SAndroid Build Coastguard Workerdef  VCGEhq   : N3VQ<1,0,0b01,0b1110,0, IIC_VBINQ, "vcge", "f16", v8i16, v8f16,
4742*9880d681SAndroid Build Coastguard Worker                     NEONvcge, 0>,
4743*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
4744*9880d681SAndroid Build Coastguard Worker
4745*9880d681SAndroid Build Coastguard Workerlet TwoOperandAliasConstraint = "$Vm = $Vd" in {
4746*9880d681SAndroid Build Coastguard Workerdefm VCGEz    : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00001, 0, "vcge", "s",
4747*9880d681SAndroid Build Coastguard Worker                            "$Vd, $Vm, #0", NEONvcgez>;
4748*9880d681SAndroid Build Coastguard Workerdefm VCLEz    : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00011, 0, "vcle", "s",
4749*9880d681SAndroid Build Coastguard Worker                            "$Vd, $Vm, #0", NEONvclez>;
4750*9880d681SAndroid Build Coastguard Worker}
4751*9880d681SAndroid Build Coastguard Worker
4752*9880d681SAndroid Build Coastguard Worker//   VCGT     : Vector Compare Greater Than
4753*9880d681SAndroid Build Coastguard Workerdefm VCGTs    : N3V_QHS<0, 0, 0b0011, 0, IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q,
4754*9880d681SAndroid Build Coastguard Worker                        IIC_VSUBi4Q, "vcgt", "s", NEONvcgt, 0>;
4755*9880d681SAndroid Build Coastguard Workerdefm VCGTu    : N3V_QHS<1, 0, 0b0011, 0, IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q,
4756*9880d681SAndroid Build Coastguard Worker                        IIC_VSUBi4Q, "vcgt", "u", NEONvcgtu, 0>;
4757*9880d681SAndroid Build Coastguard Workerdef  VCGTfd   : N3VD<1,0,0b10,0b1110,0, IIC_VBIND, "vcgt", "f32", v2i32, v2f32,
4758*9880d681SAndroid Build Coastguard Worker                     NEONvcgt, 0>;
4759*9880d681SAndroid Build Coastguard Workerdef  VCGTfq   : N3VQ<1,0,0b10,0b1110,0, IIC_VBINQ, "vcgt", "f32", v4i32, v4f32,
4760*9880d681SAndroid Build Coastguard Worker                     NEONvcgt, 0>;
4761*9880d681SAndroid Build Coastguard Workerdef  VCGThd   : N3VD<1,0,0b11,0b1110,0, IIC_VBIND, "vcgt", "f16", v4i16, v4f16,
4762*9880d681SAndroid Build Coastguard Worker                     NEONvcgt, 0>,
4763*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
4764*9880d681SAndroid Build Coastguard Workerdef  VCGThq   : N3VQ<1,0,0b11,0b1110,0, IIC_VBINQ, "vcgt", "f16", v8i16, v8f16,
4765*9880d681SAndroid Build Coastguard Worker                     NEONvcgt, 0>,
4766*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
4767*9880d681SAndroid Build Coastguard Worker
4768*9880d681SAndroid Build Coastguard Workerlet TwoOperandAliasConstraint = "$Vm = $Vd" in {
4769*9880d681SAndroid Build Coastguard Workerdefm VCGTz    : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00000, 0, "vcgt", "s",
4770*9880d681SAndroid Build Coastguard Worker                            "$Vd, $Vm, #0", NEONvcgtz>;
4771*9880d681SAndroid Build Coastguard Workerdefm VCLTz    : N2V_QHS_cmp<0b11, 0b11, 0b01, 0b00100, 0, "vclt", "s",
4772*9880d681SAndroid Build Coastguard Worker                            "$Vd, $Vm, #0", NEONvcltz>;
4773*9880d681SAndroid Build Coastguard Worker}
4774*9880d681SAndroid Build Coastguard Worker
4775*9880d681SAndroid Build Coastguard Worker//   VACGE    : Vector Absolute Compare Greater Than or Equal (aka VCAGE)
4776*9880d681SAndroid Build Coastguard Workerdef  VACGEfd   : N3VDInt<1, 0, 0b00, 0b1110, 1, N3RegFrm, IIC_VBIND, "vacge",
4777*9880d681SAndroid Build Coastguard Worker                        "f32", v2i32, v2f32, int_arm_neon_vacge, 0>;
4778*9880d681SAndroid Build Coastguard Workerdef  VACGEfq   : N3VQInt<1, 0, 0b00, 0b1110, 1, N3RegFrm, IIC_VBINQ, "vacge",
4779*9880d681SAndroid Build Coastguard Worker                        "f32", v4i32, v4f32, int_arm_neon_vacge, 0>;
4780*9880d681SAndroid Build Coastguard Workerdef  VACGEhd   : N3VDInt<1, 0, 0b01, 0b1110, 1, N3RegFrm, IIC_VBIND, "vacge",
4781*9880d681SAndroid Build Coastguard Worker                        "f16", v4i16, v4f16, int_arm_neon_vacge, 0>,
4782*9880d681SAndroid Build Coastguard Worker                 Requires<[HasNEON, HasFullFP16]>;
4783*9880d681SAndroid Build Coastguard Workerdef  VACGEhq   : N3VQInt<1, 0, 0b01, 0b1110, 1, N3RegFrm, IIC_VBINQ, "vacge",
4784*9880d681SAndroid Build Coastguard Worker                        "f16", v8i16, v8f16, int_arm_neon_vacge, 0>,
4785*9880d681SAndroid Build Coastguard Worker                 Requires<[HasNEON, HasFullFP16]>;
4786*9880d681SAndroid Build Coastguard Worker//   VACGT    : Vector Absolute Compare Greater Than (aka VCAGT)
4787*9880d681SAndroid Build Coastguard Workerdef  VACGTfd   : N3VDInt<1, 0, 0b10, 0b1110, 1, N3RegFrm, IIC_VBIND, "vacgt",
4788*9880d681SAndroid Build Coastguard Worker                        "f32", v2i32, v2f32, int_arm_neon_vacgt, 0>;
4789*9880d681SAndroid Build Coastguard Workerdef  VACGTfq   : N3VQInt<1, 0, 0b10, 0b1110, 1, N3RegFrm, IIC_VBINQ, "vacgt",
4790*9880d681SAndroid Build Coastguard Worker                        "f32", v4i32, v4f32, int_arm_neon_vacgt, 0>;
4791*9880d681SAndroid Build Coastguard Workerdef  VACGThd   : N3VDInt<1, 0, 0b11, 0b1110, 1, N3RegFrm, IIC_VBIND, "vacgt",
4792*9880d681SAndroid Build Coastguard Worker                        "f16", v4i16, v4f16, int_arm_neon_vacgt, 0>,
4793*9880d681SAndroid Build Coastguard Worker                 Requires<[HasNEON, HasFullFP16]>;
4794*9880d681SAndroid Build Coastguard Workerdef  VACGThq   : N3VQInt<1, 0, 0b11, 0b1110, 1, N3RegFrm, IIC_VBINQ, "vacgt",
4795*9880d681SAndroid Build Coastguard Worker                        "f16", v8f16, v8f16, int_arm_neon_vacgt, 0>,
4796*9880d681SAndroid Build Coastguard Worker                 Requires<[HasNEON, HasFullFP16]>;
4797*9880d681SAndroid Build Coastguard Worker//   VTST     : Vector Test Bits
4798*9880d681SAndroid Build Coastguard Workerdefm VTST     : N3V_QHS<0, 0, 0b1000, 1, IIC_VBINi4D, IIC_VBINi4D, IIC_VBINi4Q,
4799*9880d681SAndroid Build Coastguard Worker                        IIC_VBINi4Q, "vtst", "", NEONvtst, 1>;
4800*9880d681SAndroid Build Coastguard Worker
4801*9880d681SAndroid Build Coastguard Workerdef: NEONInstAlias<"vaclt${p}.f32 $Vd, $Vn, $Vm",
4802*9880d681SAndroid Build Coastguard Worker                   (VACGTfd DPR:$Vd, DPR:$Vm, DPR:$Vn, pred:$p)>;
4803*9880d681SAndroid Build Coastguard Workerdef: NEONInstAlias<"vaclt${p}.f32 $Vd, $Vn, $Vm",
4804*9880d681SAndroid Build Coastguard Worker                   (VACGTfq QPR:$Vd, QPR:$Vm, QPR:$Vn, pred:$p)>;
4805*9880d681SAndroid Build Coastguard Workerdef: NEONInstAlias<"vacle${p}.f32 $Vd, $Vn, $Vm",
4806*9880d681SAndroid Build Coastguard Worker                   (VACGEfd DPR:$Vd, DPR:$Vm, DPR:$Vn, pred:$p)>;
4807*9880d681SAndroid Build Coastguard Workerdef: NEONInstAlias<"vacle${p}.f32 $Vd, $Vn, $Vm",
4808*9880d681SAndroid Build Coastguard Worker                   (VACGEfq QPR:$Vd, QPR:$Vm, QPR:$Vn, pred:$p)>;
4809*9880d681SAndroid Build Coastguard Workerlet Predicates = [HasNEON, HasFullFP16] in {
4810*9880d681SAndroid Build Coastguard Workerdef: NEONInstAlias<"vaclt${p}.f16 $Vd, $Vn, $Vm",
4811*9880d681SAndroid Build Coastguard Worker                   (VACGThd DPR:$Vd, DPR:$Vm, DPR:$Vn, pred:$p)>;
4812*9880d681SAndroid Build Coastguard Workerdef: NEONInstAlias<"vaclt${p}.f16 $Vd, $Vn, $Vm",
4813*9880d681SAndroid Build Coastguard Worker                   (VACGThq QPR:$Vd, QPR:$Vm, QPR:$Vn, pred:$p)>;
4814*9880d681SAndroid Build Coastguard Workerdef: NEONInstAlias<"vacle${p}.f16 $Vd, $Vn, $Vm",
4815*9880d681SAndroid Build Coastguard Worker                   (VACGEhd DPR:$Vd, DPR:$Vm, DPR:$Vn, pred:$p)>;
4816*9880d681SAndroid Build Coastguard Workerdef: NEONInstAlias<"vacle${p}.f16 $Vd, $Vn, $Vm",
4817*9880d681SAndroid Build Coastguard Worker                   (VACGEhq QPR:$Vd, QPR:$Vm, QPR:$Vn, pred:$p)>;
4818*9880d681SAndroid Build Coastguard Worker}
4819*9880d681SAndroid Build Coastguard Worker
4820*9880d681SAndroid Build Coastguard Workerdef: NEONInstAlias<"vaclt${p}.f32 $Vd, $Vm",
4821*9880d681SAndroid Build Coastguard Worker                   (VACGTfd DPR:$Vd, DPR:$Vm, DPR:$Vd, pred:$p)>;
4822*9880d681SAndroid Build Coastguard Workerdef: NEONInstAlias<"vaclt${p}.f32 $Vd, $Vm",
4823*9880d681SAndroid Build Coastguard Worker                   (VACGTfq QPR:$Vd, QPR:$Vm, QPR:$Vd, pred:$p)>;
4824*9880d681SAndroid Build Coastguard Workerdef: NEONInstAlias<"vacle${p}.f32 $Vd, $Vm",
4825*9880d681SAndroid Build Coastguard Worker                   (VACGEfd DPR:$Vd, DPR:$Vm, DPR:$Vd, pred:$p)>;
4826*9880d681SAndroid Build Coastguard Workerdef: NEONInstAlias<"vacle${p}.f32 $Vd, $Vm",
4827*9880d681SAndroid Build Coastguard Worker                   (VACGEfq QPR:$Vd, QPR:$Vm, QPR:$Vd, pred:$p)>;
4828*9880d681SAndroid Build Coastguard Workerlet Predicates = [HasNEON, HasFullFP16] in {
4829*9880d681SAndroid Build Coastguard Workerdef: NEONInstAlias<"vaclt${p}.f16 $Vd, $Vm",
4830*9880d681SAndroid Build Coastguard Worker                   (VACGThd DPR:$Vd, DPR:$Vm, DPR:$Vd, pred:$p)>;
4831*9880d681SAndroid Build Coastguard Workerdef: NEONInstAlias<"vaclt${p}.f16 $Vd, $Vm",
4832*9880d681SAndroid Build Coastguard Worker                   (VACGThq QPR:$Vd, QPR:$Vm, QPR:$Vd, pred:$p)>;
4833*9880d681SAndroid Build Coastguard Workerdef: NEONInstAlias<"vacle${p}.f16 $Vd, $Vm",
4834*9880d681SAndroid Build Coastguard Worker                   (VACGEhd DPR:$Vd, DPR:$Vm, DPR:$Vd, pred:$p)>;
4835*9880d681SAndroid Build Coastguard Workerdef: NEONInstAlias<"vacle${p}.f16 $Vd, $Vm",
4836*9880d681SAndroid Build Coastguard Worker                   (VACGEhq QPR:$Vd, QPR:$Vm, QPR:$Vd, pred:$p)>;
4837*9880d681SAndroid Build Coastguard Worker}
4838*9880d681SAndroid Build Coastguard Worker
4839*9880d681SAndroid Build Coastguard Worker// Vector Bitwise Operations.
4840*9880d681SAndroid Build Coastguard Worker
4841*9880d681SAndroid Build Coastguard Workerdef vnotd : PatFrag<(ops node:$in),
4842*9880d681SAndroid Build Coastguard Worker                    (xor node:$in, (bitconvert (v8i8 NEONimmAllOnesV)))>;
4843*9880d681SAndroid Build Coastguard Workerdef vnotq : PatFrag<(ops node:$in),
4844*9880d681SAndroid Build Coastguard Worker                    (xor node:$in, (bitconvert (v16i8 NEONimmAllOnesV)))>;
4845*9880d681SAndroid Build Coastguard Worker
4846*9880d681SAndroid Build Coastguard Worker
4847*9880d681SAndroid Build Coastguard Worker//   VAND     : Vector Bitwise AND
4848*9880d681SAndroid Build Coastguard Workerdef  VANDd    : N3VDX<0, 0, 0b00, 0b0001, 1, IIC_VBINiD, "vand",
4849*9880d681SAndroid Build Coastguard Worker                      v2i32, v2i32, and, 1>;
4850*9880d681SAndroid Build Coastguard Workerdef  VANDq    : N3VQX<0, 0, 0b00, 0b0001, 1, IIC_VBINiQ, "vand",
4851*9880d681SAndroid Build Coastguard Worker                      v4i32, v4i32, and, 1>;
4852*9880d681SAndroid Build Coastguard Worker
4853*9880d681SAndroid Build Coastguard Worker//   VEOR     : Vector Bitwise Exclusive OR
4854*9880d681SAndroid Build Coastguard Workerdef  VEORd    : N3VDX<1, 0, 0b00, 0b0001, 1, IIC_VBINiD, "veor",
4855*9880d681SAndroid Build Coastguard Worker                      v2i32, v2i32, xor, 1>;
4856*9880d681SAndroid Build Coastguard Workerdef  VEORq    : N3VQX<1, 0, 0b00, 0b0001, 1, IIC_VBINiQ, "veor",
4857*9880d681SAndroid Build Coastguard Worker                      v4i32, v4i32, xor, 1>;
4858*9880d681SAndroid Build Coastguard Worker
4859*9880d681SAndroid Build Coastguard Worker//   VORR     : Vector Bitwise OR
4860*9880d681SAndroid Build Coastguard Workerdef  VORRd    : N3VDX<0, 0, 0b10, 0b0001, 1, IIC_VBINiD, "vorr",
4861*9880d681SAndroid Build Coastguard Worker                      v2i32, v2i32, or, 1>;
4862*9880d681SAndroid Build Coastguard Workerdef  VORRq    : N3VQX<0, 0, 0b10, 0b0001, 1, IIC_VBINiQ, "vorr",
4863*9880d681SAndroid Build Coastguard Worker                      v4i32, v4i32, or, 1>;
4864*9880d681SAndroid Build Coastguard Worker
4865*9880d681SAndroid Build Coastguard Workerdef VORRiv4i16 : N1ModImm<1, 0b000, {1,0,?,1}, 0, 0, 0, 1,
4866*9880d681SAndroid Build Coastguard Worker                          (outs DPR:$Vd), (ins nImmSplatI16:$SIMM, DPR:$src),
4867*9880d681SAndroid Build Coastguard Worker                          IIC_VMOVImm,
4868*9880d681SAndroid Build Coastguard Worker                          "vorr", "i16", "$Vd, $SIMM", "$src = $Vd",
4869*9880d681SAndroid Build Coastguard Worker                          [(set DPR:$Vd,
4870*9880d681SAndroid Build Coastguard Worker                            (v4i16 (NEONvorrImm DPR:$src, timm:$SIMM)))]> {
4871*9880d681SAndroid Build Coastguard Worker  let Inst{9} = SIMM{9};
4872*9880d681SAndroid Build Coastguard Worker}
4873*9880d681SAndroid Build Coastguard Worker
4874*9880d681SAndroid Build Coastguard Workerdef VORRiv2i32 : N1ModImm<1, 0b000, {0,?,?,1}, 0, 0, 0, 1,
4875*9880d681SAndroid Build Coastguard Worker                          (outs DPR:$Vd), (ins nImmSplatI32:$SIMM, DPR:$src),
4876*9880d681SAndroid Build Coastguard Worker                          IIC_VMOVImm,
4877*9880d681SAndroid Build Coastguard Worker                          "vorr", "i32", "$Vd, $SIMM", "$src = $Vd",
4878*9880d681SAndroid Build Coastguard Worker                          [(set DPR:$Vd,
4879*9880d681SAndroid Build Coastguard Worker                            (v2i32 (NEONvorrImm DPR:$src, timm:$SIMM)))]> {
4880*9880d681SAndroid Build Coastguard Worker  let Inst{10-9} = SIMM{10-9};
4881*9880d681SAndroid Build Coastguard Worker}
4882*9880d681SAndroid Build Coastguard Worker
4883*9880d681SAndroid Build Coastguard Workerdef VORRiv8i16 : N1ModImm<1, 0b000, {1,0,?,1}, 0, 1, 0, 1,
4884*9880d681SAndroid Build Coastguard Worker                          (outs QPR:$Vd), (ins nImmSplatI16:$SIMM, QPR:$src),
4885*9880d681SAndroid Build Coastguard Worker                          IIC_VMOVImm,
4886*9880d681SAndroid Build Coastguard Worker                          "vorr", "i16", "$Vd, $SIMM", "$src = $Vd",
4887*9880d681SAndroid Build Coastguard Worker                          [(set QPR:$Vd,
4888*9880d681SAndroid Build Coastguard Worker                            (v8i16 (NEONvorrImm QPR:$src, timm:$SIMM)))]> {
4889*9880d681SAndroid Build Coastguard Worker  let Inst{9} = SIMM{9};
4890*9880d681SAndroid Build Coastguard Worker}
4891*9880d681SAndroid Build Coastguard Worker
4892*9880d681SAndroid Build Coastguard Workerdef VORRiv4i32 : N1ModImm<1, 0b000, {0,?,?,1}, 0, 1, 0, 1,
4893*9880d681SAndroid Build Coastguard Worker                          (outs QPR:$Vd), (ins nImmSplatI32:$SIMM, QPR:$src),
4894*9880d681SAndroid Build Coastguard Worker                          IIC_VMOVImm,
4895*9880d681SAndroid Build Coastguard Worker                          "vorr", "i32", "$Vd, $SIMM", "$src = $Vd",
4896*9880d681SAndroid Build Coastguard Worker                          [(set QPR:$Vd,
4897*9880d681SAndroid Build Coastguard Worker                            (v4i32 (NEONvorrImm QPR:$src, timm:$SIMM)))]> {
4898*9880d681SAndroid Build Coastguard Worker  let Inst{10-9} = SIMM{10-9};
4899*9880d681SAndroid Build Coastguard Worker}
4900*9880d681SAndroid Build Coastguard Worker
4901*9880d681SAndroid Build Coastguard Worker
4902*9880d681SAndroid Build Coastguard Worker//   VBIC     : Vector Bitwise Bit Clear (AND NOT)
4903*9880d681SAndroid Build Coastguard Workerlet TwoOperandAliasConstraint = "$Vn = $Vd" in {
4904*9880d681SAndroid Build Coastguard Workerdef  VBICd    : N3VX<0, 0, 0b01, 0b0001, 0, 1, (outs DPR:$Vd),
4905*9880d681SAndroid Build Coastguard Worker                     (ins DPR:$Vn, DPR:$Vm), N3RegFrm, IIC_VBINiD,
4906*9880d681SAndroid Build Coastguard Worker                     "vbic", "$Vd, $Vn, $Vm", "",
4907*9880d681SAndroid Build Coastguard Worker                     [(set DPR:$Vd, (v2i32 (and DPR:$Vn,
4908*9880d681SAndroid Build Coastguard Worker                                                 (vnotd DPR:$Vm))))]>;
4909*9880d681SAndroid Build Coastguard Workerdef  VBICq    : N3VX<0, 0, 0b01, 0b0001, 1, 1, (outs QPR:$Vd),
4910*9880d681SAndroid Build Coastguard Worker                     (ins QPR:$Vn, QPR:$Vm), N3RegFrm, IIC_VBINiQ,
4911*9880d681SAndroid Build Coastguard Worker                     "vbic", "$Vd, $Vn, $Vm", "",
4912*9880d681SAndroid Build Coastguard Worker                     [(set QPR:$Vd, (v4i32 (and QPR:$Vn,
4913*9880d681SAndroid Build Coastguard Worker                                                 (vnotq QPR:$Vm))))]>;
4914*9880d681SAndroid Build Coastguard Worker}
4915*9880d681SAndroid Build Coastguard Worker
4916*9880d681SAndroid Build Coastguard Workerdef VBICiv4i16 : N1ModImm<1, 0b000, {1,0,?,1}, 0, 0, 1, 1,
4917*9880d681SAndroid Build Coastguard Worker                          (outs DPR:$Vd), (ins nImmSplatI16:$SIMM, DPR:$src),
4918*9880d681SAndroid Build Coastguard Worker                          IIC_VMOVImm,
4919*9880d681SAndroid Build Coastguard Worker                          "vbic", "i16", "$Vd, $SIMM", "$src = $Vd",
4920*9880d681SAndroid Build Coastguard Worker                          [(set DPR:$Vd,
4921*9880d681SAndroid Build Coastguard Worker                            (v4i16 (NEONvbicImm DPR:$src, timm:$SIMM)))]> {
4922*9880d681SAndroid Build Coastguard Worker  let Inst{9} = SIMM{9};
4923*9880d681SAndroid Build Coastguard Worker}
4924*9880d681SAndroid Build Coastguard Worker
4925*9880d681SAndroid Build Coastguard Workerdef VBICiv2i32 : N1ModImm<1, 0b000, {0,?,?,1}, 0, 0, 1, 1,
4926*9880d681SAndroid Build Coastguard Worker                          (outs DPR:$Vd), (ins nImmSplatI32:$SIMM, DPR:$src),
4927*9880d681SAndroid Build Coastguard Worker                          IIC_VMOVImm,
4928*9880d681SAndroid Build Coastguard Worker                          "vbic", "i32", "$Vd, $SIMM", "$src = $Vd",
4929*9880d681SAndroid Build Coastguard Worker                          [(set DPR:$Vd,
4930*9880d681SAndroid Build Coastguard Worker                            (v2i32 (NEONvbicImm DPR:$src, timm:$SIMM)))]> {
4931*9880d681SAndroid Build Coastguard Worker  let Inst{10-9} = SIMM{10-9};
4932*9880d681SAndroid Build Coastguard Worker}
4933*9880d681SAndroid Build Coastguard Worker
4934*9880d681SAndroid Build Coastguard Workerdef VBICiv8i16 : N1ModImm<1, 0b000, {1,0,?,1}, 0, 1, 1, 1,
4935*9880d681SAndroid Build Coastguard Worker                          (outs QPR:$Vd), (ins nImmSplatI16:$SIMM, QPR:$src),
4936*9880d681SAndroid Build Coastguard Worker                          IIC_VMOVImm,
4937*9880d681SAndroid Build Coastguard Worker                          "vbic", "i16", "$Vd, $SIMM", "$src = $Vd",
4938*9880d681SAndroid Build Coastguard Worker                          [(set QPR:$Vd,
4939*9880d681SAndroid Build Coastguard Worker                            (v8i16 (NEONvbicImm QPR:$src, timm:$SIMM)))]> {
4940*9880d681SAndroid Build Coastguard Worker  let Inst{9} = SIMM{9};
4941*9880d681SAndroid Build Coastguard Worker}
4942*9880d681SAndroid Build Coastguard Worker
4943*9880d681SAndroid Build Coastguard Workerdef VBICiv4i32 : N1ModImm<1, 0b000, {0,?,?,1}, 0, 1, 1, 1,
4944*9880d681SAndroid Build Coastguard Worker                          (outs QPR:$Vd), (ins nImmSplatI32:$SIMM, QPR:$src),
4945*9880d681SAndroid Build Coastguard Worker                          IIC_VMOVImm,
4946*9880d681SAndroid Build Coastguard Worker                          "vbic", "i32", "$Vd, $SIMM", "$src = $Vd",
4947*9880d681SAndroid Build Coastguard Worker                          [(set QPR:$Vd,
4948*9880d681SAndroid Build Coastguard Worker                            (v4i32 (NEONvbicImm QPR:$src, timm:$SIMM)))]> {
4949*9880d681SAndroid Build Coastguard Worker  let Inst{10-9} = SIMM{10-9};
4950*9880d681SAndroid Build Coastguard Worker}
4951*9880d681SAndroid Build Coastguard Worker
4952*9880d681SAndroid Build Coastguard Worker//   VORN     : Vector Bitwise OR NOT
4953*9880d681SAndroid Build Coastguard Workerdef  VORNd    : N3VX<0, 0, 0b11, 0b0001, 0, 1, (outs DPR:$Vd),
4954*9880d681SAndroid Build Coastguard Worker                     (ins DPR:$Vn, DPR:$Vm), N3RegFrm, IIC_VBINiD,
4955*9880d681SAndroid Build Coastguard Worker                     "vorn", "$Vd, $Vn, $Vm", "",
4956*9880d681SAndroid Build Coastguard Worker                     [(set DPR:$Vd, (v2i32 (or DPR:$Vn,
4957*9880d681SAndroid Build Coastguard Worker                                                (vnotd DPR:$Vm))))]>;
4958*9880d681SAndroid Build Coastguard Workerdef  VORNq    : N3VX<0, 0, 0b11, 0b0001, 1, 1, (outs QPR:$Vd),
4959*9880d681SAndroid Build Coastguard Worker                     (ins QPR:$Vn, QPR:$Vm), N3RegFrm, IIC_VBINiQ,
4960*9880d681SAndroid Build Coastguard Worker                     "vorn", "$Vd, $Vn, $Vm", "",
4961*9880d681SAndroid Build Coastguard Worker                     [(set QPR:$Vd, (v4i32 (or QPR:$Vn,
4962*9880d681SAndroid Build Coastguard Worker                                                (vnotq QPR:$Vm))))]>;
4963*9880d681SAndroid Build Coastguard Worker
4964*9880d681SAndroid Build Coastguard Worker//   VMVN     : Vector Bitwise NOT (Immediate)
4965*9880d681SAndroid Build Coastguard Worker
4966*9880d681SAndroid Build Coastguard Workerlet isReMaterializable = 1 in {
4967*9880d681SAndroid Build Coastguard Worker
4968*9880d681SAndroid Build Coastguard Workerdef VMVNv4i16 : N1ModImm<1, 0b000, {1,0,?,0}, 0, 0, 1, 1, (outs DPR:$Vd),
4969*9880d681SAndroid Build Coastguard Worker                         (ins nImmSplatI16:$SIMM), IIC_VMOVImm,
4970*9880d681SAndroid Build Coastguard Worker                         "vmvn", "i16", "$Vd, $SIMM", "",
4971*9880d681SAndroid Build Coastguard Worker                         [(set DPR:$Vd, (v4i16 (NEONvmvnImm timm:$SIMM)))]> {
4972*9880d681SAndroid Build Coastguard Worker  let Inst{9} = SIMM{9};
4973*9880d681SAndroid Build Coastguard Worker}
4974*9880d681SAndroid Build Coastguard Worker
4975*9880d681SAndroid Build Coastguard Workerdef VMVNv8i16 : N1ModImm<1, 0b000, {1,0,?,0}, 0, 1, 1, 1, (outs QPR:$Vd),
4976*9880d681SAndroid Build Coastguard Worker                         (ins nImmSplatI16:$SIMM), IIC_VMOVImm,
4977*9880d681SAndroid Build Coastguard Worker                         "vmvn", "i16", "$Vd, $SIMM", "",
4978*9880d681SAndroid Build Coastguard Worker                         [(set QPR:$Vd, (v8i16 (NEONvmvnImm timm:$SIMM)))]> {
4979*9880d681SAndroid Build Coastguard Worker  let Inst{9} = SIMM{9};
4980*9880d681SAndroid Build Coastguard Worker}
4981*9880d681SAndroid Build Coastguard Worker
4982*9880d681SAndroid Build Coastguard Workerdef VMVNv2i32 : N1ModImm<1, 0b000, {?,?,?,?}, 0, 0, 1, 1, (outs DPR:$Vd),
4983*9880d681SAndroid Build Coastguard Worker                         (ins nImmVMOVI32:$SIMM), IIC_VMOVImm,
4984*9880d681SAndroid Build Coastguard Worker                         "vmvn", "i32", "$Vd, $SIMM", "",
4985*9880d681SAndroid Build Coastguard Worker                         [(set DPR:$Vd, (v2i32 (NEONvmvnImm timm:$SIMM)))]> {
4986*9880d681SAndroid Build Coastguard Worker  let Inst{11-8} = SIMM{11-8};
4987*9880d681SAndroid Build Coastguard Worker}
4988*9880d681SAndroid Build Coastguard Worker
4989*9880d681SAndroid Build Coastguard Workerdef VMVNv4i32 : N1ModImm<1, 0b000, {?,?,?,?}, 0, 1, 1, 1, (outs QPR:$Vd),
4990*9880d681SAndroid Build Coastguard Worker                         (ins nImmVMOVI32:$SIMM), IIC_VMOVImm,
4991*9880d681SAndroid Build Coastguard Worker                         "vmvn", "i32", "$Vd, $SIMM", "",
4992*9880d681SAndroid Build Coastguard Worker                         [(set QPR:$Vd, (v4i32 (NEONvmvnImm timm:$SIMM)))]> {
4993*9880d681SAndroid Build Coastguard Worker  let Inst{11-8} = SIMM{11-8};
4994*9880d681SAndroid Build Coastguard Worker}
4995*9880d681SAndroid Build Coastguard Worker}
4996*9880d681SAndroid Build Coastguard Worker
4997*9880d681SAndroid Build Coastguard Worker//   VMVN     : Vector Bitwise NOT
4998*9880d681SAndroid Build Coastguard Workerdef  VMVNd    : N2VX<0b11, 0b11, 0b00, 0b00, 0b01011, 0, 0,
4999*9880d681SAndroid Build Coastguard Worker                     (outs DPR:$Vd), (ins DPR:$Vm), IIC_VSUBiD,
5000*9880d681SAndroid Build Coastguard Worker                     "vmvn", "$Vd, $Vm", "",
5001*9880d681SAndroid Build Coastguard Worker                     [(set DPR:$Vd, (v2i32 (vnotd DPR:$Vm)))]>;
5002*9880d681SAndroid Build Coastguard Workerdef  VMVNq    : N2VX<0b11, 0b11, 0b00, 0b00, 0b01011, 1, 0,
5003*9880d681SAndroid Build Coastguard Worker                     (outs QPR:$Vd), (ins QPR:$Vm), IIC_VSUBiD,
5004*9880d681SAndroid Build Coastguard Worker                     "vmvn", "$Vd, $Vm", "",
5005*9880d681SAndroid Build Coastguard Worker                     [(set QPR:$Vd, (v4i32 (vnotq QPR:$Vm)))]>;
5006*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2i32 (vnotd DPR:$src)), (VMVNd DPR:$src)>;
5007*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i32 (vnotq QPR:$src)), (VMVNq QPR:$src)>;
5008*9880d681SAndroid Build Coastguard Worker
5009*9880d681SAndroid Build Coastguard Worker//   VBSL     : Vector Bitwise Select
5010*9880d681SAndroid Build Coastguard Workerdef  VBSLd    : N3VX<1, 0, 0b01, 0b0001, 0, 1, (outs DPR:$Vd),
5011*9880d681SAndroid Build Coastguard Worker                     (ins DPR:$src1, DPR:$Vn, DPR:$Vm),
5012*9880d681SAndroid Build Coastguard Worker                     N3RegFrm, IIC_VCNTiD,
5013*9880d681SAndroid Build Coastguard Worker                     "vbsl", "$Vd, $Vn, $Vm", "$src1 = $Vd",
5014*9880d681SAndroid Build Coastguard Worker                     [(set DPR:$Vd,
5015*9880d681SAndroid Build Coastguard Worker                           (v2i32 (NEONvbsl DPR:$src1, DPR:$Vn, DPR:$Vm)))]>;
5016*9880d681SAndroid Build Coastguard Workerdef : Pat<(v8i8 (int_arm_neon_vbsl (v8i8 DPR:$src1),
5017*9880d681SAndroid Build Coastguard Worker                                   (v8i8 DPR:$Vn), (v8i8 DPR:$Vm))),
5018*9880d681SAndroid Build Coastguard Worker          (VBSLd DPR:$src1, DPR:$Vn, DPR:$Vm)>,
5019*9880d681SAndroid Build Coastguard Worker        Requires<[HasNEON]>;
5020*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i16 (int_arm_neon_vbsl (v4i16 DPR:$src1),
5021*9880d681SAndroid Build Coastguard Worker                                    (v4i16 DPR:$Vn), (v4i16 DPR:$Vm))),
5022*9880d681SAndroid Build Coastguard Worker          (VBSLd DPR:$src1, DPR:$Vn, DPR:$Vm)>,
5023*9880d681SAndroid Build Coastguard Worker        Requires<[HasNEON]>;
5024*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2i32 (int_arm_neon_vbsl (v2i32 DPR:$src1),
5025*9880d681SAndroid Build Coastguard Worker                                    (v2i32 DPR:$Vn), (v2i32 DPR:$Vm))),
5026*9880d681SAndroid Build Coastguard Worker          (VBSLd DPR:$src1, DPR:$Vn, DPR:$Vm)>,
5027*9880d681SAndroid Build Coastguard Worker        Requires<[HasNEON]>;
5028*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2f32 (int_arm_neon_vbsl (v2f32 DPR:$src1),
5029*9880d681SAndroid Build Coastguard Worker                                    (v2f32 DPR:$Vn), (v2f32 DPR:$Vm))),
5030*9880d681SAndroid Build Coastguard Worker          (VBSLd DPR:$src1, DPR:$Vn, DPR:$Vm)>,
5031*9880d681SAndroid Build Coastguard Worker        Requires<[HasNEON]>;
5032*9880d681SAndroid Build Coastguard Workerdef : Pat<(v1i64 (int_arm_neon_vbsl (v1i64 DPR:$src1),
5033*9880d681SAndroid Build Coastguard Worker                                    (v1i64 DPR:$Vn), (v1i64 DPR:$Vm))),
5034*9880d681SAndroid Build Coastguard Worker          (VBSLd DPR:$src1, DPR:$Vn, DPR:$Vm)>,
5035*9880d681SAndroid Build Coastguard Worker        Requires<[HasNEON]>;
5036*9880d681SAndroid Build Coastguard Worker
5037*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2i32 (or (and DPR:$Vn, DPR:$Vd),
5038*9880d681SAndroid Build Coastguard Worker                     (and DPR:$Vm, (vnotd DPR:$Vd)))),
5039*9880d681SAndroid Build Coastguard Worker          (VBSLd DPR:$Vd, DPR:$Vn, DPR:$Vm)>,
5040*9880d681SAndroid Build Coastguard Worker        Requires<[HasNEON]>;
5041*9880d681SAndroid Build Coastguard Worker
5042*9880d681SAndroid Build Coastguard Workerdef : Pat<(v1i64 (or (and DPR:$Vn, DPR:$Vd),
5043*9880d681SAndroid Build Coastguard Worker                     (and DPR:$Vm, (vnotd DPR:$Vd)))),
5044*9880d681SAndroid Build Coastguard Worker          (VBSLd DPR:$Vd, DPR:$Vn, DPR:$Vm)>,
5045*9880d681SAndroid Build Coastguard Worker        Requires<[HasNEON]>;
5046*9880d681SAndroid Build Coastguard Worker
5047*9880d681SAndroid Build Coastguard Workerdef  VBSLq    : N3VX<1, 0, 0b01, 0b0001, 1, 1, (outs QPR:$Vd),
5048*9880d681SAndroid Build Coastguard Worker                     (ins QPR:$src1, QPR:$Vn, QPR:$Vm),
5049*9880d681SAndroid Build Coastguard Worker                     N3RegFrm, IIC_VCNTiQ,
5050*9880d681SAndroid Build Coastguard Worker                     "vbsl", "$Vd, $Vn, $Vm", "$src1 = $Vd",
5051*9880d681SAndroid Build Coastguard Worker                     [(set QPR:$Vd,
5052*9880d681SAndroid Build Coastguard Worker                           (v4i32 (NEONvbsl QPR:$src1, QPR:$Vn, QPR:$Vm)))]>;
5053*9880d681SAndroid Build Coastguard Worker
5054*9880d681SAndroid Build Coastguard Workerdef : Pat<(v16i8 (int_arm_neon_vbsl (v16i8 QPR:$src1),
5055*9880d681SAndroid Build Coastguard Worker                                   (v16i8 QPR:$Vn), (v16i8 QPR:$Vm))),
5056*9880d681SAndroid Build Coastguard Worker          (VBSLq QPR:$src1, QPR:$Vn, QPR:$Vm)>,
5057*9880d681SAndroid Build Coastguard Worker        Requires<[HasNEON]>;
5058*9880d681SAndroid Build Coastguard Workerdef : Pat<(v8i16 (int_arm_neon_vbsl (v8i16 QPR:$src1),
5059*9880d681SAndroid Build Coastguard Worker                                    (v8i16 QPR:$Vn), (v8i16 QPR:$Vm))),
5060*9880d681SAndroid Build Coastguard Worker          (VBSLq QPR:$src1, QPR:$Vn, QPR:$Vm)>,
5061*9880d681SAndroid Build Coastguard Worker        Requires<[HasNEON]>;
5062*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i32 (int_arm_neon_vbsl (v4i32 QPR:$src1),
5063*9880d681SAndroid Build Coastguard Worker                                    (v4i32 QPR:$Vn), (v4i32 QPR:$Vm))),
5064*9880d681SAndroid Build Coastguard Worker          (VBSLq QPR:$src1, QPR:$Vn, QPR:$Vm)>,
5065*9880d681SAndroid Build Coastguard Worker        Requires<[HasNEON]>;
5066*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4f32 (int_arm_neon_vbsl (v4f32 QPR:$src1),
5067*9880d681SAndroid Build Coastguard Worker                                    (v4f32 QPR:$Vn), (v4f32 QPR:$Vm))),
5068*9880d681SAndroid Build Coastguard Worker          (VBSLq QPR:$src1, QPR:$Vn, QPR:$Vm)>,
5069*9880d681SAndroid Build Coastguard Worker        Requires<[HasNEON]>;
5070*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2i64 (int_arm_neon_vbsl (v2i64 QPR:$src1),
5071*9880d681SAndroid Build Coastguard Worker                                    (v2i64 QPR:$Vn), (v2i64 QPR:$Vm))),
5072*9880d681SAndroid Build Coastguard Worker          (VBSLq QPR:$src1, QPR:$Vn, QPR:$Vm)>,
5073*9880d681SAndroid Build Coastguard Worker        Requires<[HasNEON]>;
5074*9880d681SAndroid Build Coastguard Worker
5075*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i32 (or (and QPR:$Vn, QPR:$Vd),
5076*9880d681SAndroid Build Coastguard Worker                     (and QPR:$Vm, (vnotq QPR:$Vd)))),
5077*9880d681SAndroid Build Coastguard Worker          (VBSLq QPR:$Vd, QPR:$Vn, QPR:$Vm)>,
5078*9880d681SAndroid Build Coastguard Worker        Requires<[HasNEON]>;
5079*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2i64 (or (and QPR:$Vn, QPR:$Vd),
5080*9880d681SAndroid Build Coastguard Worker                     (and QPR:$Vm, (vnotq QPR:$Vd)))),
5081*9880d681SAndroid Build Coastguard Worker          (VBSLq QPR:$Vd, QPR:$Vn, QPR:$Vm)>,
5082*9880d681SAndroid Build Coastguard Worker        Requires<[HasNEON]>;
5083*9880d681SAndroid Build Coastguard Worker
5084*9880d681SAndroid Build Coastguard Worker//   VBIF     : Vector Bitwise Insert if False
5085*9880d681SAndroid Build Coastguard Worker//              like VBSL but with: "vbif $dst, $src3, $src1", "$src2 = $dst",
5086*9880d681SAndroid Build Coastguard Worker// FIXME: This instruction's encoding MAY NOT BE correct.
5087*9880d681SAndroid Build Coastguard Workerdef  VBIFd    : N3VX<1, 0, 0b11, 0b0001, 0, 1,
5088*9880d681SAndroid Build Coastguard Worker                     (outs DPR:$Vd), (ins DPR:$src1, DPR:$Vn, DPR:$Vm),
5089*9880d681SAndroid Build Coastguard Worker                     N3RegFrm, IIC_VBINiD,
5090*9880d681SAndroid Build Coastguard Worker                     "vbif", "$Vd, $Vn, $Vm", "$src1 = $Vd",
5091*9880d681SAndroid Build Coastguard Worker                     []>;
5092*9880d681SAndroid Build Coastguard Workerdef  VBIFq    : N3VX<1, 0, 0b11, 0b0001, 1, 1,
5093*9880d681SAndroid Build Coastguard Worker                     (outs QPR:$Vd), (ins QPR:$src1, QPR:$Vn, QPR:$Vm),
5094*9880d681SAndroid Build Coastguard Worker                     N3RegFrm, IIC_VBINiQ,
5095*9880d681SAndroid Build Coastguard Worker                     "vbif", "$Vd, $Vn, $Vm", "$src1 = $Vd",
5096*9880d681SAndroid Build Coastguard Worker                     []>;
5097*9880d681SAndroid Build Coastguard Worker
5098*9880d681SAndroid Build Coastguard Worker//   VBIT     : Vector Bitwise Insert if True
5099*9880d681SAndroid Build Coastguard Worker//              like VBSL but with: "vbit $dst, $src2, $src1", "$src3 = $dst",
5100*9880d681SAndroid Build Coastguard Worker// FIXME: This instruction's encoding MAY NOT BE correct.
5101*9880d681SAndroid Build Coastguard Workerdef  VBITd    : N3VX<1, 0, 0b10, 0b0001, 0, 1,
5102*9880d681SAndroid Build Coastguard Worker                     (outs DPR:$Vd), (ins DPR:$src1, DPR:$Vn, DPR:$Vm),
5103*9880d681SAndroid Build Coastguard Worker                     N3RegFrm, IIC_VBINiD,
5104*9880d681SAndroid Build Coastguard Worker                     "vbit", "$Vd, $Vn, $Vm", "$src1 = $Vd",
5105*9880d681SAndroid Build Coastguard Worker                     []>;
5106*9880d681SAndroid Build Coastguard Workerdef  VBITq    : N3VX<1, 0, 0b10, 0b0001, 1, 1,
5107*9880d681SAndroid Build Coastguard Worker                     (outs QPR:$Vd), (ins QPR:$src1, QPR:$Vn, QPR:$Vm),
5108*9880d681SAndroid Build Coastguard Worker                     N3RegFrm, IIC_VBINiQ,
5109*9880d681SAndroid Build Coastguard Worker                     "vbit", "$Vd, $Vn, $Vm", "$src1 = $Vd",
5110*9880d681SAndroid Build Coastguard Worker                     []>;
5111*9880d681SAndroid Build Coastguard Worker
5112*9880d681SAndroid Build Coastguard Worker// VBIT/VBIF are not yet implemented.  The TwoAddress pass will not go looking
5113*9880d681SAndroid Build Coastguard Worker// for equivalent operations with different register constraints; it just
5114*9880d681SAndroid Build Coastguard Worker// inserts copies.
5115*9880d681SAndroid Build Coastguard Worker
5116*9880d681SAndroid Build Coastguard Worker// Vector Absolute Differences.
5117*9880d681SAndroid Build Coastguard Worker
5118*9880d681SAndroid Build Coastguard Worker//   VABD     : Vector Absolute Difference
5119*9880d681SAndroid Build Coastguard Workerdefm VABDs    : N3VInt_QHS<0, 0, 0b0111, 0, N3RegFrm,
5120*9880d681SAndroid Build Coastguard Worker                           IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q,
5121*9880d681SAndroid Build Coastguard Worker                           "vabd", "s", int_arm_neon_vabds, 1>;
5122*9880d681SAndroid Build Coastguard Workerdefm VABDu    : N3VInt_QHS<1, 0, 0b0111, 0, N3RegFrm,
5123*9880d681SAndroid Build Coastguard Worker                           IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q,
5124*9880d681SAndroid Build Coastguard Worker                           "vabd", "u", int_arm_neon_vabdu, 1>;
5125*9880d681SAndroid Build Coastguard Workerdef  VABDfd   : N3VDInt<1, 0, 0b10, 0b1101, 0, N3RegFrm, IIC_VBIND,
5126*9880d681SAndroid Build Coastguard Worker                        "vabd", "f32", v2f32, v2f32, int_arm_neon_vabds, 1>;
5127*9880d681SAndroid Build Coastguard Workerdef  VABDfq   : N3VQInt<1, 0, 0b10, 0b1101, 0, N3RegFrm, IIC_VBINQ,
5128*9880d681SAndroid Build Coastguard Worker                        "vabd", "f32", v4f32, v4f32, int_arm_neon_vabds, 1>;
5129*9880d681SAndroid Build Coastguard Workerdef  VABDhd   : N3VDInt<1, 0, 0b11, 0b1101, 0, N3RegFrm, IIC_VBIND,
5130*9880d681SAndroid Build Coastguard Worker                        "vabd", "f16", v4f16, v4f16, int_arm_neon_vabds, 1>,
5131*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
5132*9880d681SAndroid Build Coastguard Workerdef  VABDhq   : N3VQInt<1, 0, 0b11, 0b1101, 0, N3RegFrm, IIC_VBINQ,
5133*9880d681SAndroid Build Coastguard Worker                        "vabd", "f16", v8f16, v8f16, int_arm_neon_vabds, 1>,
5134*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
5135*9880d681SAndroid Build Coastguard Worker
5136*9880d681SAndroid Build Coastguard Worker//   VABDL    : Vector Absolute Difference Long (Q = | D - D |)
5137*9880d681SAndroid Build Coastguard Workerdefm VABDLs   : N3VLIntExt_QHS<0,1,0b0111,0, IIC_VSUBi4Q,
5138*9880d681SAndroid Build Coastguard Worker                               "vabdl", "s", int_arm_neon_vabds, zext, 1>;
5139*9880d681SAndroid Build Coastguard Workerdefm VABDLu   : N3VLIntExt_QHS<1,1,0b0111,0, IIC_VSUBi4Q,
5140*9880d681SAndroid Build Coastguard Worker                               "vabdl", "u", int_arm_neon_vabdu, zext, 1>;
5141*9880d681SAndroid Build Coastguard Worker
5142*9880d681SAndroid Build Coastguard Workerdef abd_shr :
5143*9880d681SAndroid Build Coastguard Worker    PatFrag<(ops node:$in1, node:$in2, node:$shift),
5144*9880d681SAndroid Build Coastguard Worker            (NEONvshrs (sub (zext node:$in1),
5145*9880d681SAndroid Build Coastguard Worker                            (zext node:$in2)), (i32 $shift))>;
5146*9880d681SAndroid Build Coastguard Worker
5147*9880d681SAndroid Build Coastguard Workerdef : Pat<(xor (v4i32 (bitconvert (v8i16 (abd_shr (v8i8 DPR:$opA), (v8i8 DPR:$opB), 15)))),
5148*9880d681SAndroid Build Coastguard Worker               (v4i32 (bitconvert (v8i16 (add (sub (zext (v8i8 DPR:$opA)),
5149*9880d681SAndroid Build Coastguard Worker                                                   (zext (v8i8 DPR:$opB))),
5150*9880d681SAndroid Build Coastguard Worker                                              (v8i16 (abd_shr (v8i8 DPR:$opA), (v8i8 DPR:$opB), 15))))))),
5151*9880d681SAndroid Build Coastguard Worker          (VABDLuv8i16 DPR:$opA, DPR:$opB)>;
5152*9880d681SAndroid Build Coastguard Worker
5153*9880d681SAndroid Build Coastguard Workerdef : Pat<(xor (v4i32 (abd_shr (v4i16 DPR:$opA), (v4i16 DPR:$opB), 31)),
5154*9880d681SAndroid Build Coastguard Worker               (v4i32 (add (sub (zext (v4i16 DPR:$opA)),
5155*9880d681SAndroid Build Coastguard Worker                                (zext (v4i16 DPR:$opB))),
5156*9880d681SAndroid Build Coastguard Worker                           (abd_shr (v4i16 DPR:$opA), (v4i16 DPR:$opB), 31)))),
5157*9880d681SAndroid Build Coastguard Worker          (VABDLuv4i32 DPR:$opA, DPR:$opB)>;
5158*9880d681SAndroid Build Coastguard Worker
5159*9880d681SAndroid Build Coastguard Workerdef : Pat<(xor (v4i32 (bitconvert (v2i64 (abd_shr (v2i32 DPR:$opA), (v2i32 DPR:$opB), 63)))),
5160*9880d681SAndroid Build Coastguard Worker               (v4i32 (bitconvert (v2i64 (add (sub (zext (v2i32 DPR:$opA)),
5161*9880d681SAndroid Build Coastguard Worker                                                   (zext (v2i32 DPR:$opB))),
5162*9880d681SAndroid Build Coastguard Worker                                         (abd_shr (v2i32 DPR:$opA), (v2i32 DPR:$opB), 63)))))),
5163*9880d681SAndroid Build Coastguard Worker          (VABDLuv2i64 DPR:$opA, DPR:$opB)>;
5164*9880d681SAndroid Build Coastguard Worker
5165*9880d681SAndroid Build Coastguard Worker//   VABA     : Vector Absolute Difference and Accumulate
5166*9880d681SAndroid Build Coastguard Workerdefm VABAs    : N3VIntOp_QHS<0,0,0b0111,1, IIC_VABAD, IIC_VABAQ,
5167*9880d681SAndroid Build Coastguard Worker                             "vaba", "s", int_arm_neon_vabds, add>;
5168*9880d681SAndroid Build Coastguard Workerdefm VABAu    : N3VIntOp_QHS<1,0,0b0111,1, IIC_VABAD, IIC_VABAQ,
5169*9880d681SAndroid Build Coastguard Worker                             "vaba", "u", int_arm_neon_vabdu, add>;
5170*9880d681SAndroid Build Coastguard Worker
5171*9880d681SAndroid Build Coastguard Worker//   VABAL    : Vector Absolute Difference and Accumulate Long (Q += | D - D |)
5172*9880d681SAndroid Build Coastguard Workerdefm VABALs   : N3VLIntExtOp_QHS<0,1,0b0101,0, IIC_VABAD,
5173*9880d681SAndroid Build Coastguard Worker                                 "vabal", "s", int_arm_neon_vabds, zext, add>;
5174*9880d681SAndroid Build Coastguard Workerdefm VABALu   : N3VLIntExtOp_QHS<1,1,0b0101,0, IIC_VABAD,
5175*9880d681SAndroid Build Coastguard Worker                                 "vabal", "u", int_arm_neon_vabdu, zext, add>;
5176*9880d681SAndroid Build Coastguard Worker
5177*9880d681SAndroid Build Coastguard Worker// Vector Maximum and Minimum.
5178*9880d681SAndroid Build Coastguard Worker
5179*9880d681SAndroid Build Coastguard Worker//   VMAX     : Vector Maximum
5180*9880d681SAndroid Build Coastguard Workerdefm VMAXs    : N3VInt_QHS<0, 0, 0b0110, 0, N3RegFrm,
5181*9880d681SAndroid Build Coastguard Worker                           IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q,
5182*9880d681SAndroid Build Coastguard Worker                           "vmax", "s", smax, 1>;
5183*9880d681SAndroid Build Coastguard Workerdefm VMAXu    : N3VInt_QHS<1, 0, 0b0110, 0, N3RegFrm,
5184*9880d681SAndroid Build Coastguard Worker                           IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q,
5185*9880d681SAndroid Build Coastguard Worker                           "vmax", "u", umax, 1>;
5186*9880d681SAndroid Build Coastguard Workerdef  VMAXfd   : N3VDInt<0, 0, 0b00, 0b1111, 0, N3RegFrm, IIC_VBIND,
5187*9880d681SAndroid Build Coastguard Worker                        "vmax", "f32",
5188*9880d681SAndroid Build Coastguard Worker                        v2f32, v2f32, fmaxnan, 1>;
5189*9880d681SAndroid Build Coastguard Workerdef  VMAXfq   : N3VQInt<0, 0, 0b00, 0b1111, 0, N3RegFrm, IIC_VBINQ,
5190*9880d681SAndroid Build Coastguard Worker                        "vmax", "f32",
5191*9880d681SAndroid Build Coastguard Worker                        v4f32, v4f32, fmaxnan, 1>;
5192*9880d681SAndroid Build Coastguard Workerdef  VMAXhd   : N3VDInt<0, 0, 0b01, 0b1111, 0, N3RegFrm, IIC_VBIND,
5193*9880d681SAndroid Build Coastguard Worker                        "vmax", "f16",
5194*9880d681SAndroid Build Coastguard Worker                        v4f16, v4f16, fmaxnan, 1>,
5195*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
5196*9880d681SAndroid Build Coastguard Workerdef  VMAXhq   : N3VQInt<0, 0, 0b01, 0b1111, 0, N3RegFrm, IIC_VBINQ,
5197*9880d681SAndroid Build Coastguard Worker                        "vmax", "f16",
5198*9880d681SAndroid Build Coastguard Worker                        v8f16, v8f16, fmaxnan, 1>,
5199*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
5200*9880d681SAndroid Build Coastguard Worker
5201*9880d681SAndroid Build Coastguard Worker// VMAXNM
5202*9880d681SAndroid Build Coastguard Workerlet PostEncoderMethod = "NEONThumb2V8PostEncoder", DecoderNamespace = "v8NEON" in {
5203*9880d681SAndroid Build Coastguard Worker  def VMAXNMNDf  : N3VDIntnp<0b00110, 0b00, 0b1111, 0, 1,
5204*9880d681SAndroid Build Coastguard Worker                            N3RegFrm, NoItinerary, "vmaxnm", "f32",
5205*9880d681SAndroid Build Coastguard Worker                            v2f32, v2f32, fmaxnum, 1>,
5206*9880d681SAndroid Build Coastguard Worker                            Requires<[HasV8, HasNEON]>;
5207*9880d681SAndroid Build Coastguard Worker  def VMAXNMNQf  : N3VQIntnp<0b00110, 0b00, 0b1111, 1, 1,
5208*9880d681SAndroid Build Coastguard Worker                            N3RegFrm, NoItinerary, "vmaxnm", "f32",
5209*9880d681SAndroid Build Coastguard Worker                            v4f32, v4f32, fmaxnum, 1>,
5210*9880d681SAndroid Build Coastguard Worker                            Requires<[HasV8, HasNEON]>;
5211*9880d681SAndroid Build Coastguard Worker  def VMAXNMNDh  : N3VDIntnp<0b00110, 0b01, 0b1111, 0, 1,
5212*9880d681SAndroid Build Coastguard Worker                            N3RegFrm, NoItinerary, "vmaxnm", "f16",
5213*9880d681SAndroid Build Coastguard Worker                            v4f16, v4f16, fmaxnum, 1>,
5214*9880d681SAndroid Build Coastguard Worker                            Requires<[HasV8, HasNEON, HasFullFP16]>;
5215*9880d681SAndroid Build Coastguard Worker  def VMAXNMNQh  : N3VQIntnp<0b00110, 0b01, 0b1111, 1, 1,
5216*9880d681SAndroid Build Coastguard Worker                            N3RegFrm, NoItinerary, "vmaxnm", "f16",
5217*9880d681SAndroid Build Coastguard Worker                            v8f16, v8f16, fmaxnum, 1>,
5218*9880d681SAndroid Build Coastguard Worker                            Requires<[HasV8, HasNEON, HasFullFP16]>;
5219*9880d681SAndroid Build Coastguard Worker}
5220*9880d681SAndroid Build Coastguard Worker
5221*9880d681SAndroid Build Coastguard Worker//   VMIN     : Vector Minimum
5222*9880d681SAndroid Build Coastguard Workerdefm VMINs    : N3VInt_QHS<0, 0, 0b0110, 1, N3RegFrm,
5223*9880d681SAndroid Build Coastguard Worker                           IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q,
5224*9880d681SAndroid Build Coastguard Worker                           "vmin", "s", smin, 1>;
5225*9880d681SAndroid Build Coastguard Workerdefm VMINu    : N3VInt_QHS<1, 0, 0b0110, 1, N3RegFrm,
5226*9880d681SAndroid Build Coastguard Worker                           IIC_VSUBi4D, IIC_VSUBi4D, IIC_VSUBi4Q, IIC_VSUBi4Q,
5227*9880d681SAndroid Build Coastguard Worker                           "vmin", "u", umin, 1>;
5228*9880d681SAndroid Build Coastguard Workerdef  VMINfd   : N3VDInt<0, 0, 0b10, 0b1111, 0, N3RegFrm, IIC_VBIND,
5229*9880d681SAndroid Build Coastguard Worker                        "vmin", "f32",
5230*9880d681SAndroid Build Coastguard Worker                        v2f32, v2f32, fminnan, 1>;
5231*9880d681SAndroid Build Coastguard Workerdef  VMINfq   : N3VQInt<0, 0, 0b10, 0b1111, 0, N3RegFrm, IIC_VBINQ,
5232*9880d681SAndroid Build Coastguard Worker                        "vmin", "f32",
5233*9880d681SAndroid Build Coastguard Worker                        v4f32, v4f32, fminnan, 1>;
5234*9880d681SAndroid Build Coastguard Workerdef  VMINhd   : N3VDInt<0, 0, 0b11, 0b1111, 0, N3RegFrm, IIC_VBIND,
5235*9880d681SAndroid Build Coastguard Worker                        "vmin", "f16",
5236*9880d681SAndroid Build Coastguard Worker                        v4f16, v4f16, fminnan, 1>,
5237*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
5238*9880d681SAndroid Build Coastguard Workerdef  VMINhq   : N3VQInt<0, 0, 0b11, 0b1111, 0, N3RegFrm, IIC_VBINQ,
5239*9880d681SAndroid Build Coastguard Worker                        "vmin", "f16",
5240*9880d681SAndroid Build Coastguard Worker                        v8f16, v8f16, fminnan, 1>,
5241*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
5242*9880d681SAndroid Build Coastguard Worker
5243*9880d681SAndroid Build Coastguard Worker// VMINNM
5244*9880d681SAndroid Build Coastguard Workerlet PostEncoderMethod = "NEONThumb2V8PostEncoder", DecoderNamespace = "v8NEON" in {
5245*9880d681SAndroid Build Coastguard Worker  def VMINNMNDf  : N3VDIntnp<0b00110, 0b10, 0b1111, 0, 1,
5246*9880d681SAndroid Build Coastguard Worker                            N3RegFrm, NoItinerary, "vminnm", "f32",
5247*9880d681SAndroid Build Coastguard Worker                            v2f32, v2f32, fminnum, 1>,
5248*9880d681SAndroid Build Coastguard Worker                            Requires<[HasV8, HasNEON]>;
5249*9880d681SAndroid Build Coastguard Worker  def VMINNMNQf  : N3VQIntnp<0b00110, 0b10, 0b1111, 1, 1,
5250*9880d681SAndroid Build Coastguard Worker                            N3RegFrm, NoItinerary, "vminnm", "f32",
5251*9880d681SAndroid Build Coastguard Worker                            v4f32, v4f32, fminnum, 1>,
5252*9880d681SAndroid Build Coastguard Worker                            Requires<[HasV8, HasNEON]>;
5253*9880d681SAndroid Build Coastguard Worker  def VMINNMNDh  : N3VDIntnp<0b00110, 0b11, 0b1111, 0, 1,
5254*9880d681SAndroid Build Coastguard Worker                            N3RegFrm, NoItinerary, "vminnm", "f16",
5255*9880d681SAndroid Build Coastguard Worker                            v4f16, v4f16, fminnum, 1>,
5256*9880d681SAndroid Build Coastguard Worker                            Requires<[HasV8, HasNEON, HasFullFP16]>;
5257*9880d681SAndroid Build Coastguard Worker  def VMINNMNQh  : N3VQIntnp<0b00110, 0b11, 0b1111, 1, 1,
5258*9880d681SAndroid Build Coastguard Worker                            N3RegFrm, NoItinerary, "vminnm", "f16",
5259*9880d681SAndroid Build Coastguard Worker                            v8f16, v8f16, fminnum, 1>,
5260*9880d681SAndroid Build Coastguard Worker                            Requires<[HasV8, HasNEON, HasFullFP16]>;
5261*9880d681SAndroid Build Coastguard Worker}
5262*9880d681SAndroid Build Coastguard Worker
5263*9880d681SAndroid Build Coastguard Worker// Vector Pairwise Operations.
5264*9880d681SAndroid Build Coastguard Worker
5265*9880d681SAndroid Build Coastguard Worker//   VPADD    : Vector Pairwise Add
5266*9880d681SAndroid Build Coastguard Workerdef  VPADDi8  : N3VDInt<0, 0, 0b00, 0b1011, 1, N3RegFrm, IIC_VSHLiD,
5267*9880d681SAndroid Build Coastguard Worker                        "vpadd", "i8",
5268*9880d681SAndroid Build Coastguard Worker                        v8i8, v8i8, int_arm_neon_vpadd, 0>;
5269*9880d681SAndroid Build Coastguard Workerdef  VPADDi16 : N3VDInt<0, 0, 0b01, 0b1011, 1, N3RegFrm, IIC_VSHLiD,
5270*9880d681SAndroid Build Coastguard Worker                        "vpadd", "i16",
5271*9880d681SAndroid Build Coastguard Worker                        v4i16, v4i16, int_arm_neon_vpadd, 0>;
5272*9880d681SAndroid Build Coastguard Workerdef  VPADDi32 : N3VDInt<0, 0, 0b10, 0b1011, 1, N3RegFrm, IIC_VSHLiD,
5273*9880d681SAndroid Build Coastguard Worker                        "vpadd", "i32",
5274*9880d681SAndroid Build Coastguard Worker                        v2i32, v2i32, int_arm_neon_vpadd, 0>;
5275*9880d681SAndroid Build Coastguard Workerdef  VPADDf   : N3VDInt<1, 0, 0b00, 0b1101, 0, N3RegFrm,
5276*9880d681SAndroid Build Coastguard Worker                        IIC_VPBIND, "vpadd", "f32",
5277*9880d681SAndroid Build Coastguard Worker                        v2f32, v2f32, int_arm_neon_vpadd, 0>;
5278*9880d681SAndroid Build Coastguard Workerdef  VPADDh   : N3VDInt<1, 0, 0b01, 0b1101, 0, N3RegFrm,
5279*9880d681SAndroid Build Coastguard Worker                        IIC_VPBIND, "vpadd", "f16",
5280*9880d681SAndroid Build Coastguard Worker                        v4f16, v4f16, int_arm_neon_vpadd, 0>,
5281*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
5282*9880d681SAndroid Build Coastguard Worker
5283*9880d681SAndroid Build Coastguard Worker//   VPADDL   : Vector Pairwise Add Long
5284*9880d681SAndroid Build Coastguard Workerdefm VPADDLs  : N2VPLInt_QHS<0b11, 0b11, 0b00, 0b00100, 0, "vpaddl", "s",
5285*9880d681SAndroid Build Coastguard Worker                             int_arm_neon_vpaddls>;
5286*9880d681SAndroid Build Coastguard Workerdefm VPADDLu  : N2VPLInt_QHS<0b11, 0b11, 0b00, 0b00101, 0, "vpaddl", "u",
5287*9880d681SAndroid Build Coastguard Worker                             int_arm_neon_vpaddlu>;
5288*9880d681SAndroid Build Coastguard Worker
5289*9880d681SAndroid Build Coastguard Worker//   VPADAL   : Vector Pairwise Add and Accumulate Long
5290*9880d681SAndroid Build Coastguard Workerdefm VPADALs  : N2VPLInt2_QHS<0b11, 0b11, 0b00, 0b01100, 0, "vpadal", "s",
5291*9880d681SAndroid Build Coastguard Worker                              int_arm_neon_vpadals>;
5292*9880d681SAndroid Build Coastguard Workerdefm VPADALu  : N2VPLInt2_QHS<0b11, 0b11, 0b00, 0b01101, 0, "vpadal", "u",
5293*9880d681SAndroid Build Coastguard Worker                              int_arm_neon_vpadalu>;
5294*9880d681SAndroid Build Coastguard Worker
5295*9880d681SAndroid Build Coastguard Worker//   VPMAX    : Vector Pairwise Maximum
5296*9880d681SAndroid Build Coastguard Workerdef  VPMAXs8  : N3VDInt<0, 0, 0b00, 0b1010, 0, N3RegFrm, IIC_VSUBi4D, "vpmax",
5297*9880d681SAndroid Build Coastguard Worker                        "s8", v8i8, v8i8, int_arm_neon_vpmaxs, 0>;
5298*9880d681SAndroid Build Coastguard Workerdef  VPMAXs16 : N3VDInt<0, 0, 0b01, 0b1010, 0, N3RegFrm, IIC_VSUBi4D, "vpmax",
5299*9880d681SAndroid Build Coastguard Worker                        "s16", v4i16, v4i16, int_arm_neon_vpmaxs, 0>;
5300*9880d681SAndroid Build Coastguard Workerdef  VPMAXs32 : N3VDInt<0, 0, 0b10, 0b1010, 0, N3RegFrm, IIC_VSUBi4D, "vpmax",
5301*9880d681SAndroid Build Coastguard Worker                        "s32", v2i32, v2i32, int_arm_neon_vpmaxs, 0>;
5302*9880d681SAndroid Build Coastguard Workerdef  VPMAXu8  : N3VDInt<1, 0, 0b00, 0b1010, 0, N3RegFrm, IIC_VSUBi4D, "vpmax",
5303*9880d681SAndroid Build Coastguard Worker                        "u8", v8i8, v8i8, int_arm_neon_vpmaxu, 0>;
5304*9880d681SAndroid Build Coastguard Workerdef  VPMAXu16 : N3VDInt<1, 0, 0b01, 0b1010, 0, N3RegFrm, IIC_VSUBi4D, "vpmax",
5305*9880d681SAndroid Build Coastguard Worker                        "u16", v4i16, v4i16, int_arm_neon_vpmaxu, 0>;
5306*9880d681SAndroid Build Coastguard Workerdef  VPMAXu32 : N3VDInt<1, 0, 0b10, 0b1010, 0, N3RegFrm, IIC_VSUBi4D, "vpmax",
5307*9880d681SAndroid Build Coastguard Worker                        "u32", v2i32, v2i32, int_arm_neon_vpmaxu, 0>;
5308*9880d681SAndroid Build Coastguard Workerdef  VPMAXf   : N3VDInt<1, 0, 0b00, 0b1111, 0, N3RegFrm, IIC_VPBIND, "vpmax",
5309*9880d681SAndroid Build Coastguard Worker                        "f32", v2f32, v2f32, int_arm_neon_vpmaxs, 0>;
5310*9880d681SAndroid Build Coastguard Workerdef  VPMAXh   : N3VDInt<1, 0, 0b01, 0b1111, 0, N3RegFrm, IIC_VPBIND, "vpmax",
5311*9880d681SAndroid Build Coastguard Worker                        "f16", v4f16, v4f16, int_arm_neon_vpmaxs, 0>,
5312*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
5313*9880d681SAndroid Build Coastguard Worker
5314*9880d681SAndroid Build Coastguard Worker//   VPMIN    : Vector Pairwise Minimum
5315*9880d681SAndroid Build Coastguard Workerdef  VPMINs8  : N3VDInt<0, 0, 0b00, 0b1010, 1, N3RegFrm, IIC_VSUBi4D, "vpmin",
5316*9880d681SAndroid Build Coastguard Worker                        "s8", v8i8, v8i8, int_arm_neon_vpmins, 0>;
5317*9880d681SAndroid Build Coastguard Workerdef  VPMINs16 : N3VDInt<0, 0, 0b01, 0b1010, 1, N3RegFrm, IIC_VSUBi4D, "vpmin",
5318*9880d681SAndroid Build Coastguard Worker                        "s16", v4i16, v4i16, int_arm_neon_vpmins, 0>;
5319*9880d681SAndroid Build Coastguard Workerdef  VPMINs32 : N3VDInt<0, 0, 0b10, 0b1010, 1, N3RegFrm, IIC_VSUBi4D, "vpmin",
5320*9880d681SAndroid Build Coastguard Worker                        "s32", v2i32, v2i32, int_arm_neon_vpmins, 0>;
5321*9880d681SAndroid Build Coastguard Workerdef  VPMINu8  : N3VDInt<1, 0, 0b00, 0b1010, 1, N3RegFrm, IIC_VSUBi4D, "vpmin",
5322*9880d681SAndroid Build Coastguard Worker                        "u8", v8i8, v8i8, int_arm_neon_vpminu, 0>;
5323*9880d681SAndroid Build Coastguard Workerdef  VPMINu16 : N3VDInt<1, 0, 0b01, 0b1010, 1, N3RegFrm, IIC_VSUBi4D, "vpmin",
5324*9880d681SAndroid Build Coastguard Worker                        "u16", v4i16, v4i16, int_arm_neon_vpminu, 0>;
5325*9880d681SAndroid Build Coastguard Workerdef  VPMINu32 : N3VDInt<1, 0, 0b10, 0b1010, 1, N3RegFrm, IIC_VSUBi4D, "vpmin",
5326*9880d681SAndroid Build Coastguard Worker                        "u32", v2i32, v2i32, int_arm_neon_vpminu, 0>;
5327*9880d681SAndroid Build Coastguard Workerdef  VPMINf   : N3VDInt<1, 0, 0b10, 0b1111, 0, N3RegFrm, IIC_VPBIND, "vpmin",
5328*9880d681SAndroid Build Coastguard Worker                        "f32", v2f32, v2f32, int_arm_neon_vpmins, 0>;
5329*9880d681SAndroid Build Coastguard Workerdef  VPMINh   : N3VDInt<1, 0, 0b11, 0b1111, 0, N3RegFrm, IIC_VPBIND, "vpmin",
5330*9880d681SAndroid Build Coastguard Worker                        "f16", v4f16, v4f16, int_arm_neon_vpmins, 0>,
5331*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
5332*9880d681SAndroid Build Coastguard Worker
5333*9880d681SAndroid Build Coastguard Worker// Vector Reciprocal and Reciprocal Square Root Estimate and Step.
5334*9880d681SAndroid Build Coastguard Worker
5335*9880d681SAndroid Build Coastguard Worker//   VRECPE   : Vector Reciprocal Estimate
5336*9880d681SAndroid Build Coastguard Workerdef  VRECPEd  : N2VDInt<0b11, 0b11, 0b10, 0b11, 0b01000, 0,
5337*9880d681SAndroid Build Coastguard Worker                        IIC_VUNAD, "vrecpe", "u32",
5338*9880d681SAndroid Build Coastguard Worker                        v2i32, v2i32, int_arm_neon_vrecpe>;
5339*9880d681SAndroid Build Coastguard Workerdef  VRECPEq  : N2VQInt<0b11, 0b11, 0b10, 0b11, 0b01000, 0,
5340*9880d681SAndroid Build Coastguard Worker                        IIC_VUNAQ, "vrecpe", "u32",
5341*9880d681SAndroid Build Coastguard Worker                        v4i32, v4i32, int_arm_neon_vrecpe>;
5342*9880d681SAndroid Build Coastguard Workerdef  VRECPEfd : N2VDInt<0b11, 0b11, 0b10, 0b11, 0b01010, 0,
5343*9880d681SAndroid Build Coastguard Worker                        IIC_VUNAD, "vrecpe", "f32",
5344*9880d681SAndroid Build Coastguard Worker                        v2f32, v2f32, int_arm_neon_vrecpe>;
5345*9880d681SAndroid Build Coastguard Workerdef  VRECPEfq : N2VQInt<0b11, 0b11, 0b10, 0b11, 0b01010, 0,
5346*9880d681SAndroid Build Coastguard Worker                        IIC_VUNAQ, "vrecpe", "f32",
5347*9880d681SAndroid Build Coastguard Worker                        v4f32, v4f32, int_arm_neon_vrecpe>;
5348*9880d681SAndroid Build Coastguard Workerdef  VRECPEhd : N2VDInt<0b11, 0b11, 0b01, 0b11, 0b01010, 0,
5349*9880d681SAndroid Build Coastguard Worker                        IIC_VUNAD, "vrecpe", "f16",
5350*9880d681SAndroid Build Coastguard Worker                        v4f16, v4f16, int_arm_neon_vrecpe>,
5351*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
5352*9880d681SAndroid Build Coastguard Workerdef  VRECPEhq : N2VQInt<0b11, 0b11, 0b01, 0b11, 0b01010, 0,
5353*9880d681SAndroid Build Coastguard Worker                        IIC_VUNAQ, "vrecpe", "f16",
5354*9880d681SAndroid Build Coastguard Worker                        v8f16, v8f16, int_arm_neon_vrecpe>,
5355*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
5356*9880d681SAndroid Build Coastguard Worker
5357*9880d681SAndroid Build Coastguard Worker//   VRECPS   : Vector Reciprocal Step
5358*9880d681SAndroid Build Coastguard Workerdef  VRECPSfd : N3VDInt<0, 0, 0b00, 0b1111, 1, N3RegFrm,
5359*9880d681SAndroid Build Coastguard Worker                        IIC_VRECSD, "vrecps", "f32",
5360*9880d681SAndroid Build Coastguard Worker                        v2f32, v2f32, int_arm_neon_vrecps, 1>;
5361*9880d681SAndroid Build Coastguard Workerdef  VRECPSfq : N3VQInt<0, 0, 0b00, 0b1111, 1, N3RegFrm,
5362*9880d681SAndroid Build Coastguard Worker                        IIC_VRECSQ, "vrecps", "f32",
5363*9880d681SAndroid Build Coastguard Worker                        v4f32, v4f32, int_arm_neon_vrecps, 1>;
5364*9880d681SAndroid Build Coastguard Workerdef  VRECPShd : N3VDInt<0, 0, 0b01, 0b1111, 1, N3RegFrm,
5365*9880d681SAndroid Build Coastguard Worker                        IIC_VRECSD, "vrecps", "f16",
5366*9880d681SAndroid Build Coastguard Worker                        v4f16, v4f16, int_arm_neon_vrecps, 1>,
5367*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
5368*9880d681SAndroid Build Coastguard Workerdef  VRECPShq : N3VQInt<0, 0, 0b01, 0b1111, 1, N3RegFrm,
5369*9880d681SAndroid Build Coastguard Worker                        IIC_VRECSQ, "vrecps", "f16",
5370*9880d681SAndroid Build Coastguard Worker                        v8f16, v8f16, int_arm_neon_vrecps, 1>,
5371*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
5372*9880d681SAndroid Build Coastguard Worker
5373*9880d681SAndroid Build Coastguard Worker//   VRSQRTE  : Vector Reciprocal Square Root Estimate
5374*9880d681SAndroid Build Coastguard Workerdef  VRSQRTEd  : N2VDInt<0b11, 0b11, 0b10, 0b11, 0b01001, 0,
5375*9880d681SAndroid Build Coastguard Worker                         IIC_VUNAD, "vrsqrte", "u32",
5376*9880d681SAndroid Build Coastguard Worker                         v2i32, v2i32, int_arm_neon_vrsqrte>;
5377*9880d681SAndroid Build Coastguard Workerdef  VRSQRTEq  : N2VQInt<0b11, 0b11, 0b10, 0b11, 0b01001, 0,
5378*9880d681SAndroid Build Coastguard Worker                         IIC_VUNAQ, "vrsqrte", "u32",
5379*9880d681SAndroid Build Coastguard Worker                         v4i32, v4i32, int_arm_neon_vrsqrte>;
5380*9880d681SAndroid Build Coastguard Workerdef  VRSQRTEfd : N2VDInt<0b11, 0b11, 0b10, 0b11, 0b01011, 0,
5381*9880d681SAndroid Build Coastguard Worker                         IIC_VUNAD, "vrsqrte", "f32",
5382*9880d681SAndroid Build Coastguard Worker                         v2f32, v2f32, int_arm_neon_vrsqrte>;
5383*9880d681SAndroid Build Coastguard Workerdef  VRSQRTEfq : N2VQInt<0b11, 0b11, 0b10, 0b11, 0b01011, 0,
5384*9880d681SAndroid Build Coastguard Worker                         IIC_VUNAQ, "vrsqrte", "f32",
5385*9880d681SAndroid Build Coastguard Worker                         v4f32, v4f32, int_arm_neon_vrsqrte>;
5386*9880d681SAndroid Build Coastguard Workerdef  VRSQRTEhd : N2VDInt<0b11, 0b11, 0b01, 0b11, 0b01011, 0,
5387*9880d681SAndroid Build Coastguard Worker                         IIC_VUNAD, "vrsqrte", "f16",
5388*9880d681SAndroid Build Coastguard Worker                         v4f16, v4f16, int_arm_neon_vrsqrte>,
5389*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
5390*9880d681SAndroid Build Coastguard Workerdef  VRSQRTEhq : N2VQInt<0b11, 0b11, 0b01, 0b11, 0b01011, 0,
5391*9880d681SAndroid Build Coastguard Worker                         IIC_VUNAQ, "vrsqrte", "f16",
5392*9880d681SAndroid Build Coastguard Worker                         v8f16, v8f16, int_arm_neon_vrsqrte>,
5393*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
5394*9880d681SAndroid Build Coastguard Worker
5395*9880d681SAndroid Build Coastguard Worker//   VRSQRTS  : Vector Reciprocal Square Root Step
5396*9880d681SAndroid Build Coastguard Workerdef VRSQRTSfd : N3VDInt<0, 0, 0b10, 0b1111, 1, N3RegFrm,
5397*9880d681SAndroid Build Coastguard Worker                        IIC_VRECSD, "vrsqrts", "f32",
5398*9880d681SAndroid Build Coastguard Worker                        v2f32, v2f32, int_arm_neon_vrsqrts, 1>;
5399*9880d681SAndroid Build Coastguard Workerdef VRSQRTSfq : N3VQInt<0, 0, 0b10, 0b1111, 1, N3RegFrm,
5400*9880d681SAndroid Build Coastguard Worker                        IIC_VRECSQ, "vrsqrts", "f32",
5401*9880d681SAndroid Build Coastguard Worker                        v4f32, v4f32, int_arm_neon_vrsqrts, 1>;
5402*9880d681SAndroid Build Coastguard Workerdef VRSQRTShd : N3VDInt<0, 0, 0b11, 0b1111, 1, N3RegFrm,
5403*9880d681SAndroid Build Coastguard Worker                        IIC_VRECSD, "vrsqrts", "f16",
5404*9880d681SAndroid Build Coastguard Worker                        v4f16, v4f16, int_arm_neon_vrsqrts, 1>,
5405*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
5406*9880d681SAndroid Build Coastguard Workerdef VRSQRTShq : N3VQInt<0, 0, 0b11, 0b1111, 1, N3RegFrm,
5407*9880d681SAndroid Build Coastguard Worker                        IIC_VRECSQ, "vrsqrts", "f16",
5408*9880d681SAndroid Build Coastguard Worker                        v8f16, v8f16, int_arm_neon_vrsqrts, 1>,
5409*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
5410*9880d681SAndroid Build Coastguard Worker
5411*9880d681SAndroid Build Coastguard Worker// Vector Shifts.
5412*9880d681SAndroid Build Coastguard Worker
5413*9880d681SAndroid Build Coastguard Worker//   VSHL     : Vector Shift
5414*9880d681SAndroid Build Coastguard Workerdefm VSHLs    : N3VInt_QHSDSh<0, 0, 0b0100, 0, N3RegVShFrm,
5415*9880d681SAndroid Build Coastguard Worker                            IIC_VSHLiD, IIC_VSHLiD, IIC_VSHLiQ, IIC_VSHLiQ,
5416*9880d681SAndroid Build Coastguard Worker                            "vshl", "s", int_arm_neon_vshifts>;
5417*9880d681SAndroid Build Coastguard Workerdefm VSHLu    : N3VInt_QHSDSh<1, 0, 0b0100, 0, N3RegVShFrm,
5418*9880d681SAndroid Build Coastguard Worker                            IIC_VSHLiD, IIC_VSHLiD, IIC_VSHLiQ, IIC_VSHLiQ,
5419*9880d681SAndroid Build Coastguard Worker                            "vshl", "u", int_arm_neon_vshiftu>;
5420*9880d681SAndroid Build Coastguard Worker
5421*9880d681SAndroid Build Coastguard Worker//   VSHL     : Vector Shift Left (Immediate)
5422*9880d681SAndroid Build Coastguard Workerdefm VSHLi    : N2VShL_QHSD<0, 1, 0b0101, 1, IIC_VSHLiD, "vshl", "i", NEONvshl>;
5423*9880d681SAndroid Build Coastguard Worker
5424*9880d681SAndroid Build Coastguard Worker//   VSHR     : Vector Shift Right (Immediate)
5425*9880d681SAndroid Build Coastguard Workerdefm VSHRs    : N2VShR_QHSD<0, 1, 0b0000, 1, IIC_VSHLiD, "vshr", "s", "VSHRs",
5426*9880d681SAndroid Build Coastguard Worker                            NEONvshrs>;
5427*9880d681SAndroid Build Coastguard Workerdefm VSHRu    : N2VShR_QHSD<1, 1, 0b0000, 1, IIC_VSHLiD, "vshr", "u", "VSHRu",
5428*9880d681SAndroid Build Coastguard Worker                            NEONvshru>;
5429*9880d681SAndroid Build Coastguard Worker
5430*9880d681SAndroid Build Coastguard Worker//   VSHLL    : Vector Shift Left Long
5431*9880d681SAndroid Build Coastguard Workerdefm VSHLLs   : N2VLSh_QHS<0, 1, 0b1010, 0, 0, 1, "vshll", "s",
5432*9880d681SAndroid Build Coastguard Worker  PatFrag<(ops node:$LHS, node:$RHS), (NEONvshl (sext node:$LHS), node:$RHS)>>;
5433*9880d681SAndroid Build Coastguard Workerdefm VSHLLu   : N2VLSh_QHS<1, 1, 0b1010, 0, 0, 1, "vshll", "u",
5434*9880d681SAndroid Build Coastguard Worker  PatFrag<(ops node:$LHS, node:$RHS), (NEONvshl (zext node:$LHS), node:$RHS)>>;
5435*9880d681SAndroid Build Coastguard Worker
5436*9880d681SAndroid Build Coastguard Worker//   VSHLL    : Vector Shift Left Long (with maximum shift count)
5437*9880d681SAndroid Build Coastguard Workerclass N2VLShMax<bit op24, bit op23, bits<6> op21_16, bits<4> op11_8, bit op7,
5438*9880d681SAndroid Build Coastguard Worker                bit op6, bit op4, string OpcodeStr, string Dt, ValueType ResTy,
5439*9880d681SAndroid Build Coastguard Worker                ValueType OpTy, Operand ImmTy>
5440*9880d681SAndroid Build Coastguard Worker  : N2VLSh<op24, op23, op11_8, op7, op6, op4, OpcodeStr, Dt,
5441*9880d681SAndroid Build Coastguard Worker           ResTy, OpTy, ImmTy, null_frag> {
5442*9880d681SAndroid Build Coastguard Worker  let Inst{21-16} = op21_16;
5443*9880d681SAndroid Build Coastguard Worker  let DecoderMethod = "DecodeVSHLMaxInstruction";
5444*9880d681SAndroid Build Coastguard Worker}
5445*9880d681SAndroid Build Coastguard Workerdef  VSHLLi8  : N2VLShMax<1, 1, 0b110010, 0b0011, 0, 0, 0, "vshll", "i8",
5446*9880d681SAndroid Build Coastguard Worker                          v8i16, v8i8, imm8>;
5447*9880d681SAndroid Build Coastguard Workerdef  VSHLLi16 : N2VLShMax<1, 1, 0b110110, 0b0011, 0, 0, 0, "vshll", "i16",
5448*9880d681SAndroid Build Coastguard Worker                          v4i32, v4i16, imm16>;
5449*9880d681SAndroid Build Coastguard Workerdef  VSHLLi32 : N2VLShMax<1, 1, 0b111010, 0b0011, 0, 0, 0, "vshll", "i32",
5450*9880d681SAndroid Build Coastguard Worker                          v2i64, v2i32, imm32>;
5451*9880d681SAndroid Build Coastguard Worker
5452*9880d681SAndroid Build Coastguard Workerdef : Pat<(v8i16 (NEONvshl (zext (v8i8 DPR:$Rn)), (i32 8))),
5453*9880d681SAndroid Build Coastguard Worker          (VSHLLi8 DPR:$Rn, 8)>;
5454*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i32 (NEONvshl (zext (v4i16 DPR:$Rn)), (i32 16))),
5455*9880d681SAndroid Build Coastguard Worker          (VSHLLi16 DPR:$Rn, 16)>;
5456*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2i64 (NEONvshl (zext (v2i32 DPR:$Rn)), (i32 32))),
5457*9880d681SAndroid Build Coastguard Worker          (VSHLLi32 DPR:$Rn, 32)>;
5458*9880d681SAndroid Build Coastguard Workerdef : Pat<(v8i16 (NEONvshl (sext (v8i8 DPR:$Rn)), (i32 8))),
5459*9880d681SAndroid Build Coastguard Worker          (VSHLLi8 DPR:$Rn, 8)>;
5460*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i32 (NEONvshl (sext (v4i16 DPR:$Rn)), (i32 16))),
5461*9880d681SAndroid Build Coastguard Worker          (VSHLLi16 DPR:$Rn, 16)>;
5462*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2i64 (NEONvshl (sext (v2i32 DPR:$Rn)), (i32 32))),
5463*9880d681SAndroid Build Coastguard Worker          (VSHLLi32 DPR:$Rn, 32)>;
5464*9880d681SAndroid Build Coastguard Worker
5465*9880d681SAndroid Build Coastguard Worker//   VSHRN    : Vector Shift Right and Narrow
5466*9880d681SAndroid Build Coastguard Workerdefm VSHRN    : N2VNSh_HSD<0,1,0b1000,0,0,1, IIC_VSHLiD, "vshrn", "i",
5467*9880d681SAndroid Build Coastguard Worker                           PatFrag<(ops node:$Rn, node:$amt),
5468*9880d681SAndroid Build Coastguard Worker                                   (trunc (NEONvshrs node:$Rn, node:$amt))>>;
5469*9880d681SAndroid Build Coastguard Worker
5470*9880d681SAndroid Build Coastguard Workerdef : Pat<(v8i8 (trunc (NEONvshru (v8i16 QPR:$Vn), shr_imm8:$amt))),
5471*9880d681SAndroid Build Coastguard Worker          (VSHRNv8i8 QPR:$Vn, shr_imm8:$amt)>;
5472*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i16 (trunc (NEONvshru (v4i32 QPR:$Vn), shr_imm16:$amt))),
5473*9880d681SAndroid Build Coastguard Worker          (VSHRNv4i16 QPR:$Vn, shr_imm16:$amt)>;
5474*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2i32 (trunc (NEONvshru (v2i64 QPR:$Vn), shr_imm32:$amt))),
5475*9880d681SAndroid Build Coastguard Worker          (VSHRNv2i32 QPR:$Vn, shr_imm32:$amt)>;
5476*9880d681SAndroid Build Coastguard Worker
5477*9880d681SAndroid Build Coastguard Worker//   VRSHL    : Vector Rounding Shift
5478*9880d681SAndroid Build Coastguard Workerdefm VRSHLs   : N3VInt_QHSDSh<0, 0, 0b0101, 0, N3RegVShFrm,
5479*9880d681SAndroid Build Coastguard Worker                            IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, IIC_VSHLi4Q,
5480*9880d681SAndroid Build Coastguard Worker                            "vrshl", "s", int_arm_neon_vrshifts>;
5481*9880d681SAndroid Build Coastguard Workerdefm VRSHLu   : N3VInt_QHSDSh<1, 0, 0b0101, 0, N3RegVShFrm,
5482*9880d681SAndroid Build Coastguard Worker                            IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, IIC_VSHLi4Q,
5483*9880d681SAndroid Build Coastguard Worker                            "vrshl", "u", int_arm_neon_vrshiftu>;
5484*9880d681SAndroid Build Coastguard Worker//   VRSHR    : Vector Rounding Shift Right
5485*9880d681SAndroid Build Coastguard Workerdefm VRSHRs   : N2VShR_QHSD<0,1,0b0010,1, IIC_VSHLi4D, "vrshr", "s", "VRSHRs",
5486*9880d681SAndroid Build Coastguard Worker                            NEONvrshrs>;
5487*9880d681SAndroid Build Coastguard Workerdefm VRSHRu   : N2VShR_QHSD<1,1,0b0010,1, IIC_VSHLi4D, "vrshr", "u", "VRSHRu",
5488*9880d681SAndroid Build Coastguard Worker                            NEONvrshru>;
5489*9880d681SAndroid Build Coastguard Worker
5490*9880d681SAndroid Build Coastguard Worker//   VRSHRN   : Vector Rounding Shift Right and Narrow
5491*9880d681SAndroid Build Coastguard Workerdefm VRSHRN   : N2VNSh_HSD<0, 1, 0b1000, 0, 1, 1, IIC_VSHLi4D, "vrshrn", "i",
5492*9880d681SAndroid Build Coastguard Worker                           NEONvrshrn>;
5493*9880d681SAndroid Build Coastguard Worker
5494*9880d681SAndroid Build Coastguard Worker//   VQSHL    : Vector Saturating Shift
5495*9880d681SAndroid Build Coastguard Workerdefm VQSHLs   : N3VInt_QHSDSh<0, 0, 0b0100, 1, N3RegVShFrm,
5496*9880d681SAndroid Build Coastguard Worker                            IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, IIC_VSHLi4Q,
5497*9880d681SAndroid Build Coastguard Worker                            "vqshl", "s", int_arm_neon_vqshifts>;
5498*9880d681SAndroid Build Coastguard Workerdefm VQSHLu   : N3VInt_QHSDSh<1, 0, 0b0100, 1, N3RegVShFrm,
5499*9880d681SAndroid Build Coastguard Worker                            IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, IIC_VSHLi4Q,
5500*9880d681SAndroid Build Coastguard Worker                            "vqshl", "u", int_arm_neon_vqshiftu>;
5501*9880d681SAndroid Build Coastguard Worker//   VQSHL    : Vector Saturating Shift Left (Immediate)
5502*9880d681SAndroid Build Coastguard Workerdefm VQSHLsi  : N2VShL_QHSD<0,1,0b0111,1, IIC_VSHLi4D, "vqshl", "s",NEONvqshls>;
5503*9880d681SAndroid Build Coastguard Workerdefm VQSHLui  : N2VShL_QHSD<1,1,0b0111,1, IIC_VSHLi4D, "vqshl", "u",NEONvqshlu>;
5504*9880d681SAndroid Build Coastguard Worker
5505*9880d681SAndroid Build Coastguard Worker//   VQSHLU   : Vector Saturating Shift Left (Immediate, Unsigned)
5506*9880d681SAndroid Build Coastguard Workerdefm VQSHLsu  : N2VShL_QHSD<1,1,0b0110,1, IIC_VSHLi4D,"vqshlu","s",NEONvqshlsu>;
5507*9880d681SAndroid Build Coastguard Worker
5508*9880d681SAndroid Build Coastguard Worker//   VQSHRN   : Vector Saturating Shift Right and Narrow
5509*9880d681SAndroid Build Coastguard Workerdefm VQSHRNs  : N2VNSh_HSD<0, 1, 0b1001, 0, 0, 1, IIC_VSHLi4D, "vqshrn", "s",
5510*9880d681SAndroid Build Coastguard Worker                           NEONvqshrns>;
5511*9880d681SAndroid Build Coastguard Workerdefm VQSHRNu  : N2VNSh_HSD<1, 1, 0b1001, 0, 0, 1, IIC_VSHLi4D, "vqshrn", "u",
5512*9880d681SAndroid Build Coastguard Worker                           NEONvqshrnu>;
5513*9880d681SAndroid Build Coastguard Worker
5514*9880d681SAndroid Build Coastguard Worker//   VQSHRUN  : Vector Saturating Shift Right and Narrow (Unsigned)
5515*9880d681SAndroid Build Coastguard Workerdefm VQSHRUN  : N2VNSh_HSD<1, 1, 0b1000, 0, 0, 1, IIC_VSHLi4D, "vqshrun", "s",
5516*9880d681SAndroid Build Coastguard Worker                           NEONvqshrnsu>;
5517*9880d681SAndroid Build Coastguard Worker
5518*9880d681SAndroid Build Coastguard Worker//   VQRSHL   : Vector Saturating Rounding Shift
5519*9880d681SAndroid Build Coastguard Workerdefm VQRSHLs  : N3VInt_QHSDSh<0, 0, 0b0101, 1, N3RegVShFrm,
5520*9880d681SAndroid Build Coastguard Worker                            IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, IIC_VSHLi4Q,
5521*9880d681SAndroid Build Coastguard Worker                            "vqrshl", "s", int_arm_neon_vqrshifts>;
5522*9880d681SAndroid Build Coastguard Workerdefm VQRSHLu  : N3VInt_QHSDSh<1, 0, 0b0101, 1, N3RegVShFrm,
5523*9880d681SAndroid Build Coastguard Worker                            IIC_VSHLi4D, IIC_VSHLi4D, IIC_VSHLi4Q, IIC_VSHLi4Q,
5524*9880d681SAndroid Build Coastguard Worker                            "vqrshl", "u", int_arm_neon_vqrshiftu>;
5525*9880d681SAndroid Build Coastguard Worker
5526*9880d681SAndroid Build Coastguard Worker//   VQRSHRN  : Vector Saturating Rounding Shift Right and Narrow
5527*9880d681SAndroid Build Coastguard Workerdefm VQRSHRNs : N2VNSh_HSD<0, 1, 0b1001, 0, 1, 1, IIC_VSHLi4D, "vqrshrn", "s",
5528*9880d681SAndroid Build Coastguard Worker                           NEONvqrshrns>;
5529*9880d681SAndroid Build Coastguard Workerdefm VQRSHRNu : N2VNSh_HSD<1, 1, 0b1001, 0, 1, 1, IIC_VSHLi4D, "vqrshrn", "u",
5530*9880d681SAndroid Build Coastguard Worker                           NEONvqrshrnu>;
5531*9880d681SAndroid Build Coastguard Worker
5532*9880d681SAndroid Build Coastguard Worker//   VQRSHRUN : Vector Saturating Rounding Shift Right and Narrow (Unsigned)
5533*9880d681SAndroid Build Coastguard Workerdefm VQRSHRUN : N2VNSh_HSD<1, 1, 0b1000, 0, 1, 1, IIC_VSHLi4D, "vqrshrun", "s",
5534*9880d681SAndroid Build Coastguard Worker                           NEONvqrshrnsu>;
5535*9880d681SAndroid Build Coastguard Worker
5536*9880d681SAndroid Build Coastguard Worker//   VSRA     : Vector Shift Right and Accumulate
5537*9880d681SAndroid Build Coastguard Workerdefm VSRAs    : N2VShAdd_QHSD<0, 1, 0b0001, 1, "vsra", "s", NEONvshrs>;
5538*9880d681SAndroid Build Coastguard Workerdefm VSRAu    : N2VShAdd_QHSD<1, 1, 0b0001, 1, "vsra", "u", NEONvshru>;
5539*9880d681SAndroid Build Coastguard Worker//   VRSRA    : Vector Rounding Shift Right and Accumulate
5540*9880d681SAndroid Build Coastguard Workerdefm VRSRAs   : N2VShAdd_QHSD<0, 1, 0b0011, 1, "vrsra", "s", NEONvrshrs>;
5541*9880d681SAndroid Build Coastguard Workerdefm VRSRAu   : N2VShAdd_QHSD<1, 1, 0b0011, 1, "vrsra", "u", NEONvrshru>;
5542*9880d681SAndroid Build Coastguard Worker
5543*9880d681SAndroid Build Coastguard Worker//   VSLI     : Vector Shift Left and Insert
5544*9880d681SAndroid Build Coastguard Workerdefm VSLI     : N2VShInsL_QHSD<1, 1, 0b0101, 1, "vsli">;
5545*9880d681SAndroid Build Coastguard Worker
5546*9880d681SAndroid Build Coastguard Worker//   VSRI     : Vector Shift Right and Insert
5547*9880d681SAndroid Build Coastguard Workerdefm VSRI     : N2VShInsR_QHSD<1, 1, 0b0100, 1, "vsri">;
5548*9880d681SAndroid Build Coastguard Worker
5549*9880d681SAndroid Build Coastguard Worker// Vector Absolute and Saturating Absolute.
5550*9880d681SAndroid Build Coastguard Worker
5551*9880d681SAndroid Build Coastguard Worker//   VABS     : Vector Absolute Value
5552*9880d681SAndroid Build Coastguard Workerdefm VABS     : N2VInt_QHS<0b11, 0b11, 0b01, 0b00110, 0,
5553*9880d681SAndroid Build Coastguard Worker                           IIC_VUNAiD, IIC_VUNAiQ, "vabs", "s",
5554*9880d681SAndroid Build Coastguard Worker                           int_arm_neon_vabs>;
5555*9880d681SAndroid Build Coastguard Workerdef  VABSfd   : N2VD<0b11, 0b11, 0b10, 0b01, 0b01110, 0,
5556*9880d681SAndroid Build Coastguard Worker                     "vabs", "f32",
5557*9880d681SAndroid Build Coastguard Worker                     v2f32, v2f32, fabs>;
5558*9880d681SAndroid Build Coastguard Workerdef  VABSfq   : N2VQ<0b11, 0b11, 0b10, 0b01, 0b01110, 0,
5559*9880d681SAndroid Build Coastguard Worker                     "vabs", "f32",
5560*9880d681SAndroid Build Coastguard Worker                      v4f32, v4f32, fabs>;
5561*9880d681SAndroid Build Coastguard Workerdef  VABShd   : N2VD<0b11, 0b11, 0b01, 0b01, 0b01110, 0,
5562*9880d681SAndroid Build Coastguard Worker                     "vabs", "f16",
5563*9880d681SAndroid Build Coastguard Worker                     v4f16, v4f16, fabs>,
5564*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
5565*9880d681SAndroid Build Coastguard Workerdef  VABShq   : N2VQ<0b11, 0b11, 0b01, 0b01, 0b01110, 0,
5566*9880d681SAndroid Build Coastguard Worker                     "vabs", "f16",
5567*9880d681SAndroid Build Coastguard Worker                      v8f16, v8f16, fabs>,
5568*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
5569*9880d681SAndroid Build Coastguard Worker
5570*9880d681SAndroid Build Coastguard Workerdef : Pat<(xor (v2i32 (bitconvert (v8i8 (NEONvshrs DPR:$src, (i32 7))))),
5571*9880d681SAndroid Build Coastguard Worker               (v2i32 (bitconvert (v8i8 (add DPR:$src,
5572*9880d681SAndroid Build Coastguard Worker                                             (NEONvshrs DPR:$src, (i32 7))))))),
5573*9880d681SAndroid Build Coastguard Worker          (VABSv8i8 DPR:$src)>;
5574*9880d681SAndroid Build Coastguard Workerdef : Pat<(xor (v2i32 (bitconvert (v4i16 (NEONvshrs DPR:$src, (i32 15))))),
5575*9880d681SAndroid Build Coastguard Worker               (v2i32 (bitconvert (v4i16 (add DPR:$src,
5576*9880d681SAndroid Build Coastguard Worker                                            (NEONvshrs DPR:$src, (i32 15))))))),
5577*9880d681SAndroid Build Coastguard Worker          (VABSv4i16 DPR:$src)>;
5578*9880d681SAndroid Build Coastguard Workerdef : Pat<(xor (v2i32 (NEONvshrs DPR:$src, (i32 31))),
5579*9880d681SAndroid Build Coastguard Worker               (v2i32 (add DPR:$src, (NEONvshrs DPR:$src, (i32 31))))),
5580*9880d681SAndroid Build Coastguard Worker          (VABSv2i32 DPR:$src)>;
5581*9880d681SAndroid Build Coastguard Workerdef : Pat<(xor (v4i32 (bitconvert (v16i8 (NEONvshrs QPR:$src, (i32 7))))),
5582*9880d681SAndroid Build Coastguard Worker               (v4i32 (bitconvert (v16i8 (add QPR:$src,
5583*9880d681SAndroid Build Coastguard Worker                                             (NEONvshrs QPR:$src, (i32 7))))))),
5584*9880d681SAndroid Build Coastguard Worker          (VABSv16i8 QPR:$src)>;
5585*9880d681SAndroid Build Coastguard Workerdef : Pat<(xor (v4i32 (bitconvert (v8i16 (NEONvshrs QPR:$src, (i32 15))))),
5586*9880d681SAndroid Build Coastguard Worker               (v4i32 (bitconvert (v8i16 (add QPR:$src,
5587*9880d681SAndroid Build Coastguard Worker                                            (NEONvshrs QPR:$src, (i32 15))))))),
5588*9880d681SAndroid Build Coastguard Worker          (VABSv8i16 QPR:$src)>;
5589*9880d681SAndroid Build Coastguard Workerdef : Pat<(xor (v4i32 (NEONvshrs QPR:$src, (i32 31))),
5590*9880d681SAndroid Build Coastguard Worker               (v4i32 (add QPR:$src, (NEONvshrs QPR:$src, (i32 31))))),
5591*9880d681SAndroid Build Coastguard Worker          (VABSv4i32 QPR:$src)>;
5592*9880d681SAndroid Build Coastguard Worker
5593*9880d681SAndroid Build Coastguard Worker//   VQABS    : Vector Saturating Absolute Value
5594*9880d681SAndroid Build Coastguard Workerdefm VQABS    : N2VInt_QHS<0b11, 0b11, 0b00, 0b01110, 0,
5595*9880d681SAndroid Build Coastguard Worker                           IIC_VQUNAiD, IIC_VQUNAiQ, "vqabs", "s",
5596*9880d681SAndroid Build Coastguard Worker                           int_arm_neon_vqabs>;
5597*9880d681SAndroid Build Coastguard Worker
5598*9880d681SAndroid Build Coastguard Worker// Vector Negate.
5599*9880d681SAndroid Build Coastguard Worker
5600*9880d681SAndroid Build Coastguard Workerdef vnegd  : PatFrag<(ops node:$in),
5601*9880d681SAndroid Build Coastguard Worker                     (sub (bitconvert (v2i32 NEONimmAllZerosV)), node:$in)>;
5602*9880d681SAndroid Build Coastguard Workerdef vnegq  : PatFrag<(ops node:$in),
5603*9880d681SAndroid Build Coastguard Worker                     (sub (bitconvert (v4i32 NEONimmAllZerosV)), node:$in)>;
5604*9880d681SAndroid Build Coastguard Worker
5605*9880d681SAndroid Build Coastguard Workerclass VNEGD<bits<2> size, string OpcodeStr, string Dt, ValueType Ty>
5606*9880d681SAndroid Build Coastguard Worker  : N2V<0b11, 0b11, size, 0b01, 0b00111, 0, 0, (outs DPR:$Vd), (ins DPR:$Vm),
5607*9880d681SAndroid Build Coastguard Worker        IIC_VSHLiD, OpcodeStr, Dt, "$Vd, $Vm", "",
5608*9880d681SAndroid Build Coastguard Worker        [(set DPR:$Vd, (Ty (vnegd DPR:$Vm)))]>;
5609*9880d681SAndroid Build Coastguard Workerclass VNEGQ<bits<2> size, string OpcodeStr, string Dt, ValueType Ty>
5610*9880d681SAndroid Build Coastguard Worker  : N2V<0b11, 0b11, size, 0b01, 0b00111, 1, 0, (outs QPR:$Vd), (ins QPR:$Vm),
5611*9880d681SAndroid Build Coastguard Worker        IIC_VSHLiQ, OpcodeStr, Dt, "$Vd, $Vm", "",
5612*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd, (Ty (vnegq QPR:$Vm)))]>;
5613*9880d681SAndroid Build Coastguard Worker
5614*9880d681SAndroid Build Coastguard Worker//   VNEG     : Vector Negate (integer)
5615*9880d681SAndroid Build Coastguard Workerdef  VNEGs8d  : VNEGD<0b00, "vneg", "s8", v8i8>;
5616*9880d681SAndroid Build Coastguard Workerdef  VNEGs16d : VNEGD<0b01, "vneg", "s16", v4i16>;
5617*9880d681SAndroid Build Coastguard Workerdef  VNEGs32d : VNEGD<0b10, "vneg", "s32", v2i32>;
5618*9880d681SAndroid Build Coastguard Workerdef  VNEGs8q  : VNEGQ<0b00, "vneg", "s8", v16i8>;
5619*9880d681SAndroid Build Coastguard Workerdef  VNEGs16q : VNEGQ<0b01, "vneg", "s16", v8i16>;
5620*9880d681SAndroid Build Coastguard Workerdef  VNEGs32q : VNEGQ<0b10, "vneg", "s32", v4i32>;
5621*9880d681SAndroid Build Coastguard Worker
5622*9880d681SAndroid Build Coastguard Worker//   VNEG     : Vector Negate (floating-point)
5623*9880d681SAndroid Build Coastguard Workerdef  VNEGfd   : N2V<0b11, 0b11, 0b10, 0b01, 0b01111, 0, 0,
5624*9880d681SAndroid Build Coastguard Worker                    (outs DPR:$Vd), (ins DPR:$Vm), IIC_VUNAD,
5625*9880d681SAndroid Build Coastguard Worker                    "vneg", "f32", "$Vd, $Vm", "",
5626*9880d681SAndroid Build Coastguard Worker                    [(set DPR:$Vd, (v2f32 (fneg DPR:$Vm)))]>;
5627*9880d681SAndroid Build Coastguard Workerdef  VNEGf32q : N2V<0b11, 0b11, 0b10, 0b01, 0b01111, 1, 0,
5628*9880d681SAndroid Build Coastguard Worker                    (outs QPR:$Vd), (ins QPR:$Vm), IIC_VUNAQ,
5629*9880d681SAndroid Build Coastguard Worker                    "vneg", "f32", "$Vd, $Vm", "",
5630*9880d681SAndroid Build Coastguard Worker                    [(set QPR:$Vd, (v4f32 (fneg QPR:$Vm)))]>;
5631*9880d681SAndroid Build Coastguard Workerdef  VNEGhd   : N2V<0b11, 0b11, 0b01, 0b01, 0b01111, 0, 0,
5632*9880d681SAndroid Build Coastguard Worker                    (outs DPR:$Vd), (ins DPR:$Vm), IIC_VUNAD,
5633*9880d681SAndroid Build Coastguard Worker                    "vneg", "f16", "$Vd, $Vm", "",
5634*9880d681SAndroid Build Coastguard Worker                    [(set DPR:$Vd, (v4f16 (fneg DPR:$Vm)))]>,
5635*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
5636*9880d681SAndroid Build Coastguard Workerdef  VNEGhq   : N2V<0b11, 0b11, 0b01, 0b01, 0b01111, 1, 0,
5637*9880d681SAndroid Build Coastguard Worker                    (outs QPR:$Vd), (ins QPR:$Vm), IIC_VUNAQ,
5638*9880d681SAndroid Build Coastguard Worker                    "vneg", "f16", "$Vd, $Vm", "",
5639*9880d681SAndroid Build Coastguard Worker                    [(set QPR:$Vd, (v8f16 (fneg QPR:$Vm)))]>,
5640*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
5641*9880d681SAndroid Build Coastguard Worker
5642*9880d681SAndroid Build Coastguard Workerdef : Pat<(v8i8  (vnegd  DPR:$src)), (VNEGs8d DPR:$src)>;
5643*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i16 (vnegd  DPR:$src)), (VNEGs16d DPR:$src)>;
5644*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2i32 (vnegd  DPR:$src)), (VNEGs32d DPR:$src)>;
5645*9880d681SAndroid Build Coastguard Workerdef : Pat<(v16i8 (vnegq QPR:$src)), (VNEGs8q QPR:$src)>;
5646*9880d681SAndroid Build Coastguard Workerdef : Pat<(v8i16 (vnegq QPR:$src)), (VNEGs16q QPR:$src)>;
5647*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i32 (vnegq QPR:$src)), (VNEGs32q QPR:$src)>;
5648*9880d681SAndroid Build Coastguard Worker
5649*9880d681SAndroid Build Coastguard Worker//   VQNEG    : Vector Saturating Negate
5650*9880d681SAndroid Build Coastguard Workerdefm VQNEG    : N2VInt_QHS<0b11, 0b11, 0b00, 0b01111, 0,
5651*9880d681SAndroid Build Coastguard Worker                           IIC_VQUNAiD, IIC_VQUNAiQ, "vqneg", "s",
5652*9880d681SAndroid Build Coastguard Worker                           int_arm_neon_vqneg>;
5653*9880d681SAndroid Build Coastguard Worker
5654*9880d681SAndroid Build Coastguard Worker// Vector Bit Counting Operations.
5655*9880d681SAndroid Build Coastguard Worker
5656*9880d681SAndroid Build Coastguard Worker//   VCLS     : Vector Count Leading Sign Bits
5657*9880d681SAndroid Build Coastguard Workerdefm VCLS     : N2VInt_QHS<0b11, 0b11, 0b00, 0b01000, 0,
5658*9880d681SAndroid Build Coastguard Worker                           IIC_VCNTiD, IIC_VCNTiQ, "vcls", "s",
5659*9880d681SAndroid Build Coastguard Worker                           int_arm_neon_vcls>;
5660*9880d681SAndroid Build Coastguard Worker//   VCLZ     : Vector Count Leading Zeros
5661*9880d681SAndroid Build Coastguard Workerdefm VCLZ     : N2VInt_QHS<0b11, 0b11, 0b00, 0b01001, 0,
5662*9880d681SAndroid Build Coastguard Worker                           IIC_VCNTiD, IIC_VCNTiQ, "vclz", "i",
5663*9880d681SAndroid Build Coastguard Worker                           ctlz>;
5664*9880d681SAndroid Build Coastguard Worker//   VCNT     : Vector Count One Bits
5665*9880d681SAndroid Build Coastguard Workerdef  VCNTd    : N2VDInt<0b11, 0b11, 0b00, 0b00, 0b01010, 0,
5666*9880d681SAndroid Build Coastguard Worker                        IIC_VCNTiD, "vcnt", "8",
5667*9880d681SAndroid Build Coastguard Worker                        v8i8, v8i8, ctpop>;
5668*9880d681SAndroid Build Coastguard Workerdef  VCNTq    : N2VQInt<0b11, 0b11, 0b00, 0b00, 0b01010, 0,
5669*9880d681SAndroid Build Coastguard Worker                        IIC_VCNTiQ, "vcnt", "8",
5670*9880d681SAndroid Build Coastguard Worker                        v16i8, v16i8, ctpop>;
5671*9880d681SAndroid Build Coastguard Worker
5672*9880d681SAndroid Build Coastguard Worker// Vector Swap
5673*9880d681SAndroid Build Coastguard Workerdef  VSWPd    : N2VX<0b11, 0b11, 0b00, 0b10, 0b00000, 0, 0,
5674*9880d681SAndroid Build Coastguard Worker                     (outs DPR:$Vd, DPR:$Vm), (ins DPR:$in1, DPR:$in2),
5675*9880d681SAndroid Build Coastguard Worker                     NoItinerary, "vswp", "$Vd, $Vm", "$in1 = $Vd, $in2 = $Vm",
5676*9880d681SAndroid Build Coastguard Worker                     []>;
5677*9880d681SAndroid Build Coastguard Workerdef  VSWPq    : N2VX<0b11, 0b11, 0b00, 0b10, 0b00000, 1, 0,
5678*9880d681SAndroid Build Coastguard Worker                     (outs QPR:$Vd, QPR:$Vm), (ins QPR:$in1, QPR:$in2),
5679*9880d681SAndroid Build Coastguard Worker                     NoItinerary, "vswp", "$Vd, $Vm", "$in1 = $Vd, $in2 = $Vm",
5680*9880d681SAndroid Build Coastguard Worker                     []>;
5681*9880d681SAndroid Build Coastguard Worker
5682*9880d681SAndroid Build Coastguard Worker// Vector Move Operations.
5683*9880d681SAndroid Build Coastguard Worker
5684*9880d681SAndroid Build Coastguard Worker//   VMOV     : Vector Move (Register)
5685*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vmov${p} $Vd, $Vm",
5686*9880d681SAndroid Build Coastguard Worker                    (VORRd DPR:$Vd, DPR:$Vm, DPR:$Vm, pred:$p)>;
5687*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vmov${p} $Vd, $Vm",
5688*9880d681SAndroid Build Coastguard Worker                    (VORRq QPR:$Vd, QPR:$Vm, QPR:$Vm, pred:$p)>;
5689*9880d681SAndroid Build Coastguard Worker
5690*9880d681SAndroid Build Coastguard Worker//   VMOV     : Vector Move (Immediate)
5691*9880d681SAndroid Build Coastguard Worker
5692*9880d681SAndroid Build Coastguard Worker// Although VMOVs are not strictly speaking cheap, they are as expensive
5693*9880d681SAndroid Build Coastguard Worker// as their copies counterpart (VORR), so we should prefer rematerialization
5694*9880d681SAndroid Build Coastguard Worker// over splitting when it applies.
5695*9880d681SAndroid Build Coastguard Workerlet isReMaterializable = 1, isAsCheapAsAMove=1 in {
5696*9880d681SAndroid Build Coastguard Workerdef VMOVv8i8  : N1ModImm<1, 0b000, 0b1110, 0, 0, 0, 1, (outs DPR:$Vd),
5697*9880d681SAndroid Build Coastguard Worker                         (ins nImmSplatI8:$SIMM), IIC_VMOVImm,
5698*9880d681SAndroid Build Coastguard Worker                         "vmov", "i8", "$Vd, $SIMM", "",
5699*9880d681SAndroid Build Coastguard Worker                         [(set DPR:$Vd, (v8i8 (NEONvmovImm timm:$SIMM)))]>;
5700*9880d681SAndroid Build Coastguard Workerdef VMOVv16i8 : N1ModImm<1, 0b000, 0b1110, 0, 1, 0, 1, (outs QPR:$Vd),
5701*9880d681SAndroid Build Coastguard Worker                         (ins nImmSplatI8:$SIMM), IIC_VMOVImm,
5702*9880d681SAndroid Build Coastguard Worker                         "vmov", "i8", "$Vd, $SIMM", "",
5703*9880d681SAndroid Build Coastguard Worker                         [(set QPR:$Vd, (v16i8 (NEONvmovImm timm:$SIMM)))]>;
5704*9880d681SAndroid Build Coastguard Worker
5705*9880d681SAndroid Build Coastguard Workerdef VMOVv4i16 : N1ModImm<1, 0b000, {1,0,?,0}, 0, 0, 0, 1, (outs DPR:$Vd),
5706*9880d681SAndroid Build Coastguard Worker                         (ins nImmSplatI16:$SIMM), IIC_VMOVImm,
5707*9880d681SAndroid Build Coastguard Worker                         "vmov", "i16", "$Vd, $SIMM", "",
5708*9880d681SAndroid Build Coastguard Worker                         [(set DPR:$Vd, (v4i16 (NEONvmovImm timm:$SIMM)))]> {
5709*9880d681SAndroid Build Coastguard Worker  let Inst{9} = SIMM{9};
5710*9880d681SAndroid Build Coastguard Worker}
5711*9880d681SAndroid Build Coastguard Worker
5712*9880d681SAndroid Build Coastguard Workerdef VMOVv8i16 : N1ModImm<1, 0b000, {1,0,?,0}, 0, 1, 0, 1, (outs QPR:$Vd),
5713*9880d681SAndroid Build Coastguard Worker                         (ins nImmSplatI16:$SIMM), IIC_VMOVImm,
5714*9880d681SAndroid Build Coastguard Worker                         "vmov", "i16", "$Vd, $SIMM", "",
5715*9880d681SAndroid Build Coastguard Worker                         [(set QPR:$Vd, (v8i16 (NEONvmovImm timm:$SIMM)))]> {
5716*9880d681SAndroid Build Coastguard Worker let Inst{9} = SIMM{9};
5717*9880d681SAndroid Build Coastguard Worker}
5718*9880d681SAndroid Build Coastguard Worker
5719*9880d681SAndroid Build Coastguard Workerdef VMOVv2i32 : N1ModImm<1, 0b000, {?,?,?,?}, 0, 0, 0, 1, (outs DPR:$Vd),
5720*9880d681SAndroid Build Coastguard Worker                         (ins nImmVMOVI32:$SIMM), IIC_VMOVImm,
5721*9880d681SAndroid Build Coastguard Worker                         "vmov", "i32", "$Vd, $SIMM", "",
5722*9880d681SAndroid Build Coastguard Worker                         [(set DPR:$Vd, (v2i32 (NEONvmovImm timm:$SIMM)))]> {
5723*9880d681SAndroid Build Coastguard Worker  let Inst{11-8} = SIMM{11-8};
5724*9880d681SAndroid Build Coastguard Worker}
5725*9880d681SAndroid Build Coastguard Worker
5726*9880d681SAndroid Build Coastguard Workerdef VMOVv4i32 : N1ModImm<1, 0b000, {?,?,?,?}, 0, 1, 0, 1, (outs QPR:$Vd),
5727*9880d681SAndroid Build Coastguard Worker                         (ins nImmVMOVI32:$SIMM), IIC_VMOVImm,
5728*9880d681SAndroid Build Coastguard Worker                         "vmov", "i32", "$Vd, $SIMM", "",
5729*9880d681SAndroid Build Coastguard Worker                         [(set QPR:$Vd, (v4i32 (NEONvmovImm timm:$SIMM)))]> {
5730*9880d681SAndroid Build Coastguard Worker  let Inst{11-8} = SIMM{11-8};
5731*9880d681SAndroid Build Coastguard Worker}
5732*9880d681SAndroid Build Coastguard Worker
5733*9880d681SAndroid Build Coastguard Workerdef VMOVv1i64 : N1ModImm<1, 0b000, 0b1110, 0, 0, 1, 1, (outs DPR:$Vd),
5734*9880d681SAndroid Build Coastguard Worker                         (ins nImmSplatI64:$SIMM), IIC_VMOVImm,
5735*9880d681SAndroid Build Coastguard Worker                         "vmov", "i64", "$Vd, $SIMM", "",
5736*9880d681SAndroid Build Coastguard Worker                         [(set DPR:$Vd, (v1i64 (NEONvmovImm timm:$SIMM)))]>;
5737*9880d681SAndroid Build Coastguard Workerdef VMOVv2i64 : N1ModImm<1, 0b000, 0b1110, 0, 1, 1, 1, (outs QPR:$Vd),
5738*9880d681SAndroid Build Coastguard Worker                         (ins nImmSplatI64:$SIMM), IIC_VMOVImm,
5739*9880d681SAndroid Build Coastguard Worker                         "vmov", "i64", "$Vd, $SIMM", "",
5740*9880d681SAndroid Build Coastguard Worker                         [(set QPR:$Vd, (v2i64 (NEONvmovImm timm:$SIMM)))]>;
5741*9880d681SAndroid Build Coastguard Worker
5742*9880d681SAndroid Build Coastguard Workerdef VMOVv2f32 : N1ModImm<1, 0b000, 0b1111, 0, 0, 0, 1, (outs DPR:$Vd),
5743*9880d681SAndroid Build Coastguard Worker                         (ins nImmVMOVF32:$SIMM), IIC_VMOVImm,
5744*9880d681SAndroid Build Coastguard Worker                         "vmov", "f32", "$Vd, $SIMM", "",
5745*9880d681SAndroid Build Coastguard Worker                         [(set DPR:$Vd, (v2f32 (NEONvmovFPImm timm:$SIMM)))]>;
5746*9880d681SAndroid Build Coastguard Workerdef VMOVv4f32 : N1ModImm<1, 0b000, 0b1111, 0, 1, 0, 1, (outs QPR:$Vd),
5747*9880d681SAndroid Build Coastguard Worker                         (ins nImmVMOVF32:$SIMM), IIC_VMOVImm,
5748*9880d681SAndroid Build Coastguard Worker                         "vmov", "f32", "$Vd, $SIMM", "",
5749*9880d681SAndroid Build Coastguard Worker                         [(set QPR:$Vd, (v4f32 (NEONvmovFPImm timm:$SIMM)))]>;
5750*9880d681SAndroid Build Coastguard Worker} // isReMaterializable, isAsCheapAsAMove
5751*9880d681SAndroid Build Coastguard Worker
5752*9880d681SAndroid Build Coastguard Worker// Add support for bytes replication feature, so it could be GAS compatible.
5753*9880d681SAndroid Build Coastguard Worker// E.g. instructions below:
5754*9880d681SAndroid Build Coastguard Worker// "vmov.i32 d0, 0xffffffff"
5755*9880d681SAndroid Build Coastguard Worker// "vmov.i32 d0, 0xabababab"
5756*9880d681SAndroid Build Coastguard Worker// "vmov.i16 d0, 0xabab"
5757*9880d681SAndroid Build Coastguard Worker// are incorrect, but we could deal with such cases.
5758*9880d681SAndroid Build Coastguard Worker// For last two instructions, for example, it should emit:
5759*9880d681SAndroid Build Coastguard Worker// "vmov.i8 d0, 0xab"
5760*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vmov${p}.i16 $Vd, $Vm",
5761*9880d681SAndroid Build Coastguard Worker                    (VMOVv8i8 DPR:$Vd, nImmVMOVI16ByteReplicate:$Vm, pred:$p)>;
5762*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vmov${p}.i32 $Vd, $Vm",
5763*9880d681SAndroid Build Coastguard Worker                    (VMOVv8i8 DPR:$Vd, nImmVMOVI32ByteReplicate:$Vm, pred:$p)>;
5764*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vmov${p}.i16 $Vd, $Vm",
5765*9880d681SAndroid Build Coastguard Worker                    (VMOVv16i8 QPR:$Vd, nImmVMOVI16ByteReplicate:$Vm, pred:$p)>;
5766*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vmov${p}.i32 $Vd, $Vm",
5767*9880d681SAndroid Build Coastguard Worker                    (VMOVv16i8 QPR:$Vd, nImmVMOVI32ByteReplicate:$Vm, pred:$p)>;
5768*9880d681SAndroid Build Coastguard Worker
5769*9880d681SAndroid Build Coastguard Worker// Also add same support for VMVN instructions. So instruction:
5770*9880d681SAndroid Build Coastguard Worker// "vmvn.i32 d0, 0xabababab"
5771*9880d681SAndroid Build Coastguard Worker// actually means:
5772*9880d681SAndroid Build Coastguard Worker// "vmov.i8 d0, 0x54"
5773*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vmvn${p}.i16 $Vd, $Vm",
5774*9880d681SAndroid Build Coastguard Worker                    (VMOVv8i8 DPR:$Vd, nImmVMVNI16ByteReplicate:$Vm, pred:$p)>;
5775*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vmvn${p}.i32 $Vd, $Vm",
5776*9880d681SAndroid Build Coastguard Worker                    (VMOVv8i8 DPR:$Vd, nImmVMVNI32ByteReplicate:$Vm, pred:$p)>;
5777*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vmvn${p}.i16 $Vd, $Vm",
5778*9880d681SAndroid Build Coastguard Worker                    (VMOVv16i8 QPR:$Vd, nImmVMVNI16ByteReplicate:$Vm, pred:$p)>;
5779*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vmvn${p}.i32 $Vd, $Vm",
5780*9880d681SAndroid Build Coastguard Worker                    (VMOVv16i8 QPR:$Vd, nImmVMVNI32ByteReplicate:$Vm, pred:$p)>;
5781*9880d681SAndroid Build Coastguard Worker
5782*9880d681SAndroid Build Coastguard Worker// On some CPUs the two instructions "vmov.i32 dD, #0" and "vmov.i32 qD, #0"
5783*9880d681SAndroid Build Coastguard Worker// require zero cycles to execute so they should be used wherever possible for
5784*9880d681SAndroid Build Coastguard Worker// setting a register to zero.
5785*9880d681SAndroid Build Coastguard Worker
5786*9880d681SAndroid Build Coastguard Worker// Even without these pseudo-insts we would probably end up with the correct
5787*9880d681SAndroid Build Coastguard Worker// instruction, but we could not mark the general ones with "isAsCheapAsAMove"
5788*9880d681SAndroid Build Coastguard Worker// since they are sometimes rather expensive (in general).
5789*9880d681SAndroid Build Coastguard Worker
5790*9880d681SAndroid Build Coastguard Workerlet AddedComplexity = 50, isAsCheapAsAMove = 1, isReMaterializable = 1 in {
5791*9880d681SAndroid Build Coastguard Worker  def VMOVD0 : ARMPseudoExpand<(outs DPR:$Vd), (ins), 4, IIC_VMOVImm,
5792*9880d681SAndroid Build Coastguard Worker                               [(set DPR:$Vd, (v2i32 NEONimmAllZerosV))],
5793*9880d681SAndroid Build Coastguard Worker                               (VMOVv2i32 DPR:$Vd, 0, (ops 14, zero_reg))>,
5794*9880d681SAndroid Build Coastguard Worker               Requires<[HasZCZ]>;
5795*9880d681SAndroid Build Coastguard Worker  def VMOVQ0 : ARMPseudoExpand<(outs QPR:$Vd), (ins), 4, IIC_VMOVImm,
5796*9880d681SAndroid Build Coastguard Worker                               [(set QPR:$Vd, (v4i32 NEONimmAllZerosV))],
5797*9880d681SAndroid Build Coastguard Worker                               (VMOVv4i32 QPR:$Vd, 0, (ops 14, zero_reg))>,
5798*9880d681SAndroid Build Coastguard Worker               Requires<[HasZCZ]>;
5799*9880d681SAndroid Build Coastguard Worker}
5800*9880d681SAndroid Build Coastguard Worker
5801*9880d681SAndroid Build Coastguard Worker//   VMOV     : Vector Get Lane (move scalar to ARM core register)
5802*9880d681SAndroid Build Coastguard Worker
5803*9880d681SAndroid Build Coastguard Workerdef VGETLNs8  : NVGetLane<{1,1,1,0,0,1,?,1}, 0b1011, {?,?},
5804*9880d681SAndroid Build Coastguard Worker                          (outs GPR:$R), (ins DPR:$V, VectorIndex8:$lane),
5805*9880d681SAndroid Build Coastguard Worker                          IIC_VMOVSI, "vmov", "s8", "$R, $V$lane",
5806*9880d681SAndroid Build Coastguard Worker                          [(set GPR:$R, (NEONvgetlanes (v8i8 DPR:$V),
5807*9880d681SAndroid Build Coastguard Worker                                           imm:$lane))]> {
5808*9880d681SAndroid Build Coastguard Worker  let Inst{21}  = lane{2};
5809*9880d681SAndroid Build Coastguard Worker  let Inst{6-5} = lane{1-0};
5810*9880d681SAndroid Build Coastguard Worker}
5811*9880d681SAndroid Build Coastguard Workerdef VGETLNs16 : NVGetLane<{1,1,1,0,0,0,?,1}, 0b1011, {?,1},
5812*9880d681SAndroid Build Coastguard Worker                          (outs GPR:$R), (ins DPR:$V, VectorIndex16:$lane),
5813*9880d681SAndroid Build Coastguard Worker                          IIC_VMOVSI, "vmov", "s16", "$R, $V$lane",
5814*9880d681SAndroid Build Coastguard Worker                          [(set GPR:$R, (NEONvgetlanes (v4i16 DPR:$V),
5815*9880d681SAndroid Build Coastguard Worker                                           imm:$lane))]> {
5816*9880d681SAndroid Build Coastguard Worker  let Inst{21} = lane{1};
5817*9880d681SAndroid Build Coastguard Worker  let Inst{6}  = lane{0};
5818*9880d681SAndroid Build Coastguard Worker}
5819*9880d681SAndroid Build Coastguard Workerdef VGETLNu8  : NVGetLane<{1,1,1,0,1,1,?,1}, 0b1011, {?,?},
5820*9880d681SAndroid Build Coastguard Worker                          (outs GPR:$R), (ins DPR:$V, VectorIndex8:$lane),
5821*9880d681SAndroid Build Coastguard Worker                          IIC_VMOVSI, "vmov", "u8", "$R, $V$lane",
5822*9880d681SAndroid Build Coastguard Worker                          [(set GPR:$R, (NEONvgetlaneu (v8i8 DPR:$V),
5823*9880d681SAndroid Build Coastguard Worker                                           imm:$lane))]> {
5824*9880d681SAndroid Build Coastguard Worker  let Inst{21}  = lane{2};
5825*9880d681SAndroid Build Coastguard Worker  let Inst{6-5} = lane{1-0};
5826*9880d681SAndroid Build Coastguard Worker}
5827*9880d681SAndroid Build Coastguard Workerdef VGETLNu16 : NVGetLane<{1,1,1,0,1,0,?,1}, 0b1011, {?,1},
5828*9880d681SAndroid Build Coastguard Worker                          (outs GPR:$R), (ins DPR:$V, VectorIndex16:$lane),
5829*9880d681SAndroid Build Coastguard Worker                          IIC_VMOVSI, "vmov", "u16", "$R, $V$lane",
5830*9880d681SAndroid Build Coastguard Worker                          [(set GPR:$R, (NEONvgetlaneu (v4i16 DPR:$V),
5831*9880d681SAndroid Build Coastguard Worker                                           imm:$lane))]> {
5832*9880d681SAndroid Build Coastguard Worker  let Inst{21} = lane{1};
5833*9880d681SAndroid Build Coastguard Worker  let Inst{6}  = lane{0};
5834*9880d681SAndroid Build Coastguard Worker}
5835*9880d681SAndroid Build Coastguard Workerdef VGETLNi32 : NVGetLane<{1,1,1,0,0,0,?,1}, 0b1011, 0b00,
5836*9880d681SAndroid Build Coastguard Worker                          (outs GPR:$R), (ins DPR:$V, VectorIndex32:$lane),
5837*9880d681SAndroid Build Coastguard Worker                          IIC_VMOVSI, "vmov", "32", "$R, $V$lane",
5838*9880d681SAndroid Build Coastguard Worker                          [(set GPR:$R, (extractelt (v2i32 DPR:$V),
5839*9880d681SAndroid Build Coastguard Worker                                           imm:$lane))]>,
5840*9880d681SAndroid Build Coastguard Worker                Requires<[HasVFP2, HasFastVGETLNi32]> {
5841*9880d681SAndroid Build Coastguard Worker  let Inst{21} = lane{0};
5842*9880d681SAndroid Build Coastguard Worker}
5843*9880d681SAndroid Build Coastguard Worker// def VGETLNf32: see FMRDH and FMRDL in ARMInstrVFP.td
5844*9880d681SAndroid Build Coastguard Workerdef : Pat<(NEONvgetlanes (v16i8 QPR:$src), imm:$lane),
5845*9880d681SAndroid Build Coastguard Worker          (VGETLNs8 (v8i8 (EXTRACT_SUBREG QPR:$src,
5846*9880d681SAndroid Build Coastguard Worker                           (DSubReg_i8_reg imm:$lane))),
5847*9880d681SAndroid Build Coastguard Worker                     (SubReg_i8_lane imm:$lane))>;
5848*9880d681SAndroid Build Coastguard Workerdef : Pat<(NEONvgetlanes (v8i16 QPR:$src), imm:$lane),
5849*9880d681SAndroid Build Coastguard Worker          (VGETLNs16 (v4i16 (EXTRACT_SUBREG QPR:$src,
5850*9880d681SAndroid Build Coastguard Worker                             (DSubReg_i16_reg imm:$lane))),
5851*9880d681SAndroid Build Coastguard Worker                     (SubReg_i16_lane imm:$lane))>;
5852*9880d681SAndroid Build Coastguard Workerdef : Pat<(NEONvgetlaneu (v16i8 QPR:$src), imm:$lane),
5853*9880d681SAndroid Build Coastguard Worker          (VGETLNu8 (v8i8 (EXTRACT_SUBREG QPR:$src,
5854*9880d681SAndroid Build Coastguard Worker                           (DSubReg_i8_reg imm:$lane))),
5855*9880d681SAndroid Build Coastguard Worker                     (SubReg_i8_lane imm:$lane))>;
5856*9880d681SAndroid Build Coastguard Workerdef : Pat<(NEONvgetlaneu (v8i16 QPR:$src), imm:$lane),
5857*9880d681SAndroid Build Coastguard Worker          (VGETLNu16 (v4i16 (EXTRACT_SUBREG QPR:$src,
5858*9880d681SAndroid Build Coastguard Worker                             (DSubReg_i16_reg imm:$lane))),
5859*9880d681SAndroid Build Coastguard Worker                     (SubReg_i16_lane imm:$lane))>;
5860*9880d681SAndroid Build Coastguard Workerdef : Pat<(extractelt (v4i32 QPR:$src), imm:$lane),
5861*9880d681SAndroid Build Coastguard Worker          (VGETLNi32 (v2i32 (EXTRACT_SUBREG QPR:$src,
5862*9880d681SAndroid Build Coastguard Worker                             (DSubReg_i32_reg imm:$lane))),
5863*9880d681SAndroid Build Coastguard Worker                     (SubReg_i32_lane imm:$lane))>,
5864*9880d681SAndroid Build Coastguard Worker      Requires<[HasNEON, HasFastVGETLNi32]>;
5865*9880d681SAndroid Build Coastguard Workerdef : Pat<(extractelt (v2i32 DPR:$src), imm:$lane),
5866*9880d681SAndroid Build Coastguard Worker          (COPY_TO_REGCLASS
5867*9880d681SAndroid Build Coastguard Worker            (i32 (EXTRACT_SUBREG DPR:$src, (SSubReg_f32_reg imm:$lane))), GPR)>,
5868*9880d681SAndroid Build Coastguard Worker      Requires<[HasNEON, HasSlowVGETLNi32]>;
5869*9880d681SAndroid Build Coastguard Workerdef : Pat<(extractelt (v4i32 QPR:$src), imm:$lane),
5870*9880d681SAndroid Build Coastguard Worker          (COPY_TO_REGCLASS
5871*9880d681SAndroid Build Coastguard Worker            (i32 (EXTRACT_SUBREG QPR:$src, (SSubReg_f32_reg imm:$lane))), GPR)>,
5872*9880d681SAndroid Build Coastguard Worker      Requires<[HasNEON, HasSlowVGETLNi32]>;
5873*9880d681SAndroid Build Coastguard Workerdef : Pat<(extractelt (v2f32 DPR:$src1), imm:$src2),
5874*9880d681SAndroid Build Coastguard Worker          (EXTRACT_SUBREG (v2f32 (COPY_TO_REGCLASS (v2f32 DPR:$src1),DPR_VFP2)),
5875*9880d681SAndroid Build Coastguard Worker                          (SSubReg_f32_reg imm:$src2))>;
5876*9880d681SAndroid Build Coastguard Workerdef : Pat<(extractelt (v4f32 QPR:$src1), imm:$src2),
5877*9880d681SAndroid Build Coastguard Worker          (EXTRACT_SUBREG (v4f32 (COPY_TO_REGCLASS (v4f32 QPR:$src1),QPR_VFP2)),
5878*9880d681SAndroid Build Coastguard Worker                          (SSubReg_f32_reg imm:$src2))>;
5879*9880d681SAndroid Build Coastguard Worker//def : Pat<(extractelt (v2i64 QPR:$src1), imm:$src2),
5880*9880d681SAndroid Build Coastguard Worker//          (EXTRACT_SUBREG QPR:$src1, (DSubReg_f64_reg imm:$src2))>;
5881*9880d681SAndroid Build Coastguard Workerdef : Pat<(extractelt (v2f64 QPR:$src1), imm:$src2),
5882*9880d681SAndroid Build Coastguard Worker          (EXTRACT_SUBREG QPR:$src1, (DSubReg_f64_reg imm:$src2))>;
5883*9880d681SAndroid Build Coastguard Worker
5884*9880d681SAndroid Build Coastguard Worker
5885*9880d681SAndroid Build Coastguard Worker//   VMOV     : Vector Set Lane (move ARM core register to scalar)
5886*9880d681SAndroid Build Coastguard Worker
5887*9880d681SAndroid Build Coastguard Workerlet Constraints = "$src1 = $V" in {
5888*9880d681SAndroid Build Coastguard Workerdef VSETLNi8  : NVSetLane<{1,1,1,0,0,1,?,0}, 0b1011, {?,?}, (outs DPR:$V),
5889*9880d681SAndroid Build Coastguard Worker                          (ins DPR:$src1, GPR:$R, VectorIndex8:$lane),
5890*9880d681SAndroid Build Coastguard Worker                          IIC_VMOVISL, "vmov", "8", "$V$lane, $R",
5891*9880d681SAndroid Build Coastguard Worker                          [(set DPR:$V, (vector_insert (v8i8 DPR:$src1),
5892*9880d681SAndroid Build Coastguard Worker                                           GPR:$R, imm:$lane))]> {
5893*9880d681SAndroid Build Coastguard Worker  let Inst{21}  = lane{2};
5894*9880d681SAndroid Build Coastguard Worker  let Inst{6-5} = lane{1-0};
5895*9880d681SAndroid Build Coastguard Worker}
5896*9880d681SAndroid Build Coastguard Workerdef VSETLNi16 : NVSetLane<{1,1,1,0,0,0,?,0}, 0b1011, {?,1}, (outs DPR:$V),
5897*9880d681SAndroid Build Coastguard Worker                          (ins DPR:$src1, GPR:$R, VectorIndex16:$lane),
5898*9880d681SAndroid Build Coastguard Worker                          IIC_VMOVISL, "vmov", "16", "$V$lane, $R",
5899*9880d681SAndroid Build Coastguard Worker                          [(set DPR:$V, (vector_insert (v4i16 DPR:$src1),
5900*9880d681SAndroid Build Coastguard Worker                                           GPR:$R, imm:$lane))]> {
5901*9880d681SAndroid Build Coastguard Worker  let Inst{21} = lane{1};
5902*9880d681SAndroid Build Coastguard Worker  let Inst{6}  = lane{0};
5903*9880d681SAndroid Build Coastguard Worker}
5904*9880d681SAndroid Build Coastguard Workerdef VSETLNi32 : NVSetLane<{1,1,1,0,0,0,?,0}, 0b1011, 0b00, (outs DPR:$V),
5905*9880d681SAndroid Build Coastguard Worker                          (ins DPR:$src1, GPR:$R, VectorIndex32:$lane),
5906*9880d681SAndroid Build Coastguard Worker                          IIC_VMOVISL, "vmov", "32", "$V$lane, $R",
5907*9880d681SAndroid Build Coastguard Worker                          [(set DPR:$V, (insertelt (v2i32 DPR:$src1),
5908*9880d681SAndroid Build Coastguard Worker                                           GPR:$R, imm:$lane))]>,
5909*9880d681SAndroid Build Coastguard Worker                Requires<[HasVFP2]> {
5910*9880d681SAndroid Build Coastguard Worker  let Inst{21} = lane{0};
5911*9880d681SAndroid Build Coastguard Worker  // This instruction is equivalent as
5912*9880d681SAndroid Build Coastguard Worker  // $V = INSERT_SUBREG $src1, $R, translateImmToSubIdx($imm)
5913*9880d681SAndroid Build Coastguard Worker  let isInsertSubreg = 1;
5914*9880d681SAndroid Build Coastguard Worker}
5915*9880d681SAndroid Build Coastguard Worker}
5916*9880d681SAndroid Build Coastguard Workerdef : Pat<(vector_insert (v16i8 QPR:$src1), GPR:$src2, imm:$lane),
5917*9880d681SAndroid Build Coastguard Worker          (v16i8 (INSERT_SUBREG QPR:$src1,
5918*9880d681SAndroid Build Coastguard Worker                  (v8i8 (VSETLNi8 (v8i8 (EXTRACT_SUBREG QPR:$src1,
5919*9880d681SAndroid Build Coastguard Worker                                   (DSubReg_i8_reg imm:$lane))),
5920*9880d681SAndroid Build Coastguard Worker                            GPR:$src2, (SubReg_i8_lane imm:$lane))),
5921*9880d681SAndroid Build Coastguard Worker                  (DSubReg_i8_reg imm:$lane)))>;
5922*9880d681SAndroid Build Coastguard Workerdef : Pat<(vector_insert (v8i16 QPR:$src1), GPR:$src2, imm:$lane),
5923*9880d681SAndroid Build Coastguard Worker          (v8i16 (INSERT_SUBREG QPR:$src1,
5924*9880d681SAndroid Build Coastguard Worker                  (v4i16 (VSETLNi16 (v4i16 (EXTRACT_SUBREG QPR:$src1,
5925*9880d681SAndroid Build Coastguard Worker                                     (DSubReg_i16_reg imm:$lane))),
5926*9880d681SAndroid Build Coastguard Worker                             GPR:$src2, (SubReg_i16_lane imm:$lane))),
5927*9880d681SAndroid Build Coastguard Worker                  (DSubReg_i16_reg imm:$lane)))>;
5928*9880d681SAndroid Build Coastguard Workerdef : Pat<(insertelt (v4i32 QPR:$src1), GPR:$src2, imm:$lane),
5929*9880d681SAndroid Build Coastguard Worker          (v4i32 (INSERT_SUBREG QPR:$src1,
5930*9880d681SAndroid Build Coastguard Worker                  (v2i32 (VSETLNi32 (v2i32 (EXTRACT_SUBREG QPR:$src1,
5931*9880d681SAndroid Build Coastguard Worker                                     (DSubReg_i32_reg imm:$lane))),
5932*9880d681SAndroid Build Coastguard Worker                             GPR:$src2, (SubReg_i32_lane imm:$lane))),
5933*9880d681SAndroid Build Coastguard Worker                  (DSubReg_i32_reg imm:$lane)))>;
5934*9880d681SAndroid Build Coastguard Worker
5935*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2f32 (insertelt DPR:$src1, SPR:$src2, imm:$src3)),
5936*9880d681SAndroid Build Coastguard Worker          (INSERT_SUBREG (v2f32 (COPY_TO_REGCLASS DPR:$src1, DPR_VFP2)),
5937*9880d681SAndroid Build Coastguard Worker                                SPR:$src2, (SSubReg_f32_reg imm:$src3))>;
5938*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4f32 (insertelt QPR:$src1, SPR:$src2, imm:$src3)),
5939*9880d681SAndroid Build Coastguard Worker          (INSERT_SUBREG (v4f32 (COPY_TO_REGCLASS QPR:$src1, QPR_VFP2)),
5940*9880d681SAndroid Build Coastguard Worker                                SPR:$src2, (SSubReg_f32_reg imm:$src3))>;
5941*9880d681SAndroid Build Coastguard Worker
5942*9880d681SAndroid Build Coastguard Worker//def : Pat<(v2i64 (insertelt QPR:$src1, DPR:$src2, imm:$src3)),
5943*9880d681SAndroid Build Coastguard Worker//          (INSERT_SUBREG QPR:$src1, DPR:$src2, (DSubReg_f64_reg imm:$src3))>;
5944*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2f64 (insertelt QPR:$src1, DPR:$src2, imm:$src3)),
5945*9880d681SAndroid Build Coastguard Worker          (INSERT_SUBREG QPR:$src1, DPR:$src2, (DSubReg_f64_reg imm:$src3))>;
5946*9880d681SAndroid Build Coastguard Worker
5947*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2f32 (scalar_to_vector SPR:$src)),
5948*9880d681SAndroid Build Coastguard Worker          (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)), SPR:$src, ssub_0)>;
5949*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2f64 (scalar_to_vector (f64 DPR:$src))),
5950*9880d681SAndroid Build Coastguard Worker          (INSERT_SUBREG (v2f64 (IMPLICIT_DEF)), DPR:$src, dsub_0)>;
5951*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4f32 (scalar_to_vector SPR:$src)),
5952*9880d681SAndroid Build Coastguard Worker          (INSERT_SUBREG (v4f32 (IMPLICIT_DEF)), SPR:$src, ssub_0)>;
5953*9880d681SAndroid Build Coastguard Worker
5954*9880d681SAndroid Build Coastguard Workerdef : Pat<(v8i8 (scalar_to_vector GPR:$src)),
5955*9880d681SAndroid Build Coastguard Worker          (VSETLNi8  (v8i8  (IMPLICIT_DEF)), GPR:$src, (i32 0))>;
5956*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i16 (scalar_to_vector GPR:$src)),
5957*9880d681SAndroid Build Coastguard Worker          (VSETLNi16 (v4i16 (IMPLICIT_DEF)), GPR:$src, (i32 0))>;
5958*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2i32 (scalar_to_vector GPR:$src)),
5959*9880d681SAndroid Build Coastguard Worker          (VSETLNi32 (v2i32 (IMPLICIT_DEF)), GPR:$src, (i32 0))>;
5960*9880d681SAndroid Build Coastguard Worker
5961*9880d681SAndroid Build Coastguard Workerdef : Pat<(v16i8 (scalar_to_vector GPR:$src)),
5962*9880d681SAndroid Build Coastguard Worker          (INSERT_SUBREG (v16i8 (IMPLICIT_DEF)),
5963*9880d681SAndroid Build Coastguard Worker                         (VSETLNi8 (v8i8 (IMPLICIT_DEF)), GPR:$src, (i32 0)),
5964*9880d681SAndroid Build Coastguard Worker                         dsub_0)>;
5965*9880d681SAndroid Build Coastguard Workerdef : Pat<(v8i16 (scalar_to_vector GPR:$src)),
5966*9880d681SAndroid Build Coastguard Worker          (INSERT_SUBREG (v8i16 (IMPLICIT_DEF)),
5967*9880d681SAndroid Build Coastguard Worker                         (VSETLNi16 (v4i16 (IMPLICIT_DEF)), GPR:$src, (i32 0)),
5968*9880d681SAndroid Build Coastguard Worker                         dsub_0)>;
5969*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i32 (scalar_to_vector GPR:$src)),
5970*9880d681SAndroid Build Coastguard Worker          (INSERT_SUBREG (v4i32 (IMPLICIT_DEF)),
5971*9880d681SAndroid Build Coastguard Worker                         (VSETLNi32 (v2i32 (IMPLICIT_DEF)), GPR:$src, (i32 0)),
5972*9880d681SAndroid Build Coastguard Worker                         dsub_0)>;
5973*9880d681SAndroid Build Coastguard Worker
5974*9880d681SAndroid Build Coastguard Worker//   VDUP     : Vector Duplicate (from ARM core register to all elements)
5975*9880d681SAndroid Build Coastguard Worker
5976*9880d681SAndroid Build Coastguard Workerclass VDUPD<bits<8> opcod1, bits<2> opcod3, string Dt, ValueType Ty>
5977*9880d681SAndroid Build Coastguard Worker  : NVDup<opcod1, 0b1011, opcod3, (outs DPR:$V), (ins GPR:$R),
5978*9880d681SAndroid Build Coastguard Worker          IIC_VMOVIS, "vdup", Dt, "$V, $R",
5979*9880d681SAndroid Build Coastguard Worker          [(set DPR:$V, (Ty (NEONvdup (i32 GPR:$R))))]>;
5980*9880d681SAndroid Build Coastguard Workerclass VDUPQ<bits<8> opcod1, bits<2> opcod3, string Dt, ValueType Ty>
5981*9880d681SAndroid Build Coastguard Worker  : NVDup<opcod1, 0b1011, opcod3, (outs QPR:$V), (ins GPR:$R),
5982*9880d681SAndroid Build Coastguard Worker          IIC_VMOVIS, "vdup", Dt, "$V, $R",
5983*9880d681SAndroid Build Coastguard Worker          [(set QPR:$V, (Ty (NEONvdup (i32 GPR:$R))))]>;
5984*9880d681SAndroid Build Coastguard Worker
5985*9880d681SAndroid Build Coastguard Workerdef  VDUP8d   : VDUPD<0b11101100, 0b00, "8", v8i8>;
5986*9880d681SAndroid Build Coastguard Workerdef  VDUP16d  : VDUPD<0b11101000, 0b01, "16", v4i16>;
5987*9880d681SAndroid Build Coastguard Workerdef  VDUP32d  : VDUPD<0b11101000, 0b00, "32", v2i32>,
5988*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFastVDUP32]>;
5989*9880d681SAndroid Build Coastguard Workerdef  VDUP8q   : VDUPQ<0b11101110, 0b00, "8", v16i8>;
5990*9880d681SAndroid Build Coastguard Workerdef  VDUP16q  : VDUPQ<0b11101010, 0b01, "16", v8i16>;
5991*9880d681SAndroid Build Coastguard Workerdef  VDUP32q  : VDUPQ<0b11101010, 0b00, "32", v4i32>;
5992*9880d681SAndroid Build Coastguard Worker
5993*9880d681SAndroid Build Coastguard Worker// NEONvdup patterns for uarchs with fast VDUP.32.
5994*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2f32 (NEONvdup (f32 (bitconvert GPR:$R)))), (VDUP32d GPR:$R)>,
5995*9880d681SAndroid Build Coastguard Worker      Requires<[HasNEON,HasFastVDUP32]>;
5996*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4f32 (NEONvdup (f32 (bitconvert GPR:$R)))), (VDUP32q GPR:$R)>;
5997*9880d681SAndroid Build Coastguard Worker
5998*9880d681SAndroid Build Coastguard Worker// NEONvdup patterns for uarchs with slow VDUP.32 - use VMOVDRR instead.
5999*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2i32 (NEONvdup (i32 GPR:$R))), (VMOVDRR GPR:$R, GPR:$R)>,
6000*9880d681SAndroid Build Coastguard Worker      Requires<[HasNEON,HasSlowVDUP32]>;
6001*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2f32 (NEONvdup (f32 (bitconvert GPR:$R)))), (VMOVDRR GPR:$R, GPR:$R)>,
6002*9880d681SAndroid Build Coastguard Worker      Requires<[HasNEON,HasSlowVDUP32]>;
6003*9880d681SAndroid Build Coastguard Worker
6004*9880d681SAndroid Build Coastguard Worker//   VDUP     : Vector Duplicate Lane (from scalar to all elements)
6005*9880d681SAndroid Build Coastguard Worker
6006*9880d681SAndroid Build Coastguard Workerclass VDUPLND<bits<4> op19_16, string OpcodeStr, string Dt,
6007*9880d681SAndroid Build Coastguard Worker              ValueType Ty, Operand IdxTy>
6008*9880d681SAndroid Build Coastguard Worker  : NVDupLane<op19_16, 0, (outs DPR:$Vd), (ins DPR:$Vm, IdxTy:$lane),
6009*9880d681SAndroid Build Coastguard Worker              IIC_VMOVD, OpcodeStr, Dt, "$Vd, $Vm$lane",
6010*9880d681SAndroid Build Coastguard Worker              [(set DPR:$Vd, (Ty (NEONvduplane (Ty DPR:$Vm), imm:$lane)))]>;
6011*9880d681SAndroid Build Coastguard Worker
6012*9880d681SAndroid Build Coastguard Workerclass VDUPLNQ<bits<4> op19_16, string OpcodeStr, string Dt,
6013*9880d681SAndroid Build Coastguard Worker              ValueType ResTy, ValueType OpTy, Operand IdxTy>
6014*9880d681SAndroid Build Coastguard Worker  : NVDupLane<op19_16, 1, (outs QPR:$Vd), (ins DPR:$Vm, IdxTy:$lane),
6015*9880d681SAndroid Build Coastguard Worker              IIC_VMOVQ, OpcodeStr, Dt, "$Vd, $Vm$lane",
6016*9880d681SAndroid Build Coastguard Worker              [(set QPR:$Vd, (ResTy (NEONvduplane (OpTy DPR:$Vm),
6017*9880d681SAndroid Build Coastguard Worker                                      VectorIndex32:$lane)))]>;
6018*9880d681SAndroid Build Coastguard Worker
6019*9880d681SAndroid Build Coastguard Worker// Inst{19-16} is partially specified depending on the element size.
6020*9880d681SAndroid Build Coastguard Worker
6021*9880d681SAndroid Build Coastguard Workerdef VDUPLN8d  : VDUPLND<{?,?,?,1}, "vdup", "8", v8i8, VectorIndex8> {
6022*9880d681SAndroid Build Coastguard Worker  bits<3> lane;
6023*9880d681SAndroid Build Coastguard Worker  let Inst{19-17} = lane{2-0};
6024*9880d681SAndroid Build Coastguard Worker}
6025*9880d681SAndroid Build Coastguard Workerdef VDUPLN16d : VDUPLND<{?,?,1,0}, "vdup", "16", v4i16, VectorIndex16> {
6026*9880d681SAndroid Build Coastguard Worker  bits<2> lane;
6027*9880d681SAndroid Build Coastguard Worker  let Inst{19-18} = lane{1-0};
6028*9880d681SAndroid Build Coastguard Worker}
6029*9880d681SAndroid Build Coastguard Workerdef VDUPLN32d : VDUPLND<{?,1,0,0}, "vdup", "32", v2i32, VectorIndex32> {
6030*9880d681SAndroid Build Coastguard Worker  bits<1> lane;
6031*9880d681SAndroid Build Coastguard Worker  let Inst{19} = lane{0};
6032*9880d681SAndroid Build Coastguard Worker}
6033*9880d681SAndroid Build Coastguard Workerdef VDUPLN8q  : VDUPLNQ<{?,?,?,1}, "vdup", "8", v16i8, v8i8, VectorIndex8> {
6034*9880d681SAndroid Build Coastguard Worker  bits<3> lane;
6035*9880d681SAndroid Build Coastguard Worker  let Inst{19-17} = lane{2-0};
6036*9880d681SAndroid Build Coastguard Worker}
6037*9880d681SAndroid Build Coastguard Workerdef VDUPLN16q : VDUPLNQ<{?,?,1,0}, "vdup", "16", v8i16, v4i16, VectorIndex16> {
6038*9880d681SAndroid Build Coastguard Worker  bits<2> lane;
6039*9880d681SAndroid Build Coastguard Worker  let Inst{19-18} = lane{1-0};
6040*9880d681SAndroid Build Coastguard Worker}
6041*9880d681SAndroid Build Coastguard Workerdef VDUPLN32q : VDUPLNQ<{?,1,0,0}, "vdup", "32", v4i32, v2i32, VectorIndex32> {
6042*9880d681SAndroid Build Coastguard Worker  bits<1> lane;
6043*9880d681SAndroid Build Coastguard Worker  let Inst{19} = lane{0};
6044*9880d681SAndroid Build Coastguard Worker}
6045*9880d681SAndroid Build Coastguard Worker
6046*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2f32 (NEONvduplane (v2f32 DPR:$Vm), imm:$lane)),
6047*9880d681SAndroid Build Coastguard Worker          (VDUPLN32d DPR:$Vm, imm:$lane)>;
6048*9880d681SAndroid Build Coastguard Worker
6049*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4f32 (NEONvduplane (v2f32 DPR:$Vm), imm:$lane)),
6050*9880d681SAndroid Build Coastguard Worker          (VDUPLN32q DPR:$Vm, imm:$lane)>;
6051*9880d681SAndroid Build Coastguard Worker
6052*9880d681SAndroid Build Coastguard Workerdef : Pat<(v16i8 (NEONvduplane (v16i8 QPR:$src), imm:$lane)),
6053*9880d681SAndroid Build Coastguard Worker          (v16i8 (VDUPLN8q (v8i8 (EXTRACT_SUBREG QPR:$src,
6054*9880d681SAndroid Build Coastguard Worker                                  (DSubReg_i8_reg imm:$lane))),
6055*9880d681SAndroid Build Coastguard Worker                           (SubReg_i8_lane imm:$lane)))>;
6056*9880d681SAndroid Build Coastguard Workerdef : Pat<(v8i16 (NEONvduplane (v8i16 QPR:$src), imm:$lane)),
6057*9880d681SAndroid Build Coastguard Worker          (v8i16 (VDUPLN16q (v4i16 (EXTRACT_SUBREG QPR:$src,
6058*9880d681SAndroid Build Coastguard Worker                                    (DSubReg_i16_reg imm:$lane))),
6059*9880d681SAndroid Build Coastguard Worker                            (SubReg_i16_lane imm:$lane)))>;
6060*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i32 (NEONvduplane (v4i32 QPR:$src), imm:$lane)),
6061*9880d681SAndroid Build Coastguard Worker          (v4i32 (VDUPLN32q (v2i32 (EXTRACT_SUBREG QPR:$src,
6062*9880d681SAndroid Build Coastguard Worker                                    (DSubReg_i32_reg imm:$lane))),
6063*9880d681SAndroid Build Coastguard Worker                            (SubReg_i32_lane imm:$lane)))>;
6064*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4f32 (NEONvduplane (v4f32 QPR:$src), imm:$lane)),
6065*9880d681SAndroid Build Coastguard Worker          (v4f32 (VDUPLN32q (v2f32 (EXTRACT_SUBREG QPR:$src,
6066*9880d681SAndroid Build Coastguard Worker                                   (DSubReg_i32_reg imm:$lane))),
6067*9880d681SAndroid Build Coastguard Worker                           (SubReg_i32_lane imm:$lane)))>;
6068*9880d681SAndroid Build Coastguard Worker
6069*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2f32 (NEONvdup (f32 SPR:$src))),
6070*9880d681SAndroid Build Coastguard Worker          (v2f32 (VDUPLN32d (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)),
6071*9880d681SAndroid Build Coastguard Worker                             SPR:$src, ssub_0), (i32 0)))>;
6072*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4f32 (NEONvdup (f32 SPR:$src))),
6073*9880d681SAndroid Build Coastguard Worker          (v4f32 (VDUPLN32q (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)),
6074*9880d681SAndroid Build Coastguard Worker                             SPR:$src, ssub_0), (i32 0)))>;
6075*9880d681SAndroid Build Coastguard Worker
6076*9880d681SAndroid Build Coastguard Worker//   VMOVN    : Vector Narrowing Move
6077*9880d681SAndroid Build Coastguard Workerdefm VMOVN    : N2VN_HSD<0b11,0b11,0b10,0b00100,0,0, IIC_VMOVN,
6078*9880d681SAndroid Build Coastguard Worker                         "vmovn", "i", trunc>;
6079*9880d681SAndroid Build Coastguard Worker//   VQMOVN   : Vector Saturating Narrowing Move
6080*9880d681SAndroid Build Coastguard Workerdefm VQMOVNs  : N2VNInt_HSD<0b11,0b11,0b10,0b00101,0,0, IIC_VQUNAiD,
6081*9880d681SAndroid Build Coastguard Worker                            "vqmovn", "s", int_arm_neon_vqmovns>;
6082*9880d681SAndroid Build Coastguard Workerdefm VQMOVNu  : N2VNInt_HSD<0b11,0b11,0b10,0b00101,1,0, IIC_VQUNAiD,
6083*9880d681SAndroid Build Coastguard Worker                            "vqmovn", "u", int_arm_neon_vqmovnu>;
6084*9880d681SAndroid Build Coastguard Workerdefm VQMOVNsu : N2VNInt_HSD<0b11,0b11,0b10,0b00100,1,0, IIC_VQUNAiD,
6085*9880d681SAndroid Build Coastguard Worker                            "vqmovun", "s", int_arm_neon_vqmovnsu>;
6086*9880d681SAndroid Build Coastguard Worker//   VMOVL    : Vector Lengthening Move
6087*9880d681SAndroid Build Coastguard Workerdefm VMOVLs   : N2VL_QHS<0b01,0b10100,0,1, "vmovl", "s", sext>;
6088*9880d681SAndroid Build Coastguard Workerdefm VMOVLu   : N2VL_QHS<0b11,0b10100,0,1, "vmovl", "u", zext>;
6089*9880d681SAndroid Build Coastguard Workerdef : Pat<(v8i16 (anyext (v8i8 DPR:$Vm))), (VMOVLuv8i16 DPR:$Vm)>;
6090*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i32 (anyext (v4i16 DPR:$Vm))), (VMOVLuv4i32 DPR:$Vm)>;
6091*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2i64 (anyext (v2i32 DPR:$Vm))), (VMOVLuv2i64 DPR:$Vm)>;
6092*9880d681SAndroid Build Coastguard Worker
6093*9880d681SAndroid Build Coastguard Worker// Vector Conversions.
6094*9880d681SAndroid Build Coastguard Worker
6095*9880d681SAndroid Build Coastguard Worker//   VCVT     : Vector Convert Between Floating-Point and Integers
6096*9880d681SAndroid Build Coastguard Workerdef  VCVTf2sd : N2VD<0b11, 0b11, 0b10, 0b11, 0b01110, 0, "vcvt", "s32.f32",
6097*9880d681SAndroid Build Coastguard Worker                     v2i32, v2f32, fp_to_sint>;
6098*9880d681SAndroid Build Coastguard Workerdef  VCVTf2ud : N2VD<0b11, 0b11, 0b10, 0b11, 0b01111, 0, "vcvt", "u32.f32",
6099*9880d681SAndroid Build Coastguard Worker                     v2i32, v2f32, fp_to_uint>;
6100*9880d681SAndroid Build Coastguard Workerdef  VCVTs2fd : N2VD<0b11, 0b11, 0b10, 0b11, 0b01100, 0, "vcvt", "f32.s32",
6101*9880d681SAndroid Build Coastguard Worker                     v2f32, v2i32, sint_to_fp>;
6102*9880d681SAndroid Build Coastguard Workerdef  VCVTu2fd : N2VD<0b11, 0b11, 0b10, 0b11, 0b01101, 0, "vcvt", "f32.u32",
6103*9880d681SAndroid Build Coastguard Worker                     v2f32, v2i32, uint_to_fp>;
6104*9880d681SAndroid Build Coastguard Worker
6105*9880d681SAndroid Build Coastguard Workerdef  VCVTf2sq : N2VQ<0b11, 0b11, 0b10, 0b11, 0b01110, 0, "vcvt", "s32.f32",
6106*9880d681SAndroid Build Coastguard Worker                     v4i32, v4f32, fp_to_sint>;
6107*9880d681SAndroid Build Coastguard Workerdef  VCVTf2uq : N2VQ<0b11, 0b11, 0b10, 0b11, 0b01111, 0, "vcvt", "u32.f32",
6108*9880d681SAndroid Build Coastguard Worker                     v4i32, v4f32, fp_to_uint>;
6109*9880d681SAndroid Build Coastguard Workerdef  VCVTs2fq : N2VQ<0b11, 0b11, 0b10, 0b11, 0b01100, 0, "vcvt", "f32.s32",
6110*9880d681SAndroid Build Coastguard Worker                     v4f32, v4i32, sint_to_fp>;
6111*9880d681SAndroid Build Coastguard Workerdef  VCVTu2fq : N2VQ<0b11, 0b11, 0b10, 0b11, 0b01101, 0, "vcvt", "f32.u32",
6112*9880d681SAndroid Build Coastguard Worker                     v4f32, v4i32, uint_to_fp>;
6113*9880d681SAndroid Build Coastguard Worker
6114*9880d681SAndroid Build Coastguard Workerdef  VCVTh2sd : N2VD<0b11, 0b11, 0b01, 0b11, 0b01110, 0, "vcvt", "s16.f16",
6115*9880d681SAndroid Build Coastguard Worker                     v4i16, v4f16, fp_to_sint>,
6116*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
6117*9880d681SAndroid Build Coastguard Workerdef  VCVTh2ud : N2VD<0b11, 0b11, 0b01, 0b11, 0b01111, 0, "vcvt", "u16.f16",
6118*9880d681SAndroid Build Coastguard Worker                     v4i16, v4f16, fp_to_uint>,
6119*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
6120*9880d681SAndroid Build Coastguard Workerdef  VCVTs2hd : N2VD<0b11, 0b11, 0b01, 0b11, 0b01100, 0, "vcvt", "f16.s16",
6121*9880d681SAndroid Build Coastguard Worker                     v4f16, v4i16, sint_to_fp>,
6122*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
6123*9880d681SAndroid Build Coastguard Workerdef  VCVTu2hd : N2VD<0b11, 0b11, 0b01, 0b11, 0b01101, 0, "vcvt", "f16.u16",
6124*9880d681SAndroid Build Coastguard Worker                     v4f16, v4i16, uint_to_fp>,
6125*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
6126*9880d681SAndroid Build Coastguard Worker
6127*9880d681SAndroid Build Coastguard Workerdef  VCVTh2sq : N2VQ<0b11, 0b11, 0b01, 0b11, 0b01110, 0, "vcvt", "s16.f16",
6128*9880d681SAndroid Build Coastguard Worker                     v8i16, v8f16, fp_to_sint>,
6129*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
6130*9880d681SAndroid Build Coastguard Workerdef  VCVTh2uq : N2VQ<0b11, 0b11, 0b01, 0b11, 0b01111, 0, "vcvt", "u16.f16",
6131*9880d681SAndroid Build Coastguard Worker                     v8i16, v8f16, fp_to_uint>,
6132*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
6133*9880d681SAndroid Build Coastguard Workerdef  VCVTs2hq : N2VQ<0b11, 0b11, 0b01, 0b11, 0b01100, 0, "vcvt", "f16.s16",
6134*9880d681SAndroid Build Coastguard Worker                     v8f16, v8i16, sint_to_fp>,
6135*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
6136*9880d681SAndroid Build Coastguard Workerdef  VCVTu2hq : N2VQ<0b11, 0b11, 0b01, 0b11, 0b01101, 0, "vcvt", "f16.u16",
6137*9880d681SAndroid Build Coastguard Worker                     v8f16, v8i16, uint_to_fp>,
6138*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFullFP16]>;
6139*9880d681SAndroid Build Coastguard Worker
6140*9880d681SAndroid Build Coastguard Worker// VCVT{A, N, P, M}
6141*9880d681SAndroid Build Coastguard Workermulticlass VCVT_FPI<string op, bits<3> op10_8, SDPatternOperator IntS,
6142*9880d681SAndroid Build Coastguard Worker                    SDPatternOperator IntU> {
6143*9880d681SAndroid Build Coastguard Worker  let PostEncoderMethod = "NEONThumb2V8PostEncoder", DecoderNamespace = "v8NEON" in {
6144*9880d681SAndroid Build Coastguard Worker    def SDf : N2VDIntnp<0b10, 0b11, op10_8, 0, NoItinerary, !strconcat("vcvt", op),
6145*9880d681SAndroid Build Coastguard Worker                       "s32.f32", v2i32, v2f32, IntS>, Requires<[HasV8, HasNEON]>;
6146*9880d681SAndroid Build Coastguard Worker    def SQf : N2VQIntnp<0b10, 0b11, op10_8, 0, NoItinerary, !strconcat("vcvt", op),
6147*9880d681SAndroid Build Coastguard Worker                       "s32.f32", v4i32, v4f32, IntS>, Requires<[HasV8, HasNEON]>;
6148*9880d681SAndroid Build Coastguard Worker    def UDf : N2VDIntnp<0b10, 0b11, op10_8, 1, NoItinerary, !strconcat("vcvt", op),
6149*9880d681SAndroid Build Coastguard Worker                       "u32.f32", v2i32, v2f32, IntU>, Requires<[HasV8, HasNEON]>;
6150*9880d681SAndroid Build Coastguard Worker    def UQf : N2VQIntnp<0b10, 0b11, op10_8, 1, NoItinerary, !strconcat("vcvt", op),
6151*9880d681SAndroid Build Coastguard Worker                       "u32.f32", v4i32, v4f32, IntU>, Requires<[HasV8, HasNEON]>;
6152*9880d681SAndroid Build Coastguard Worker    def SDh : N2VDIntnp<0b01, 0b11, op10_8, 0, NoItinerary, !strconcat("vcvt", op),
6153*9880d681SAndroid Build Coastguard Worker                       "s16.f16", v4i16, v4f16, IntS>,
6154*9880d681SAndroid Build Coastguard Worker              Requires<[HasV8, HasNEON, HasFullFP16]>;
6155*9880d681SAndroid Build Coastguard Worker    def SQh : N2VQIntnp<0b01, 0b11, op10_8, 0, NoItinerary, !strconcat("vcvt", op),
6156*9880d681SAndroid Build Coastguard Worker                       "s16.f16", v8i16, v8f16, IntS>,
6157*9880d681SAndroid Build Coastguard Worker              Requires<[HasV8, HasNEON, HasFullFP16]>;
6158*9880d681SAndroid Build Coastguard Worker    def UDh : N2VDIntnp<0b01, 0b11, op10_8, 1, NoItinerary, !strconcat("vcvt", op),
6159*9880d681SAndroid Build Coastguard Worker                       "u16.f16", v4i16, v4f16, IntU>,
6160*9880d681SAndroid Build Coastguard Worker              Requires<[HasV8, HasNEON, HasFullFP16]>;
6161*9880d681SAndroid Build Coastguard Worker    def UQh : N2VQIntnp<0b01, 0b11, op10_8, 1, NoItinerary, !strconcat("vcvt", op),
6162*9880d681SAndroid Build Coastguard Worker                       "u16.f16", v8i16, v8f16, IntU>,
6163*9880d681SAndroid Build Coastguard Worker              Requires<[HasV8, HasNEON, HasFullFP16]>;
6164*9880d681SAndroid Build Coastguard Worker  }
6165*9880d681SAndroid Build Coastguard Worker}
6166*9880d681SAndroid Build Coastguard Worker
6167*9880d681SAndroid Build Coastguard Workerdefm VCVTAN : VCVT_FPI<"a", 0b000, int_arm_neon_vcvtas, int_arm_neon_vcvtau>;
6168*9880d681SAndroid Build Coastguard Workerdefm VCVTNN : VCVT_FPI<"n", 0b001, int_arm_neon_vcvtns, int_arm_neon_vcvtnu>;
6169*9880d681SAndroid Build Coastguard Workerdefm VCVTPN : VCVT_FPI<"p", 0b010, int_arm_neon_vcvtps, int_arm_neon_vcvtpu>;
6170*9880d681SAndroid Build Coastguard Workerdefm VCVTMN : VCVT_FPI<"m", 0b011, int_arm_neon_vcvtms, int_arm_neon_vcvtmu>;
6171*9880d681SAndroid Build Coastguard Worker
6172*9880d681SAndroid Build Coastguard Worker//   VCVT     : Vector Convert Between Floating-Point and Fixed-Point.
6173*9880d681SAndroid Build Coastguard Workerlet DecoderMethod = "DecodeVCVTD" in {
6174*9880d681SAndroid Build Coastguard Workerdef VCVTf2xsd : N2VCvtD<0, 1, 0b1111, 0, 1, "vcvt", "s32.f32",
6175*9880d681SAndroid Build Coastguard Worker                        v2i32, v2f32, int_arm_neon_vcvtfp2fxs>;
6176*9880d681SAndroid Build Coastguard Workerdef VCVTf2xud : N2VCvtD<1, 1, 0b1111, 0, 1, "vcvt", "u32.f32",
6177*9880d681SAndroid Build Coastguard Worker                        v2i32, v2f32, int_arm_neon_vcvtfp2fxu>;
6178*9880d681SAndroid Build Coastguard Workerdef VCVTxs2fd : N2VCvtD<0, 1, 0b1110, 0, 1, "vcvt", "f32.s32",
6179*9880d681SAndroid Build Coastguard Worker                        v2f32, v2i32, int_arm_neon_vcvtfxs2fp>;
6180*9880d681SAndroid Build Coastguard Workerdef VCVTxu2fd : N2VCvtD<1, 1, 0b1110, 0, 1, "vcvt", "f32.u32",
6181*9880d681SAndroid Build Coastguard Worker                        v2f32, v2i32, int_arm_neon_vcvtfxu2fp>;
6182*9880d681SAndroid Build Coastguard Workerlet Predicates = [HasNEON, HasFullFP16] in {
6183*9880d681SAndroid Build Coastguard Workerdef VCVTh2xsd : N2VCvtD<0, 1, 0b1101, 0, 1, "vcvt", "s16.f16",
6184*9880d681SAndroid Build Coastguard Worker                        v4i16, v4f16, int_arm_neon_vcvtfp2fxs>;
6185*9880d681SAndroid Build Coastguard Workerdef VCVTh2xud : N2VCvtD<1, 1, 0b1101, 0, 1, "vcvt", "u16.f16",
6186*9880d681SAndroid Build Coastguard Worker                        v4i16, v4f16, int_arm_neon_vcvtfp2fxu>;
6187*9880d681SAndroid Build Coastguard Workerdef VCVTxs2hd : N2VCvtD<0, 1, 0b1100, 0, 1, "vcvt", "f16.s16",
6188*9880d681SAndroid Build Coastguard Worker                        v4f16, v4i16, int_arm_neon_vcvtfxs2fp>;
6189*9880d681SAndroid Build Coastguard Workerdef VCVTxu2hd : N2VCvtD<1, 1, 0b1100, 0, 1, "vcvt", "f16.u16",
6190*9880d681SAndroid Build Coastguard Worker                        v4f16, v4i16, int_arm_neon_vcvtfxu2fp>;
6191*9880d681SAndroid Build Coastguard Worker} // Predicates = [HasNEON, HasFullFP16]
6192*9880d681SAndroid Build Coastguard Worker}
6193*9880d681SAndroid Build Coastguard Worker
6194*9880d681SAndroid Build Coastguard Workerlet DecoderMethod = "DecodeVCVTQ" in {
6195*9880d681SAndroid Build Coastguard Workerdef VCVTf2xsq : N2VCvtQ<0, 1, 0b1111, 0, 1, "vcvt", "s32.f32",
6196*9880d681SAndroid Build Coastguard Worker                        v4i32, v4f32, int_arm_neon_vcvtfp2fxs>;
6197*9880d681SAndroid Build Coastguard Workerdef VCVTf2xuq : N2VCvtQ<1, 1, 0b1111, 0, 1, "vcvt", "u32.f32",
6198*9880d681SAndroid Build Coastguard Worker                        v4i32, v4f32, int_arm_neon_vcvtfp2fxu>;
6199*9880d681SAndroid Build Coastguard Workerdef VCVTxs2fq : N2VCvtQ<0, 1, 0b1110, 0, 1, "vcvt", "f32.s32",
6200*9880d681SAndroid Build Coastguard Worker                        v4f32, v4i32, int_arm_neon_vcvtfxs2fp>;
6201*9880d681SAndroid Build Coastguard Workerdef VCVTxu2fq : N2VCvtQ<1, 1, 0b1110, 0, 1, "vcvt", "f32.u32",
6202*9880d681SAndroid Build Coastguard Worker                        v4f32, v4i32, int_arm_neon_vcvtfxu2fp>;
6203*9880d681SAndroid Build Coastguard Workerlet Predicates = [HasNEON, HasFullFP16] in {
6204*9880d681SAndroid Build Coastguard Workerdef VCVTh2xsq : N2VCvtQ<0, 1, 0b1101, 0, 1, "vcvt", "s16.f16",
6205*9880d681SAndroid Build Coastguard Worker                        v8i16, v8f16, int_arm_neon_vcvtfp2fxs>;
6206*9880d681SAndroid Build Coastguard Workerdef VCVTh2xuq : N2VCvtQ<1, 1, 0b1101, 0, 1, "vcvt", "u16.f16",
6207*9880d681SAndroid Build Coastguard Worker                        v8i16, v8f16, int_arm_neon_vcvtfp2fxu>;
6208*9880d681SAndroid Build Coastguard Workerdef VCVTxs2hq : N2VCvtQ<0, 1, 0b1100, 0, 1, "vcvt", "f16.s16",
6209*9880d681SAndroid Build Coastguard Worker                        v8f16, v8i16, int_arm_neon_vcvtfxs2fp>;
6210*9880d681SAndroid Build Coastguard Workerdef VCVTxu2hq : N2VCvtQ<1, 1, 0b1100, 0, 1, "vcvt", "f16.u16",
6211*9880d681SAndroid Build Coastguard Worker                        v8f16, v8i16, int_arm_neon_vcvtfxu2fp>;
6212*9880d681SAndroid Build Coastguard Worker} // Predicates = [HasNEON, HasFullFP16]
6213*9880d681SAndroid Build Coastguard Worker}
6214*9880d681SAndroid Build Coastguard Worker
6215*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcvt${p}.s32.f32 $Dd, $Dm, #0",
6216*9880d681SAndroid Build Coastguard Worker                    (VCVTf2sd DPR:$Dd, DPR:$Dm, pred:$p)>;
6217*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcvt${p}.u32.f32 $Dd, $Dm, #0",
6218*9880d681SAndroid Build Coastguard Worker                    (VCVTf2ud DPR:$Dd, DPR:$Dm, pred:$p)>;
6219*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcvt${p}.f32.s32 $Dd, $Dm, #0",
6220*9880d681SAndroid Build Coastguard Worker                    (VCVTs2fd DPR:$Dd, DPR:$Dm, pred:$p)>;
6221*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcvt${p}.f32.u32 $Dd, $Dm, #0",
6222*9880d681SAndroid Build Coastguard Worker                    (VCVTu2fd DPR:$Dd, DPR:$Dm, pred:$p)>;
6223*9880d681SAndroid Build Coastguard Worker
6224*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcvt${p}.s32.f32 $Qd, $Qm, #0",
6225*9880d681SAndroid Build Coastguard Worker                    (VCVTf2sq QPR:$Qd, QPR:$Qm, pred:$p)>;
6226*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcvt${p}.u32.f32 $Qd, $Qm, #0",
6227*9880d681SAndroid Build Coastguard Worker                    (VCVTf2uq QPR:$Qd, QPR:$Qm, pred:$p)>;
6228*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcvt${p}.f32.s32 $Qd, $Qm, #0",
6229*9880d681SAndroid Build Coastguard Worker                    (VCVTs2fq QPR:$Qd, QPR:$Qm, pred:$p)>;
6230*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcvt${p}.f32.u32 $Qd, $Qm, #0",
6231*9880d681SAndroid Build Coastguard Worker                    (VCVTu2fq QPR:$Qd, QPR:$Qm, pred:$p)>;
6232*9880d681SAndroid Build Coastguard Worker
6233*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcvt${p}.s16.f16 $Dd, $Dm, #0",
6234*9880d681SAndroid Build Coastguard Worker                    (VCVTh2sd DPR:$Dd, DPR:$Dm, pred:$p)>;
6235*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcvt${p}.u16.f16 $Dd, $Dm, #0",
6236*9880d681SAndroid Build Coastguard Worker                    (VCVTh2ud DPR:$Dd, DPR:$Dm, pred:$p)>;
6237*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcvt${p}.f16.s16 $Dd, $Dm, #0",
6238*9880d681SAndroid Build Coastguard Worker                    (VCVTs2hd DPR:$Dd, DPR:$Dm, pred:$p)>;
6239*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcvt${p}.f16.u16 $Dd, $Dm, #0",
6240*9880d681SAndroid Build Coastguard Worker                    (VCVTu2hd DPR:$Dd, DPR:$Dm, pred:$p)>;
6241*9880d681SAndroid Build Coastguard Worker
6242*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcvt${p}.s16.f16 $Qd, $Qm, #0",
6243*9880d681SAndroid Build Coastguard Worker                    (VCVTh2sq QPR:$Qd, QPR:$Qm, pred:$p)>;
6244*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcvt${p}.u16.f16 $Qd, $Qm, #0",
6245*9880d681SAndroid Build Coastguard Worker                    (VCVTh2uq QPR:$Qd, QPR:$Qm, pred:$p)>;
6246*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcvt${p}.f16.s16 $Qd, $Qm, #0",
6247*9880d681SAndroid Build Coastguard Worker                    (VCVTs2hq QPR:$Qd, QPR:$Qm, pred:$p)>;
6248*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcvt${p}.f16.u16 $Qd, $Qm, #0",
6249*9880d681SAndroid Build Coastguard Worker                    (VCVTu2hq QPR:$Qd, QPR:$Qm, pred:$p)>;
6250*9880d681SAndroid Build Coastguard Worker
6251*9880d681SAndroid Build Coastguard Worker
6252*9880d681SAndroid Build Coastguard Worker//   VCVT     : Vector Convert Between Half-Precision and Single-Precision.
6253*9880d681SAndroid Build Coastguard Workerdef  VCVTf2h  : N2VNInt<0b11, 0b11, 0b01, 0b10, 0b01100, 0, 0,
6254*9880d681SAndroid Build Coastguard Worker                        IIC_VUNAQ, "vcvt", "f16.f32",
6255*9880d681SAndroid Build Coastguard Worker                        v4i16, v4f32, int_arm_neon_vcvtfp2hf>,
6256*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFP16]>;
6257*9880d681SAndroid Build Coastguard Workerdef  VCVTh2f  : N2VLInt<0b11, 0b11, 0b01, 0b10, 0b01110, 0, 0,
6258*9880d681SAndroid Build Coastguard Worker                        IIC_VUNAQ, "vcvt", "f32.f16",
6259*9880d681SAndroid Build Coastguard Worker                        v4f32, v4i16, int_arm_neon_vcvthf2fp>,
6260*9880d681SAndroid Build Coastguard Worker                Requires<[HasNEON, HasFP16]>;
6261*9880d681SAndroid Build Coastguard Worker
6262*9880d681SAndroid Build Coastguard Worker// Vector Reverse.
6263*9880d681SAndroid Build Coastguard Worker
6264*9880d681SAndroid Build Coastguard Worker//   VREV64   : Vector Reverse elements within 64-bit doublewords
6265*9880d681SAndroid Build Coastguard Worker
6266*9880d681SAndroid Build Coastguard Workerclass VREV64D<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty>
6267*9880d681SAndroid Build Coastguard Worker  : N2V<0b11, 0b11, op19_18, 0b00, 0b00000, 0, 0, (outs DPR:$Vd),
6268*9880d681SAndroid Build Coastguard Worker        (ins DPR:$Vm), IIC_VMOVD,
6269*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vm", "",
6270*9880d681SAndroid Build Coastguard Worker        [(set DPR:$Vd, (Ty (NEONvrev64 (Ty DPR:$Vm))))]>;
6271*9880d681SAndroid Build Coastguard Workerclass VREV64Q<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty>
6272*9880d681SAndroid Build Coastguard Worker  : N2V<0b11, 0b11, op19_18, 0b00, 0b00000, 1, 0, (outs QPR:$Vd),
6273*9880d681SAndroid Build Coastguard Worker        (ins QPR:$Vm), IIC_VMOVQ,
6274*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vm", "",
6275*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd, (Ty (NEONvrev64 (Ty QPR:$Vm))))]>;
6276*9880d681SAndroid Build Coastguard Worker
6277*9880d681SAndroid Build Coastguard Workerdef VREV64d8  : VREV64D<0b00, "vrev64", "8", v8i8>;
6278*9880d681SAndroid Build Coastguard Workerdef VREV64d16 : VREV64D<0b01, "vrev64", "16", v4i16>;
6279*9880d681SAndroid Build Coastguard Workerdef VREV64d32 : VREV64D<0b10, "vrev64", "32", v2i32>;
6280*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2f32 (NEONvrev64 (v2f32 DPR:$Vm))), (VREV64d32 DPR:$Vm)>;
6281*9880d681SAndroid Build Coastguard Worker
6282*9880d681SAndroid Build Coastguard Workerdef VREV64q8  : VREV64Q<0b00, "vrev64", "8", v16i8>;
6283*9880d681SAndroid Build Coastguard Workerdef VREV64q16 : VREV64Q<0b01, "vrev64", "16", v8i16>;
6284*9880d681SAndroid Build Coastguard Workerdef VREV64q32 : VREV64Q<0b10, "vrev64", "32", v4i32>;
6285*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4f32 (NEONvrev64 (v4f32 QPR:$Vm))), (VREV64q32 QPR:$Vm)>;
6286*9880d681SAndroid Build Coastguard Worker
6287*9880d681SAndroid Build Coastguard Worker//   VREV32   : Vector Reverse elements within 32-bit words
6288*9880d681SAndroid Build Coastguard Worker
6289*9880d681SAndroid Build Coastguard Workerclass VREV32D<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty>
6290*9880d681SAndroid Build Coastguard Worker  : N2V<0b11, 0b11, op19_18, 0b00, 0b00001, 0, 0, (outs DPR:$Vd),
6291*9880d681SAndroid Build Coastguard Worker        (ins DPR:$Vm), IIC_VMOVD,
6292*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vm", "",
6293*9880d681SAndroid Build Coastguard Worker        [(set DPR:$Vd, (Ty (NEONvrev32 (Ty DPR:$Vm))))]>;
6294*9880d681SAndroid Build Coastguard Workerclass VREV32Q<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty>
6295*9880d681SAndroid Build Coastguard Worker  : N2V<0b11, 0b11, op19_18, 0b00, 0b00001, 1, 0, (outs QPR:$Vd),
6296*9880d681SAndroid Build Coastguard Worker        (ins QPR:$Vm), IIC_VMOVQ,
6297*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vm", "",
6298*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd, (Ty (NEONvrev32 (Ty QPR:$Vm))))]>;
6299*9880d681SAndroid Build Coastguard Worker
6300*9880d681SAndroid Build Coastguard Workerdef VREV32d8  : VREV32D<0b00, "vrev32", "8", v8i8>;
6301*9880d681SAndroid Build Coastguard Workerdef VREV32d16 : VREV32D<0b01, "vrev32", "16", v4i16>;
6302*9880d681SAndroid Build Coastguard Worker
6303*9880d681SAndroid Build Coastguard Workerdef VREV32q8  : VREV32Q<0b00, "vrev32", "8", v16i8>;
6304*9880d681SAndroid Build Coastguard Workerdef VREV32q16 : VREV32Q<0b01, "vrev32", "16", v8i16>;
6305*9880d681SAndroid Build Coastguard Worker
6306*9880d681SAndroid Build Coastguard Worker//   VREV16   : Vector Reverse elements within 16-bit halfwords
6307*9880d681SAndroid Build Coastguard Worker
6308*9880d681SAndroid Build Coastguard Workerclass VREV16D<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty>
6309*9880d681SAndroid Build Coastguard Worker  : N2V<0b11, 0b11, op19_18, 0b00, 0b00010, 0, 0, (outs DPR:$Vd),
6310*9880d681SAndroid Build Coastguard Worker        (ins DPR:$Vm), IIC_VMOVD,
6311*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vm", "",
6312*9880d681SAndroid Build Coastguard Worker        [(set DPR:$Vd, (Ty (NEONvrev16 (Ty DPR:$Vm))))]>;
6313*9880d681SAndroid Build Coastguard Workerclass VREV16Q<bits<2> op19_18, string OpcodeStr, string Dt, ValueType Ty>
6314*9880d681SAndroid Build Coastguard Worker  : N2V<0b11, 0b11, op19_18, 0b00, 0b00010, 1, 0, (outs QPR:$Vd),
6315*9880d681SAndroid Build Coastguard Worker        (ins QPR:$Vm), IIC_VMOVQ,
6316*9880d681SAndroid Build Coastguard Worker        OpcodeStr, Dt, "$Vd, $Vm", "",
6317*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd, (Ty (NEONvrev16 (Ty QPR:$Vm))))]>;
6318*9880d681SAndroid Build Coastguard Worker
6319*9880d681SAndroid Build Coastguard Workerdef VREV16d8  : VREV16D<0b00, "vrev16", "8", v8i8>;
6320*9880d681SAndroid Build Coastguard Workerdef VREV16q8  : VREV16Q<0b00, "vrev16", "8", v16i8>;
6321*9880d681SAndroid Build Coastguard Worker
6322*9880d681SAndroid Build Coastguard Worker// Other Vector Shuffles.
6323*9880d681SAndroid Build Coastguard Worker
6324*9880d681SAndroid Build Coastguard Worker//  Aligned extractions: really just dropping registers
6325*9880d681SAndroid Build Coastguard Worker
6326*9880d681SAndroid Build Coastguard Workerclass AlignedVEXTq<ValueType DestTy, ValueType SrcTy, SDNodeXForm LaneCVT>
6327*9880d681SAndroid Build Coastguard Worker      : Pat<(DestTy (vector_extract_subvec (SrcTy QPR:$src), (i32 imm:$start))),
6328*9880d681SAndroid Build Coastguard Worker             (EXTRACT_SUBREG (SrcTy QPR:$src), (LaneCVT imm:$start))>;
6329*9880d681SAndroid Build Coastguard Worker
6330*9880d681SAndroid Build Coastguard Workerdef : AlignedVEXTq<v8i8, v16i8, DSubReg_i8_reg>;
6331*9880d681SAndroid Build Coastguard Worker
6332*9880d681SAndroid Build Coastguard Workerdef : AlignedVEXTq<v4i16, v8i16, DSubReg_i16_reg>;
6333*9880d681SAndroid Build Coastguard Worker
6334*9880d681SAndroid Build Coastguard Workerdef : AlignedVEXTq<v2i32, v4i32, DSubReg_i32_reg>;
6335*9880d681SAndroid Build Coastguard Worker
6336*9880d681SAndroid Build Coastguard Workerdef : AlignedVEXTq<v1i64, v2i64, DSubReg_f64_reg>;
6337*9880d681SAndroid Build Coastguard Worker
6338*9880d681SAndroid Build Coastguard Workerdef : AlignedVEXTq<v2f32, v4f32, DSubReg_i32_reg>;
6339*9880d681SAndroid Build Coastguard Worker
6340*9880d681SAndroid Build Coastguard Worker
6341*9880d681SAndroid Build Coastguard Worker//   VEXT     : Vector Extract
6342*9880d681SAndroid Build Coastguard Worker
6343*9880d681SAndroid Build Coastguard Worker
6344*9880d681SAndroid Build Coastguard Worker// All of these have a two-operand InstAlias.
6345*9880d681SAndroid Build Coastguard Workerlet TwoOperandAliasConstraint = "$Vn = $Vd" in {
6346*9880d681SAndroid Build Coastguard Workerclass VEXTd<string OpcodeStr, string Dt, ValueType Ty, Operand immTy>
6347*9880d681SAndroid Build Coastguard Worker  : N3V<0,1,0b11,{?,?,?,?},0,0, (outs DPR:$Vd),
6348*9880d681SAndroid Build Coastguard Worker        (ins DPR:$Vn, DPR:$Vm, immTy:$index), NVExtFrm,
6349*9880d681SAndroid Build Coastguard Worker        IIC_VEXTD, OpcodeStr, Dt, "$Vd, $Vn, $Vm, $index", "",
6350*9880d681SAndroid Build Coastguard Worker        [(set DPR:$Vd, (Ty (NEONvext (Ty DPR:$Vn),
6351*9880d681SAndroid Build Coastguard Worker                                     (Ty DPR:$Vm), imm:$index)))]> {
6352*9880d681SAndroid Build Coastguard Worker  bits<3> index;
6353*9880d681SAndroid Build Coastguard Worker  let Inst{11} = 0b0;
6354*9880d681SAndroid Build Coastguard Worker  let Inst{10-8} = index{2-0};
6355*9880d681SAndroid Build Coastguard Worker}
6356*9880d681SAndroid Build Coastguard Worker
6357*9880d681SAndroid Build Coastguard Workerclass VEXTq<string OpcodeStr, string Dt, ValueType Ty, Operand immTy>
6358*9880d681SAndroid Build Coastguard Worker  : N3V<0,1,0b11,{?,?,?,?},1,0, (outs QPR:$Vd),
6359*9880d681SAndroid Build Coastguard Worker        (ins QPR:$Vn, QPR:$Vm, imm0_15:$index), NVExtFrm,
6360*9880d681SAndroid Build Coastguard Worker        IIC_VEXTQ, OpcodeStr, Dt, "$Vd, $Vn, $Vm, $index", "",
6361*9880d681SAndroid Build Coastguard Worker        [(set QPR:$Vd, (Ty (NEONvext (Ty QPR:$Vn),
6362*9880d681SAndroid Build Coastguard Worker                                     (Ty QPR:$Vm), imm:$index)))]> {
6363*9880d681SAndroid Build Coastguard Worker  bits<4> index;
6364*9880d681SAndroid Build Coastguard Worker  let Inst{11-8} = index{3-0};
6365*9880d681SAndroid Build Coastguard Worker}
6366*9880d681SAndroid Build Coastguard Worker}
6367*9880d681SAndroid Build Coastguard Worker
6368*9880d681SAndroid Build Coastguard Workerdef VEXTd8  : VEXTd<"vext", "8",  v8i8, imm0_7> {
6369*9880d681SAndroid Build Coastguard Worker  let Inst{10-8} = index{2-0};
6370*9880d681SAndroid Build Coastguard Worker}
6371*9880d681SAndroid Build Coastguard Workerdef VEXTd16 : VEXTd<"vext", "16", v4i16, imm0_3> {
6372*9880d681SAndroid Build Coastguard Worker  let Inst{10-9} = index{1-0};
6373*9880d681SAndroid Build Coastguard Worker  let Inst{8}    = 0b0;
6374*9880d681SAndroid Build Coastguard Worker}
6375*9880d681SAndroid Build Coastguard Workerdef VEXTd32 : VEXTd<"vext", "32", v2i32, imm0_1> {
6376*9880d681SAndroid Build Coastguard Worker  let Inst{10}     = index{0};
6377*9880d681SAndroid Build Coastguard Worker  let Inst{9-8}    = 0b00;
6378*9880d681SAndroid Build Coastguard Worker}
6379*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2f32 (NEONvext (v2f32 DPR:$Vn),
6380*9880d681SAndroid Build Coastguard Worker                           (v2f32 DPR:$Vm),
6381*9880d681SAndroid Build Coastguard Worker                           (i32 imm:$index))),
6382*9880d681SAndroid Build Coastguard Worker          (VEXTd32 DPR:$Vn, DPR:$Vm, imm:$index)>;
6383*9880d681SAndroid Build Coastguard Worker
6384*9880d681SAndroid Build Coastguard Workerdef VEXTq8  : VEXTq<"vext", "8",  v16i8, imm0_15> {
6385*9880d681SAndroid Build Coastguard Worker  let Inst{11-8} = index{3-0};
6386*9880d681SAndroid Build Coastguard Worker}
6387*9880d681SAndroid Build Coastguard Workerdef VEXTq16 : VEXTq<"vext", "16", v8i16, imm0_7> {
6388*9880d681SAndroid Build Coastguard Worker  let Inst{11-9} = index{2-0};
6389*9880d681SAndroid Build Coastguard Worker  let Inst{8}    = 0b0;
6390*9880d681SAndroid Build Coastguard Worker}
6391*9880d681SAndroid Build Coastguard Workerdef VEXTq32 : VEXTq<"vext", "32", v4i32, imm0_3> {
6392*9880d681SAndroid Build Coastguard Worker  let Inst{11-10} = index{1-0};
6393*9880d681SAndroid Build Coastguard Worker  let Inst{9-8}    = 0b00;
6394*9880d681SAndroid Build Coastguard Worker}
6395*9880d681SAndroid Build Coastguard Workerdef VEXTq64 : VEXTq<"vext", "64", v2i64, imm0_1> {
6396*9880d681SAndroid Build Coastguard Worker  let Inst{11} = index{0};
6397*9880d681SAndroid Build Coastguard Worker  let Inst{10-8}    = 0b000;
6398*9880d681SAndroid Build Coastguard Worker}
6399*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4f32 (NEONvext (v4f32 QPR:$Vn),
6400*9880d681SAndroid Build Coastguard Worker                           (v4f32 QPR:$Vm),
6401*9880d681SAndroid Build Coastguard Worker                           (i32 imm:$index))),
6402*9880d681SAndroid Build Coastguard Worker          (VEXTq32 QPR:$Vn, QPR:$Vm, imm:$index)>;
6403*9880d681SAndroid Build Coastguard Worker
6404*9880d681SAndroid Build Coastguard Worker//   VTRN     : Vector Transpose
6405*9880d681SAndroid Build Coastguard Worker
6406*9880d681SAndroid Build Coastguard Workerdef  VTRNd8   : N2VDShuffle<0b00, 0b00001, "vtrn", "8">;
6407*9880d681SAndroid Build Coastguard Workerdef  VTRNd16  : N2VDShuffle<0b01, 0b00001, "vtrn", "16">;
6408*9880d681SAndroid Build Coastguard Workerdef  VTRNd32  : N2VDShuffle<0b10, 0b00001, "vtrn", "32">;
6409*9880d681SAndroid Build Coastguard Worker
6410*9880d681SAndroid Build Coastguard Workerdef  VTRNq8   : N2VQShuffle<0b00, 0b00001, IIC_VPERMQ, "vtrn", "8">;
6411*9880d681SAndroid Build Coastguard Workerdef  VTRNq16  : N2VQShuffle<0b01, 0b00001, IIC_VPERMQ, "vtrn", "16">;
6412*9880d681SAndroid Build Coastguard Workerdef  VTRNq32  : N2VQShuffle<0b10, 0b00001, IIC_VPERMQ, "vtrn", "32">;
6413*9880d681SAndroid Build Coastguard Worker
6414*9880d681SAndroid Build Coastguard Worker//   VUZP     : Vector Unzip (Deinterleave)
6415*9880d681SAndroid Build Coastguard Worker
6416*9880d681SAndroid Build Coastguard Workerdef  VUZPd8   : N2VDShuffle<0b00, 0b00010, "vuzp", "8">;
6417*9880d681SAndroid Build Coastguard Workerdef  VUZPd16  : N2VDShuffle<0b01, 0b00010, "vuzp", "16">;
6418*9880d681SAndroid Build Coastguard Worker// vuzp.32 Dd, Dm is a pseudo-instruction expanded to vtrn.32 Dd, Dm.
6419*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vuzp${p}.32 $Dd, $Dm",
6420*9880d681SAndroid Build Coastguard Worker                    (VTRNd32 DPR:$Dd, DPR:$Dm, pred:$p)>;
6421*9880d681SAndroid Build Coastguard Worker
6422*9880d681SAndroid Build Coastguard Workerdef  VUZPq8   : N2VQShuffle<0b00, 0b00010, IIC_VPERMQ3, "vuzp", "8">;
6423*9880d681SAndroid Build Coastguard Workerdef  VUZPq16  : N2VQShuffle<0b01, 0b00010, IIC_VPERMQ3, "vuzp", "16">;
6424*9880d681SAndroid Build Coastguard Workerdef  VUZPq32  : N2VQShuffle<0b10, 0b00010, IIC_VPERMQ3, "vuzp", "32">;
6425*9880d681SAndroid Build Coastguard Worker
6426*9880d681SAndroid Build Coastguard Worker//   VZIP     : Vector Zip (Interleave)
6427*9880d681SAndroid Build Coastguard Worker
6428*9880d681SAndroid Build Coastguard Workerdef  VZIPd8   : N2VDShuffle<0b00, 0b00011, "vzip", "8">;
6429*9880d681SAndroid Build Coastguard Workerdef  VZIPd16  : N2VDShuffle<0b01, 0b00011, "vzip", "16">;
6430*9880d681SAndroid Build Coastguard Worker// vzip.32 Dd, Dm is a pseudo-instruction expanded to vtrn.32 Dd, Dm.
6431*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vzip${p}.32 $Dd, $Dm",
6432*9880d681SAndroid Build Coastguard Worker                    (VTRNd32 DPR:$Dd, DPR:$Dm, pred:$p)>;
6433*9880d681SAndroid Build Coastguard Worker
6434*9880d681SAndroid Build Coastguard Workerdef  VZIPq8   : N2VQShuffle<0b00, 0b00011, IIC_VPERMQ3, "vzip", "8">;
6435*9880d681SAndroid Build Coastguard Workerdef  VZIPq16  : N2VQShuffle<0b01, 0b00011, IIC_VPERMQ3, "vzip", "16">;
6436*9880d681SAndroid Build Coastguard Workerdef  VZIPq32  : N2VQShuffle<0b10, 0b00011, IIC_VPERMQ3, "vzip", "32">;
6437*9880d681SAndroid Build Coastguard Worker
6438*9880d681SAndroid Build Coastguard Worker// Vector Table Lookup and Table Extension.
6439*9880d681SAndroid Build Coastguard Worker
6440*9880d681SAndroid Build Coastguard Worker//   VTBL     : Vector Table Lookup
6441*9880d681SAndroid Build Coastguard Workerlet DecoderMethod = "DecodeTBLInstruction" in {
6442*9880d681SAndroid Build Coastguard Workerdef  VTBL1
6443*9880d681SAndroid Build Coastguard Worker  : N3V<1,1,0b11,0b1000,0,0, (outs DPR:$Vd),
6444*9880d681SAndroid Build Coastguard Worker        (ins VecListOneD:$Vn, DPR:$Vm), NVTBLFrm, IIC_VTB1,
6445*9880d681SAndroid Build Coastguard Worker        "vtbl", "8", "$Vd, $Vn, $Vm", "",
6446*9880d681SAndroid Build Coastguard Worker        [(set DPR:$Vd, (v8i8 (int_arm_neon_vtbl1 VecListOneD:$Vn, DPR:$Vm)))]>;
6447*9880d681SAndroid Build Coastguard Workerlet hasExtraSrcRegAllocReq = 1 in {
6448*9880d681SAndroid Build Coastguard Workerdef  VTBL2
6449*9880d681SAndroid Build Coastguard Worker  : N3V<1,1,0b11,0b1001,0,0, (outs DPR:$Vd),
6450*9880d681SAndroid Build Coastguard Worker        (ins VecListDPair:$Vn, DPR:$Vm), NVTBLFrm, IIC_VTB2,
6451*9880d681SAndroid Build Coastguard Worker        "vtbl", "8", "$Vd, $Vn, $Vm", "", []>;
6452*9880d681SAndroid Build Coastguard Workerdef  VTBL3
6453*9880d681SAndroid Build Coastguard Worker  : N3V<1,1,0b11,0b1010,0,0, (outs DPR:$Vd),
6454*9880d681SAndroid Build Coastguard Worker        (ins VecListThreeD:$Vn, DPR:$Vm), NVTBLFrm, IIC_VTB3,
6455*9880d681SAndroid Build Coastguard Worker        "vtbl", "8", "$Vd, $Vn, $Vm", "", []>;
6456*9880d681SAndroid Build Coastguard Workerdef  VTBL4
6457*9880d681SAndroid Build Coastguard Worker  : N3V<1,1,0b11,0b1011,0,0, (outs DPR:$Vd),
6458*9880d681SAndroid Build Coastguard Worker        (ins VecListFourD:$Vn, DPR:$Vm),
6459*9880d681SAndroid Build Coastguard Worker        NVTBLFrm, IIC_VTB4,
6460*9880d681SAndroid Build Coastguard Worker        "vtbl", "8", "$Vd, $Vn, $Vm", "", []>;
6461*9880d681SAndroid Build Coastguard Worker} // hasExtraSrcRegAllocReq = 1
6462*9880d681SAndroid Build Coastguard Worker
6463*9880d681SAndroid Build Coastguard Workerdef  VTBL3Pseudo
6464*9880d681SAndroid Build Coastguard Worker  : PseudoNeonI<(outs DPR:$dst), (ins QQPR:$tbl, DPR:$src), IIC_VTB3, "", []>;
6465*9880d681SAndroid Build Coastguard Workerdef  VTBL4Pseudo
6466*9880d681SAndroid Build Coastguard Worker  : PseudoNeonI<(outs DPR:$dst), (ins QQPR:$tbl, DPR:$src), IIC_VTB4, "", []>;
6467*9880d681SAndroid Build Coastguard Worker
6468*9880d681SAndroid Build Coastguard Worker//   VTBX     : Vector Table Extension
6469*9880d681SAndroid Build Coastguard Workerdef  VTBX1
6470*9880d681SAndroid Build Coastguard Worker  : N3V<1,1,0b11,0b1000,1,0, (outs DPR:$Vd),
6471*9880d681SAndroid Build Coastguard Worker        (ins DPR:$orig, VecListOneD:$Vn, DPR:$Vm), NVTBLFrm, IIC_VTBX1,
6472*9880d681SAndroid Build Coastguard Worker        "vtbx", "8", "$Vd, $Vn, $Vm", "$orig = $Vd",
6473*9880d681SAndroid Build Coastguard Worker        [(set DPR:$Vd, (v8i8 (int_arm_neon_vtbx1
6474*9880d681SAndroid Build Coastguard Worker                               DPR:$orig, VecListOneD:$Vn, DPR:$Vm)))]>;
6475*9880d681SAndroid Build Coastguard Workerlet hasExtraSrcRegAllocReq = 1 in {
6476*9880d681SAndroid Build Coastguard Workerdef  VTBX2
6477*9880d681SAndroid Build Coastguard Worker  : N3V<1,1,0b11,0b1001,1,0, (outs DPR:$Vd),
6478*9880d681SAndroid Build Coastguard Worker        (ins DPR:$orig, VecListDPair:$Vn, DPR:$Vm), NVTBLFrm, IIC_VTBX2,
6479*9880d681SAndroid Build Coastguard Worker        "vtbx", "8", "$Vd, $Vn, $Vm", "$orig = $Vd", []>;
6480*9880d681SAndroid Build Coastguard Workerdef  VTBX3
6481*9880d681SAndroid Build Coastguard Worker  : N3V<1,1,0b11,0b1010,1,0, (outs DPR:$Vd),
6482*9880d681SAndroid Build Coastguard Worker        (ins DPR:$orig, VecListThreeD:$Vn, DPR:$Vm),
6483*9880d681SAndroid Build Coastguard Worker        NVTBLFrm, IIC_VTBX3,
6484*9880d681SAndroid Build Coastguard Worker        "vtbx", "8", "$Vd, $Vn, $Vm",
6485*9880d681SAndroid Build Coastguard Worker        "$orig = $Vd", []>;
6486*9880d681SAndroid Build Coastguard Workerdef  VTBX4
6487*9880d681SAndroid Build Coastguard Worker  : N3V<1,1,0b11,0b1011,1,0, (outs DPR:$Vd),
6488*9880d681SAndroid Build Coastguard Worker        (ins DPR:$orig, VecListFourD:$Vn, DPR:$Vm), NVTBLFrm, IIC_VTBX4,
6489*9880d681SAndroid Build Coastguard Worker        "vtbx", "8", "$Vd, $Vn, $Vm",
6490*9880d681SAndroid Build Coastguard Worker        "$orig = $Vd", []>;
6491*9880d681SAndroid Build Coastguard Worker} // hasExtraSrcRegAllocReq = 1
6492*9880d681SAndroid Build Coastguard Worker
6493*9880d681SAndroid Build Coastguard Workerdef  VTBX3Pseudo
6494*9880d681SAndroid Build Coastguard Worker  : PseudoNeonI<(outs DPR:$dst), (ins DPR:$orig, QQPR:$tbl, DPR:$src),
6495*9880d681SAndroid Build Coastguard Worker                IIC_VTBX3, "$orig = $dst", []>;
6496*9880d681SAndroid Build Coastguard Workerdef  VTBX4Pseudo
6497*9880d681SAndroid Build Coastguard Worker  : PseudoNeonI<(outs DPR:$dst), (ins DPR:$orig, QQPR:$tbl, DPR:$src),
6498*9880d681SAndroid Build Coastguard Worker                IIC_VTBX4, "$orig = $dst", []>;
6499*9880d681SAndroid Build Coastguard Worker} // DecoderMethod = "DecodeTBLInstruction"
6500*9880d681SAndroid Build Coastguard Worker
6501*9880d681SAndroid Build Coastguard Worker// VRINT      : Vector Rounding
6502*9880d681SAndroid Build Coastguard Workermulticlass VRINT_FPI<string op, bits<3> op9_7, SDPatternOperator Int> {
6503*9880d681SAndroid Build Coastguard Worker  let PostEncoderMethod = "NEONThumb2V8PostEncoder", DecoderNamespace = "v8NEON" in {
6504*9880d681SAndroid Build Coastguard Worker    def Df : N2VDIntnp<0b10, 0b10, 0b100, 0, NoItinerary,
6505*9880d681SAndroid Build Coastguard Worker                      !strconcat("vrint", op), "f32",
6506*9880d681SAndroid Build Coastguard Worker                      v2f32, v2f32, Int>, Requires<[HasV8, HasNEON]> {
6507*9880d681SAndroid Build Coastguard Worker      let Inst{9-7} = op9_7;
6508*9880d681SAndroid Build Coastguard Worker    }
6509*9880d681SAndroid Build Coastguard Worker    def Qf : N2VQIntnp<0b10, 0b10, 0b100, 0, NoItinerary,
6510*9880d681SAndroid Build Coastguard Worker                      !strconcat("vrint", op), "f32",
6511*9880d681SAndroid Build Coastguard Worker                      v4f32, v4f32, Int>, Requires<[HasV8, HasNEON]> {
6512*9880d681SAndroid Build Coastguard Worker      let Inst{9-7} = op9_7;
6513*9880d681SAndroid Build Coastguard Worker    }
6514*9880d681SAndroid Build Coastguard Worker    def Dh : N2VDIntnp<0b01, 0b10, 0b100, 0, NoItinerary,
6515*9880d681SAndroid Build Coastguard Worker                      !strconcat("vrint", op), "f16",
6516*9880d681SAndroid Build Coastguard Worker                      v4f16, v4f16, Int>,
6517*9880d681SAndroid Build Coastguard Worker             Requires<[HasV8, HasNEON, HasFullFP16]> {
6518*9880d681SAndroid Build Coastguard Worker      let Inst{9-7} = op9_7;
6519*9880d681SAndroid Build Coastguard Worker    }
6520*9880d681SAndroid Build Coastguard Worker    def Qh : N2VQIntnp<0b01, 0b10, 0b100, 0, NoItinerary,
6521*9880d681SAndroid Build Coastguard Worker                      !strconcat("vrint", op), "f16",
6522*9880d681SAndroid Build Coastguard Worker                      v8f16, v8f16, Int>,
6523*9880d681SAndroid Build Coastguard Worker             Requires<[HasV8, HasNEON, HasFullFP16]> {
6524*9880d681SAndroid Build Coastguard Worker      let Inst{9-7} = op9_7;
6525*9880d681SAndroid Build Coastguard Worker    }
6526*9880d681SAndroid Build Coastguard Worker  }
6527*9880d681SAndroid Build Coastguard Worker
6528*9880d681SAndroid Build Coastguard Worker  def : NEONInstAlias<!strconcat("vrint", op, ".f32.f32\t$Dd, $Dm"),
6529*9880d681SAndroid Build Coastguard Worker                  (!cast<Instruction>(NAME#"Df") DPR:$Dd, DPR:$Dm)>;
6530*9880d681SAndroid Build Coastguard Worker  def : NEONInstAlias<!strconcat("vrint", op, ".f32.f32\t$Qd, $Qm"),
6531*9880d681SAndroid Build Coastguard Worker                  (!cast<Instruction>(NAME#"Qf") QPR:$Qd, QPR:$Qm)>;
6532*9880d681SAndroid Build Coastguard Worker  let Predicates = [HasNEON, HasFullFP16] in {
6533*9880d681SAndroid Build Coastguard Worker  def : NEONInstAlias<!strconcat("vrint", op, ".f16.f16\t$Dd, $Dm"),
6534*9880d681SAndroid Build Coastguard Worker                  (!cast<Instruction>(NAME#"Dh") DPR:$Dd, DPR:$Dm)>;
6535*9880d681SAndroid Build Coastguard Worker  def : NEONInstAlias<!strconcat("vrint", op, ".f16.f16\t$Qd, $Qm"),
6536*9880d681SAndroid Build Coastguard Worker                  (!cast<Instruction>(NAME#"Qh") QPR:$Qd, QPR:$Qm)>;
6537*9880d681SAndroid Build Coastguard Worker  }
6538*9880d681SAndroid Build Coastguard Worker}
6539*9880d681SAndroid Build Coastguard Worker
6540*9880d681SAndroid Build Coastguard Workerdefm VRINTNN : VRINT_FPI<"n", 0b000, int_arm_neon_vrintn>;
6541*9880d681SAndroid Build Coastguard Workerdefm VRINTXN : VRINT_FPI<"x", 0b001, int_arm_neon_vrintx>;
6542*9880d681SAndroid Build Coastguard Workerdefm VRINTAN : VRINT_FPI<"a", 0b010, int_arm_neon_vrinta>;
6543*9880d681SAndroid Build Coastguard Workerdefm VRINTZN : VRINT_FPI<"z", 0b011, int_arm_neon_vrintz>;
6544*9880d681SAndroid Build Coastguard Workerdefm VRINTMN : VRINT_FPI<"m", 0b101, int_arm_neon_vrintm>;
6545*9880d681SAndroid Build Coastguard Workerdefm VRINTPN : VRINT_FPI<"p", 0b111, int_arm_neon_vrintp>;
6546*9880d681SAndroid Build Coastguard Worker
6547*9880d681SAndroid Build Coastguard Worker// Cryptography instructions
6548*9880d681SAndroid Build Coastguard Workerlet PostEncoderMethod = "NEONThumb2DataIPostEncoder",
6549*9880d681SAndroid Build Coastguard Worker    DecoderNamespace = "v8Crypto", hasSideEffects = 0 in {
6550*9880d681SAndroid Build Coastguard Worker  class AES<string op, bit op7, bit op6, SDPatternOperator Int>
6551*9880d681SAndroid Build Coastguard Worker    : N2VQIntXnp<0b00, 0b00, 0b011, op6, op7, NoItinerary,
6552*9880d681SAndroid Build Coastguard Worker                 !strconcat("aes", op), "8", v16i8, v16i8, Int>,
6553*9880d681SAndroid Build Coastguard Worker      Requires<[HasV8, HasCrypto]>;
6554*9880d681SAndroid Build Coastguard Worker  class AES2Op<string op, bit op7, bit op6, SDPatternOperator Int>
6555*9880d681SAndroid Build Coastguard Worker    : N2VQIntX2np<0b00, 0b00, 0b011, op6, op7, NoItinerary,
6556*9880d681SAndroid Build Coastguard Worker                 !strconcat("aes", op), "8", v16i8, v16i8, Int>,
6557*9880d681SAndroid Build Coastguard Worker      Requires<[HasV8, HasCrypto]>;
6558*9880d681SAndroid Build Coastguard Worker  class N2SHA<string op, bits<2> op17_16, bits<3> op10_8, bit op7, bit op6,
6559*9880d681SAndroid Build Coastguard Worker              SDPatternOperator Int>
6560*9880d681SAndroid Build Coastguard Worker    : N2VQIntXnp<0b10, op17_16, op10_8, op6, op7, NoItinerary,
6561*9880d681SAndroid Build Coastguard Worker                 !strconcat("sha", op), "32", v4i32, v4i32, Int>,
6562*9880d681SAndroid Build Coastguard Worker      Requires<[HasV8, HasCrypto]>;
6563*9880d681SAndroid Build Coastguard Worker  class N2SHA2Op<string op, bits<2> op17_16, bits<3> op10_8, bit op7, bit op6,
6564*9880d681SAndroid Build Coastguard Worker              SDPatternOperator Int>
6565*9880d681SAndroid Build Coastguard Worker    : N2VQIntX2np<0b10, op17_16, op10_8, op6, op7, NoItinerary,
6566*9880d681SAndroid Build Coastguard Worker                 !strconcat("sha", op), "32", v4i32, v4i32, Int>,
6567*9880d681SAndroid Build Coastguard Worker      Requires<[HasV8, HasCrypto]>;
6568*9880d681SAndroid Build Coastguard Worker  class N3SHA3Op<string op, bits<5> op27_23, bits<2> op21_20, SDPatternOperator Int>
6569*9880d681SAndroid Build Coastguard Worker    : N3VQInt3np<op27_23, op21_20, 0b1100, 1, 0, N3RegFrm, NoItinerary,
6570*9880d681SAndroid Build Coastguard Worker                !strconcat("sha", op), "32", v4i32, v4i32, Int, 0>,
6571*9880d681SAndroid Build Coastguard Worker      Requires<[HasV8, HasCrypto]>;
6572*9880d681SAndroid Build Coastguard Worker}
6573*9880d681SAndroid Build Coastguard Worker
6574*9880d681SAndroid Build Coastguard Workerdef AESD : AES2Op<"d", 0, 1, int_arm_neon_aesd>;
6575*9880d681SAndroid Build Coastguard Workerdef AESE : AES2Op<"e", 0, 0, int_arm_neon_aese>;
6576*9880d681SAndroid Build Coastguard Workerdef AESIMC : AES<"imc", 1, 1, int_arm_neon_aesimc>;
6577*9880d681SAndroid Build Coastguard Workerdef AESMC : AES<"mc", 1, 0, int_arm_neon_aesmc>;
6578*9880d681SAndroid Build Coastguard Worker
6579*9880d681SAndroid Build Coastguard Workerdef SHA1H : N2SHA<"1h", 0b01, 0b010, 1, 1, null_frag>;
6580*9880d681SAndroid Build Coastguard Workerdef SHA1SU1 : N2SHA2Op<"1su1", 0b10, 0b011, 1, 0, int_arm_neon_sha1su1>;
6581*9880d681SAndroid Build Coastguard Workerdef SHA256SU0 : N2SHA2Op<"256su0", 0b10, 0b011, 1, 1, int_arm_neon_sha256su0>;
6582*9880d681SAndroid Build Coastguard Workerdef SHA1C : N3SHA3Op<"1c", 0b00100, 0b00, null_frag>;
6583*9880d681SAndroid Build Coastguard Workerdef SHA1M : N3SHA3Op<"1m", 0b00100, 0b10, null_frag>;
6584*9880d681SAndroid Build Coastguard Workerdef SHA1P : N3SHA3Op<"1p", 0b00100, 0b01, null_frag>;
6585*9880d681SAndroid Build Coastguard Workerdef SHA1SU0 : N3SHA3Op<"1su0", 0b00100, 0b11, int_arm_neon_sha1su0>;
6586*9880d681SAndroid Build Coastguard Workerdef SHA256H : N3SHA3Op<"256h", 0b00110, 0b00, int_arm_neon_sha256h>;
6587*9880d681SAndroid Build Coastguard Workerdef SHA256H2 : N3SHA3Op<"256h2", 0b00110, 0b01, int_arm_neon_sha256h2>;
6588*9880d681SAndroid Build Coastguard Workerdef SHA256SU1 : N3SHA3Op<"256su1", 0b00110, 0b10, int_arm_neon_sha256su1>;
6589*9880d681SAndroid Build Coastguard Worker
6590*9880d681SAndroid Build Coastguard Workerdef : Pat<(i32 (int_arm_neon_sha1h i32:$Rn)),
6591*9880d681SAndroid Build Coastguard Worker          (COPY_TO_REGCLASS (f32 (EXTRACT_SUBREG
6592*9880d681SAndroid Build Coastguard Worker              (SHA1H (SUBREG_TO_REG (i64 0),
6593*9880d681SAndroid Build Coastguard Worker                                    (f32 (COPY_TO_REGCLASS i32:$Rn, SPR)),
6594*9880d681SAndroid Build Coastguard Worker                                    ssub_0)),
6595*9880d681SAndroid Build Coastguard Worker              ssub_0)), GPR)>;
6596*9880d681SAndroid Build Coastguard Worker
6597*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i32 (int_arm_neon_sha1c v4i32:$hash_abcd, i32:$hash_e, v4i32:$wk)),
6598*9880d681SAndroid Build Coastguard Worker          (SHA1C v4i32:$hash_abcd,
6599*9880d681SAndroid Build Coastguard Worker                 (SUBREG_TO_REG (i64 0),
6600*9880d681SAndroid Build Coastguard Worker                                (f32 (COPY_TO_REGCLASS i32:$hash_e, SPR)),
6601*9880d681SAndroid Build Coastguard Worker                                ssub_0),
6602*9880d681SAndroid Build Coastguard Worker                 v4i32:$wk)>;
6603*9880d681SAndroid Build Coastguard Worker
6604*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i32 (int_arm_neon_sha1m v4i32:$hash_abcd, i32:$hash_e, v4i32:$wk)),
6605*9880d681SAndroid Build Coastguard Worker          (SHA1M v4i32:$hash_abcd,
6606*9880d681SAndroid Build Coastguard Worker                 (SUBREG_TO_REG (i64 0),
6607*9880d681SAndroid Build Coastguard Worker                                (f32 (COPY_TO_REGCLASS i32:$hash_e, SPR)),
6608*9880d681SAndroid Build Coastguard Worker                                ssub_0),
6609*9880d681SAndroid Build Coastguard Worker                 v4i32:$wk)>;
6610*9880d681SAndroid Build Coastguard Worker
6611*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i32 (int_arm_neon_sha1p v4i32:$hash_abcd, i32:$hash_e, v4i32:$wk)),
6612*9880d681SAndroid Build Coastguard Worker          (SHA1P v4i32:$hash_abcd,
6613*9880d681SAndroid Build Coastguard Worker                 (SUBREG_TO_REG (i64 0),
6614*9880d681SAndroid Build Coastguard Worker                                (f32 (COPY_TO_REGCLASS i32:$hash_e, SPR)),
6615*9880d681SAndroid Build Coastguard Worker                                ssub_0),
6616*9880d681SAndroid Build Coastguard Worker                 v4i32:$wk)>;
6617*9880d681SAndroid Build Coastguard Worker
6618*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===//
6619*9880d681SAndroid Build Coastguard Worker// NEON instructions for single-precision FP math
6620*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===//
6621*9880d681SAndroid Build Coastguard Worker
6622*9880d681SAndroid Build Coastguard Workerclass N2VSPat<SDNode OpNode, NeonI Inst>
6623*9880d681SAndroid Build Coastguard Worker  : NEONFPPat<(f32 (OpNode SPR:$a)),
6624*9880d681SAndroid Build Coastguard Worker              (EXTRACT_SUBREG
6625*9880d681SAndroid Build Coastguard Worker               (v2f32 (COPY_TO_REGCLASS (Inst
6626*9880d681SAndroid Build Coastguard Worker                (INSERT_SUBREG
6627*9880d681SAndroid Build Coastguard Worker                 (v2f32 (COPY_TO_REGCLASS (v2f32 (IMPLICIT_DEF)), DPR_VFP2)),
6628*9880d681SAndroid Build Coastguard Worker                 SPR:$a, ssub_0)), DPR_VFP2)), ssub_0)>;
6629*9880d681SAndroid Build Coastguard Worker
6630*9880d681SAndroid Build Coastguard Workerclass N3VSPat<SDNode OpNode, NeonI Inst>
6631*9880d681SAndroid Build Coastguard Worker  : NEONFPPat<(f32 (OpNode SPR:$a, SPR:$b)),
6632*9880d681SAndroid Build Coastguard Worker              (EXTRACT_SUBREG
6633*9880d681SAndroid Build Coastguard Worker               (v2f32 (COPY_TO_REGCLASS (Inst
6634*9880d681SAndroid Build Coastguard Worker                (INSERT_SUBREG
6635*9880d681SAndroid Build Coastguard Worker                 (v2f32 (COPY_TO_REGCLASS (v2f32 (IMPLICIT_DEF)), DPR_VFP2)),
6636*9880d681SAndroid Build Coastguard Worker                 SPR:$a, ssub_0),
6637*9880d681SAndroid Build Coastguard Worker                (INSERT_SUBREG
6638*9880d681SAndroid Build Coastguard Worker                 (v2f32 (COPY_TO_REGCLASS (v2f32 (IMPLICIT_DEF)), DPR_VFP2)),
6639*9880d681SAndroid Build Coastguard Worker                 SPR:$b, ssub_0)), DPR_VFP2)), ssub_0)>;
6640*9880d681SAndroid Build Coastguard Worker
6641*9880d681SAndroid Build Coastguard Workerclass N3VSMulOpPat<SDNode MulNode, SDNode OpNode, NeonI Inst>
6642*9880d681SAndroid Build Coastguard Worker  : NEONFPPat<(f32 (OpNode SPR:$acc, (f32 (MulNode SPR:$a, SPR:$b)))),
6643*9880d681SAndroid Build Coastguard Worker              (EXTRACT_SUBREG
6644*9880d681SAndroid Build Coastguard Worker               (v2f32 (COPY_TO_REGCLASS (Inst
6645*9880d681SAndroid Build Coastguard Worker                (INSERT_SUBREG
6646*9880d681SAndroid Build Coastguard Worker                 (v2f32 (COPY_TO_REGCLASS (v2f32 (IMPLICIT_DEF)), DPR_VFP2)),
6647*9880d681SAndroid Build Coastguard Worker                 SPR:$acc, ssub_0),
6648*9880d681SAndroid Build Coastguard Worker                (INSERT_SUBREG
6649*9880d681SAndroid Build Coastguard Worker                 (v2f32 (COPY_TO_REGCLASS (v2f32 (IMPLICIT_DEF)), DPR_VFP2)),
6650*9880d681SAndroid Build Coastguard Worker                 SPR:$a, ssub_0),
6651*9880d681SAndroid Build Coastguard Worker                (INSERT_SUBREG
6652*9880d681SAndroid Build Coastguard Worker                 (v2f32 (COPY_TO_REGCLASS (v2f32 (IMPLICIT_DEF)), DPR_VFP2)),
6653*9880d681SAndroid Build Coastguard Worker                 SPR:$b, ssub_0)), DPR_VFP2)), ssub_0)>;
6654*9880d681SAndroid Build Coastguard Worker
6655*9880d681SAndroid Build Coastguard Workerclass NVCVTIFPat<SDNode OpNode, NeonI Inst>
6656*9880d681SAndroid Build Coastguard Worker  : NEONFPPat<(f32 (OpNode GPR:$a)),
6657*9880d681SAndroid Build Coastguard Worker              (f32 (EXTRACT_SUBREG
6658*9880d681SAndroid Build Coastguard Worker                     (v2f32 (Inst
6659*9880d681SAndroid Build Coastguard Worker                       (INSERT_SUBREG
6660*9880d681SAndroid Build Coastguard Worker                         (v2f32 (IMPLICIT_DEF)),
6661*9880d681SAndroid Build Coastguard Worker                         (i32 (COPY_TO_REGCLASS GPR:$a, SPR)), ssub_0))),
6662*9880d681SAndroid Build Coastguard Worker                     ssub_0))>;
6663*9880d681SAndroid Build Coastguard Workerclass NVCVTFIPat<SDNode OpNode, NeonI Inst>
6664*9880d681SAndroid Build Coastguard Worker  : NEONFPPat<(i32 (OpNode SPR:$a)),
6665*9880d681SAndroid Build Coastguard Worker              (i32 (EXTRACT_SUBREG
6666*9880d681SAndroid Build Coastguard Worker                     (v2f32 (Inst (INSERT_SUBREG (v2f32 (IMPLICIT_DEF)),
6667*9880d681SAndroid Build Coastguard Worker                                                 SPR:$a, ssub_0))),
6668*9880d681SAndroid Build Coastguard Worker                     ssub_0))>;
6669*9880d681SAndroid Build Coastguard Worker
6670*9880d681SAndroid Build Coastguard Workerdef : N3VSPat<fadd, VADDfd>;
6671*9880d681SAndroid Build Coastguard Workerdef : N3VSPat<fsub, VSUBfd>;
6672*9880d681SAndroid Build Coastguard Workerdef : N3VSPat<fmul, VMULfd>;
6673*9880d681SAndroid Build Coastguard Workerdef : N3VSMulOpPat<fmul, fadd, VMLAfd>,
6674*9880d681SAndroid Build Coastguard Worker      Requires<[HasNEON, UseNEONForFP, UseFPVMLx, DontUseFusedMAC]>;
6675*9880d681SAndroid Build Coastguard Workerdef : N3VSMulOpPat<fmul, fsub, VMLSfd>,
6676*9880d681SAndroid Build Coastguard Worker      Requires<[HasNEON, UseNEONForFP, UseFPVMLx, DontUseFusedMAC]>;
6677*9880d681SAndroid Build Coastguard Workerdef : N3VSMulOpPat<fmul, fadd, VFMAfd>,
6678*9880d681SAndroid Build Coastguard Worker      Requires<[HasVFP4, UseNEONForFP, UseFusedMAC]>;
6679*9880d681SAndroid Build Coastguard Workerdef : N3VSMulOpPat<fmul, fsub, VFMSfd>,
6680*9880d681SAndroid Build Coastguard Worker      Requires<[HasVFP4, UseNEONForFP, UseFusedMAC]>;
6681*9880d681SAndroid Build Coastguard Workerdef : N2VSPat<fabs, VABSfd>;
6682*9880d681SAndroid Build Coastguard Workerdef : N2VSPat<fneg, VNEGfd>;
6683*9880d681SAndroid Build Coastguard Workerdef : N3VSPat<fmaxnan, VMAXfd>, Requires<[HasNEON]>;
6684*9880d681SAndroid Build Coastguard Workerdef : N3VSPat<fminnan, VMINfd>, Requires<[HasNEON]>;
6685*9880d681SAndroid Build Coastguard Workerdef : NVCVTFIPat<fp_to_sint, VCVTf2sd>;
6686*9880d681SAndroid Build Coastguard Workerdef : NVCVTFIPat<fp_to_uint, VCVTf2ud>;
6687*9880d681SAndroid Build Coastguard Workerdef : NVCVTIFPat<sint_to_fp, VCVTs2fd>;
6688*9880d681SAndroid Build Coastguard Workerdef : NVCVTIFPat<uint_to_fp, VCVTu2fd>;
6689*9880d681SAndroid Build Coastguard Worker
6690*9880d681SAndroid Build Coastguard Worker// NEON doesn't have any f64 conversions, so provide patterns to make
6691*9880d681SAndroid Build Coastguard Worker// sure the VFP conversions match when extracting from a vector.
6692*9880d681SAndroid Build Coastguard Workerdef : VFPPat<(f64 (sint_to_fp (extractelt (v2i32 DPR:$src), imm:$lane))),
6693*9880d681SAndroid Build Coastguard Worker             (VSITOD (EXTRACT_SUBREG DPR:$src, (SSubReg_f32_reg imm:$lane)))>;
6694*9880d681SAndroid Build Coastguard Workerdef : VFPPat<(f64 (sint_to_fp (extractelt (v4i32 QPR:$src), imm:$lane))),
6695*9880d681SAndroid Build Coastguard Worker             (VSITOD (EXTRACT_SUBREG QPR:$src, (SSubReg_f32_reg imm:$lane)))>;
6696*9880d681SAndroid Build Coastguard Workerdef : VFPPat<(f64 (uint_to_fp (extractelt (v2i32 DPR:$src), imm:$lane))),
6697*9880d681SAndroid Build Coastguard Worker             (VUITOD (EXTRACT_SUBREG DPR:$src, (SSubReg_f32_reg imm:$lane)))>;
6698*9880d681SAndroid Build Coastguard Workerdef : VFPPat<(f64 (uint_to_fp (extractelt (v4i32 QPR:$src), imm:$lane))),
6699*9880d681SAndroid Build Coastguard Worker             (VUITOD (EXTRACT_SUBREG QPR:$src, (SSubReg_f32_reg imm:$lane)))>;
6700*9880d681SAndroid Build Coastguard Worker
6701*9880d681SAndroid Build Coastguard Worker
6702*9880d681SAndroid Build Coastguard Worker// Prefer VMOVDRR for i32 -> f32 bitcasts, it can write all DPR registers.
6703*9880d681SAndroid Build Coastguard Workerdef : Pat<(f32 (bitconvert GPR:$a)),
6704*9880d681SAndroid Build Coastguard Worker          (EXTRACT_SUBREG (VMOVDRR GPR:$a, GPR:$a), ssub_0)>,
6705*9880d681SAndroid Build Coastguard Worker        Requires<[HasNEON, DontUseVMOVSR]>;
6706*9880d681SAndroid Build Coastguard Worker
6707*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===//
6708*9880d681SAndroid Build Coastguard Worker// Non-Instruction Patterns
6709*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===//
6710*9880d681SAndroid Build Coastguard Worker
6711*9880d681SAndroid Build Coastguard Worker// bit_convert
6712*9880d681SAndroid Build Coastguard Workerlet Predicates = [IsLE] in {
6713*9880d681SAndroid Build Coastguard Worker  def : Pat<(v1i64 (bitconvert (v2i32 DPR:$src))), (v1i64 DPR:$src)>;
6714*9880d681SAndroid Build Coastguard Worker  def : Pat<(v1i64 (bitconvert (v4i16 DPR:$src))), (v1i64 DPR:$src)>;
6715*9880d681SAndroid Build Coastguard Worker  def : Pat<(v1i64 (bitconvert (v8i8  DPR:$src))), (v1i64 DPR:$src)>;
6716*9880d681SAndroid Build Coastguard Worker}
6717*9880d681SAndroid Build Coastguard Workerdef : Pat<(v1i64 (bitconvert (f64   DPR:$src))), (v1i64 DPR:$src)>;
6718*9880d681SAndroid Build Coastguard Workerlet Predicates = [IsLE] in {
6719*9880d681SAndroid Build Coastguard Worker  def : Pat<(v1i64 (bitconvert (v2f32 DPR:$src))), (v1i64 DPR:$src)>;
6720*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2i32 (bitconvert (v1i64 DPR:$src))), (v2i32 DPR:$src)>;
6721*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2i32 (bitconvert (v4i16 DPR:$src))), (v2i32 DPR:$src)>;
6722*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2i32 (bitconvert (v8i8  DPR:$src))), (v2i32 DPR:$src)>;
6723*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2i32 (bitconvert (f64   DPR:$src))), (v2i32 DPR:$src)>;
6724*9880d681SAndroid Build Coastguard Worker}
6725*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2i32 (bitconvert (v2f32 DPR:$src))), (v2i32 DPR:$src)>;
6726*9880d681SAndroid Build Coastguard Workerlet Predicates = [IsLE] in {
6727*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4i16 (bitconvert (v1i64 DPR:$src))), (v4i16 DPR:$src)>;
6728*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4i16 (bitconvert (v2i32 DPR:$src))), (v4i16 DPR:$src)>;
6729*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4i16 (bitconvert (v8i8  DPR:$src))), (v4i16 DPR:$src)>;
6730*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4i16 (bitconvert (f64   DPR:$src))), (v4i16 DPR:$src)>;
6731*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4i16 (bitconvert (v2f32 DPR:$src))), (v4i16 DPR:$src)>;
6732*9880d681SAndroid Build Coastguard Worker  def : Pat<(v8i8  (bitconvert (v1i64 DPR:$src))), (v8i8  DPR:$src)>;
6733*9880d681SAndroid Build Coastguard Worker  def : Pat<(v8i8  (bitconvert (v2i32 DPR:$src))), (v8i8  DPR:$src)>;
6734*9880d681SAndroid Build Coastguard Worker  def : Pat<(v8i8  (bitconvert (v4i16 DPR:$src))), (v8i8  DPR:$src)>;
6735*9880d681SAndroid Build Coastguard Worker  def : Pat<(v8i8  (bitconvert (f64   DPR:$src))), (v8i8  DPR:$src)>;
6736*9880d681SAndroid Build Coastguard Worker  def : Pat<(v8i8  (bitconvert (v2f32 DPR:$src))), (v8i8  DPR:$src)>;
6737*9880d681SAndroid Build Coastguard Worker}
6738*9880d681SAndroid Build Coastguard Workerdef : Pat<(f64   (bitconvert (v1i64 DPR:$src))), (f64   DPR:$src)>;
6739*9880d681SAndroid Build Coastguard Workerlet Predicates = [IsLE] in {
6740*9880d681SAndroid Build Coastguard Worker  def : Pat<(f64   (bitconvert (v2i32 DPR:$src))), (f64   DPR:$src)>;
6741*9880d681SAndroid Build Coastguard Worker  def : Pat<(f64   (bitconvert (v4i16 DPR:$src))), (f64   DPR:$src)>;
6742*9880d681SAndroid Build Coastguard Worker  def : Pat<(f64   (bitconvert (v8i8  DPR:$src))), (f64   DPR:$src)>;
6743*9880d681SAndroid Build Coastguard Worker  def : Pat<(f64   (bitconvert (v2f32 DPR:$src))), (f64   DPR:$src)>;
6744*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2f32 (bitconvert (f64   DPR:$src))), (v2f32 DPR:$src)>;
6745*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2f32 (bitconvert (v1i64 DPR:$src))), (v2f32 DPR:$src)>;
6746*9880d681SAndroid Build Coastguard Worker}
6747*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2f32 (bitconvert (v2i32 DPR:$src))), (v2f32 DPR:$src)>;
6748*9880d681SAndroid Build Coastguard Workerlet Predicates = [IsLE] in {
6749*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2f32 (bitconvert (v4i16 DPR:$src))), (v2f32 DPR:$src)>;
6750*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2f32 (bitconvert (v8i8  DPR:$src))), (v2f32 DPR:$src)>;
6751*9880d681SAndroid Build Coastguard Worker}
6752*9880d681SAndroid Build Coastguard Worker
6753*9880d681SAndroid Build Coastguard Workerlet Predicates = [IsLE] in {
6754*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2i64 (bitconvert (v4i32 QPR:$src))), (v2i64 QPR:$src)>;
6755*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2i64 (bitconvert (v8i16 QPR:$src))), (v2i64 QPR:$src)>;
6756*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2i64 (bitconvert (v16i8 QPR:$src))), (v2i64 QPR:$src)>;
6757*9880d681SAndroid Build Coastguard Worker}
6758*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2i64 (bitconvert (v2f64 QPR:$src))), (v2i64 QPR:$src)>;
6759*9880d681SAndroid Build Coastguard Workerlet Predicates = [IsLE] in {
6760*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2i64 (bitconvert (v4f32 QPR:$src))), (v2i64 QPR:$src)>;
6761*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4i32 (bitconvert (v2i64 QPR:$src))), (v4i32 QPR:$src)>;
6762*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4i32 (bitconvert (v8i16 QPR:$src))), (v4i32 QPR:$src)>;
6763*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4i32 (bitconvert (v16i8 QPR:$src))), (v4i32 QPR:$src)>;
6764*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4i32 (bitconvert (v2f64 QPR:$src))), (v4i32 QPR:$src)>;
6765*9880d681SAndroid Build Coastguard Worker}
6766*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4i32 (bitconvert (v4f32 QPR:$src))), (v4i32 QPR:$src)>;
6767*9880d681SAndroid Build Coastguard Workerlet Predicates = [IsLE] in {
6768*9880d681SAndroid Build Coastguard Worker  def : Pat<(v8i16 (bitconvert (v2i64 QPR:$src))), (v8i16 QPR:$src)>;
6769*9880d681SAndroid Build Coastguard Worker  def : Pat<(v8i16 (bitconvert (v4i32 QPR:$src))), (v8i16 QPR:$src)>;
6770*9880d681SAndroid Build Coastguard Worker  def : Pat<(v8i16 (bitconvert (v16i8 QPR:$src))), (v8i16 QPR:$src)>;
6771*9880d681SAndroid Build Coastguard Worker  def : Pat<(v8i16 (bitconvert (v2f64 QPR:$src))), (v8i16 QPR:$src)>;
6772*9880d681SAndroid Build Coastguard Worker  def : Pat<(v8i16 (bitconvert (v4f32 QPR:$src))), (v8i16 QPR:$src)>;
6773*9880d681SAndroid Build Coastguard Worker  def : Pat<(v16i8 (bitconvert (v2i64 QPR:$src))), (v16i8 QPR:$src)>;
6774*9880d681SAndroid Build Coastguard Worker  def : Pat<(v16i8 (bitconvert (v4i32 QPR:$src))), (v16i8 QPR:$src)>;
6775*9880d681SAndroid Build Coastguard Worker  def : Pat<(v16i8 (bitconvert (v8i16 QPR:$src))), (v16i8 QPR:$src)>;
6776*9880d681SAndroid Build Coastguard Worker  def : Pat<(v16i8 (bitconvert (v2f64 QPR:$src))), (v16i8 QPR:$src)>;
6777*9880d681SAndroid Build Coastguard Worker  def : Pat<(v16i8 (bitconvert (v4f32 QPR:$src))), (v16i8 QPR:$src)>;
6778*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4f32 (bitconvert (v2i64 QPR:$src))), (v4f32 QPR:$src)>;
6779*9880d681SAndroid Build Coastguard Worker}
6780*9880d681SAndroid Build Coastguard Workerdef : Pat<(v4f32 (bitconvert (v4i32 QPR:$src))), (v4f32 QPR:$src)>;
6781*9880d681SAndroid Build Coastguard Workerlet Predicates = [IsLE] in {
6782*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4f32 (bitconvert (v8i16 QPR:$src))), (v4f32 QPR:$src)>;
6783*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4f32 (bitconvert (v16i8 QPR:$src))), (v4f32 QPR:$src)>;
6784*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4f32 (bitconvert (v2f64 QPR:$src))), (v4f32 QPR:$src)>;
6785*9880d681SAndroid Build Coastguard Worker}
6786*9880d681SAndroid Build Coastguard Workerdef : Pat<(v2f64 (bitconvert (v2i64 QPR:$src))), (v2f64 QPR:$src)>;
6787*9880d681SAndroid Build Coastguard Workerlet Predicates = [IsLE] in {
6788*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2f64 (bitconvert (v4i32 QPR:$src))), (v2f64 QPR:$src)>;
6789*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2f64 (bitconvert (v8i16 QPR:$src))), (v2f64 QPR:$src)>;
6790*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2f64 (bitconvert (v16i8 QPR:$src))), (v2f64 QPR:$src)>;
6791*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2f64 (bitconvert (v4f32 QPR:$src))), (v2f64 QPR:$src)>;
6792*9880d681SAndroid Build Coastguard Worker}
6793*9880d681SAndroid Build Coastguard Worker
6794*9880d681SAndroid Build Coastguard Workerlet Predicates = [IsBE] in {
6795*9880d681SAndroid Build Coastguard Worker  // 64 bit conversions
6796*9880d681SAndroid Build Coastguard Worker  def : Pat<(v1i64 (bitconvert (v2i32 DPR:$src))), (VREV64d32 DPR:$src)>;
6797*9880d681SAndroid Build Coastguard Worker  def : Pat<(v1i64 (bitconvert (v4i16 DPR:$src))), (VREV64d16 DPR:$src)>;
6798*9880d681SAndroid Build Coastguard Worker  def : Pat<(v1i64 (bitconvert (v8i8  DPR:$src))), (VREV64d8  DPR:$src)>;
6799*9880d681SAndroid Build Coastguard Worker  def : Pat<(v1i64 (bitconvert (v2f32 DPR:$src))), (VREV64d32 DPR:$src)>;
6800*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2i32 (bitconvert (v1i64 DPR:$src))), (VREV64d32 DPR:$src)>;
6801*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2i32 (bitconvert (v4i16 DPR:$src))), (VREV32d16 DPR:$src)>;
6802*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2i32 (bitconvert (v8i8  DPR:$src))), (VREV32d8  DPR:$src)>;
6803*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2i32 (bitconvert (f64   DPR:$src))), (VREV64d32 DPR:$src)>;
6804*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4i16 (bitconvert (v1i64 DPR:$src))), (VREV64d16 DPR:$src)>;
6805*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4i16 (bitconvert (v2i32 DPR:$src))), (VREV32d16 DPR:$src)>;
6806*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4i16 (bitconvert (v8i8  DPR:$src))), (VREV16d8  DPR:$src)>;
6807*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4i16 (bitconvert (f64   DPR:$src))), (VREV64d16 DPR:$src)>;
6808*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4i16 (bitconvert (v2f32 DPR:$src))), (VREV32d16 DPR:$src)>;
6809*9880d681SAndroid Build Coastguard Worker  def : Pat<(v8i8  (bitconvert (v1i64 DPR:$src))), (VREV64d8  DPR:$src)>;
6810*9880d681SAndroid Build Coastguard Worker  def : Pat<(v8i8  (bitconvert (v2i32 DPR:$src))), (VREV32d8  DPR:$src)>;
6811*9880d681SAndroid Build Coastguard Worker  def : Pat<(v8i8  (bitconvert (v4i16 DPR:$src))), (VREV16d8  DPR:$src)>;
6812*9880d681SAndroid Build Coastguard Worker  def : Pat<(v8i8  (bitconvert (f64   DPR:$src))), (VREV64d8  DPR:$src)>;
6813*9880d681SAndroid Build Coastguard Worker  def : Pat<(v8i8  (bitconvert (v2f32 DPR:$src))), (VREV32d8  DPR:$src)>;
6814*9880d681SAndroid Build Coastguard Worker  def : Pat<(f64   (bitconvert (v2i32 DPR:$src))), (VREV64d32 DPR:$src)>;
6815*9880d681SAndroid Build Coastguard Worker  def : Pat<(f64   (bitconvert (v4i16 DPR:$src))), (VREV64d16 DPR:$src)>;
6816*9880d681SAndroid Build Coastguard Worker  def : Pat<(f64   (bitconvert (v8i8  DPR:$src))), (VREV64d8  DPR:$src)>;
6817*9880d681SAndroid Build Coastguard Worker  def : Pat<(f64   (bitconvert (v2f32 DPR:$src))), (VREV64d32 DPR:$src)>;
6818*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2f32 (bitconvert (f64   DPR:$src))), (VREV64d32 DPR:$src)>;
6819*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2f32 (bitconvert (v1i64 DPR:$src))), (VREV64d32 DPR:$src)>;
6820*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2f32 (bitconvert (v4i16 DPR:$src))), (VREV32d16 DPR:$src)>;
6821*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2f32 (bitconvert (v8i8  DPR:$src))), (VREV32d8  DPR:$src)>;
6822*9880d681SAndroid Build Coastguard Worker
6823*9880d681SAndroid Build Coastguard Worker  // 128 bit conversions
6824*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2i64 (bitconvert (v4i32 QPR:$src))), (VREV64q32 QPR:$src)>;
6825*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2i64 (bitconvert (v8i16 QPR:$src))), (VREV64q16 QPR:$src)>;
6826*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2i64 (bitconvert (v16i8 QPR:$src))), (VREV64q8  QPR:$src)>;
6827*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2i64 (bitconvert (v4f32 QPR:$src))), (VREV64q32 QPR:$src)>;
6828*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4i32 (bitconvert (v2i64 QPR:$src))), (VREV64q32 QPR:$src)>;
6829*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4i32 (bitconvert (v8i16 QPR:$src))), (VREV32q16 QPR:$src)>;
6830*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4i32 (bitconvert (v16i8 QPR:$src))), (VREV32q8  QPR:$src)>;
6831*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4i32 (bitconvert (v2f64 QPR:$src))), (VREV64q32 QPR:$src)>;
6832*9880d681SAndroid Build Coastguard Worker  def : Pat<(v8i16 (bitconvert (v2i64 QPR:$src))), (VREV64q16 QPR:$src)>;
6833*9880d681SAndroid Build Coastguard Worker  def : Pat<(v8i16 (bitconvert (v4i32 QPR:$src))), (VREV32q16 QPR:$src)>;
6834*9880d681SAndroid Build Coastguard Worker  def : Pat<(v8i16 (bitconvert (v16i8 QPR:$src))), (VREV16q8  QPR:$src)>;
6835*9880d681SAndroid Build Coastguard Worker  def : Pat<(v8i16 (bitconvert (v2f64 QPR:$src))), (VREV64q16 QPR:$src)>;
6836*9880d681SAndroid Build Coastguard Worker  def : Pat<(v8i16 (bitconvert (v4f32 QPR:$src))), (VREV32q16 QPR:$src)>;
6837*9880d681SAndroid Build Coastguard Worker  def : Pat<(v16i8 (bitconvert (v2i64 QPR:$src))), (VREV64q8  QPR:$src)>;
6838*9880d681SAndroid Build Coastguard Worker  def : Pat<(v16i8 (bitconvert (v4i32 QPR:$src))), (VREV32q8  QPR:$src)>;
6839*9880d681SAndroid Build Coastguard Worker  def : Pat<(v16i8 (bitconvert (v8i16 QPR:$src))), (VREV16q8  QPR:$src)>;
6840*9880d681SAndroid Build Coastguard Worker  def : Pat<(v16i8 (bitconvert (v2f64 QPR:$src))), (VREV64q8  QPR:$src)>;
6841*9880d681SAndroid Build Coastguard Worker  def : Pat<(v16i8 (bitconvert (v4f32 QPR:$src))), (VREV32q8  QPR:$src)>;
6842*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4f32 (bitconvert (v2i64 QPR:$src))), (VREV64q32 QPR:$src)>;
6843*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4f32 (bitconvert (v8i16 QPR:$src))), (VREV32q16 QPR:$src)>;
6844*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4f32 (bitconvert (v16i8 QPR:$src))), (VREV32q8  QPR:$src)>;
6845*9880d681SAndroid Build Coastguard Worker  def : Pat<(v4f32 (bitconvert (v2f64 QPR:$src))), (VREV64q32 QPR:$src)>;
6846*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2f64 (bitconvert (v4i32 QPR:$src))), (VREV64q32 QPR:$src)>;
6847*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2f64 (bitconvert (v8i16 QPR:$src))), (VREV64q16 QPR:$src)>;
6848*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2f64 (bitconvert (v16i8 QPR:$src))), (VREV64q8  QPR:$src)>;
6849*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2f64 (bitconvert (v4f32 QPR:$src))), (VREV64q32 QPR:$src)>;
6850*9880d681SAndroid Build Coastguard Worker}
6851*9880d681SAndroid Build Coastguard Worker
6852*9880d681SAndroid Build Coastguard Worker// Fold extracting an element out of a v2i32 into a vfp register.
6853*9880d681SAndroid Build Coastguard Workerdef : Pat<(f32 (bitconvert (i32 (extractelt (v2i32 DPR:$src), imm:$lane)))),
6854*9880d681SAndroid Build Coastguard Worker          (f32 (EXTRACT_SUBREG DPR:$src, (SSubReg_f32_reg imm:$lane)))>;
6855*9880d681SAndroid Build Coastguard Worker
6856*9880d681SAndroid Build Coastguard Worker// Vector lengthening move with load, matching extending loads.
6857*9880d681SAndroid Build Coastguard Worker
6858*9880d681SAndroid Build Coastguard Worker// extload, zextload and sextload for a standard lengthening load. Example:
6859*9880d681SAndroid Build Coastguard Worker// Lengthen_Single<"8", "i16", "8"> =
6860*9880d681SAndroid Build Coastguard Worker//     Pat<(v8i16 (extloadvi8 addrmode6:$addr))
6861*9880d681SAndroid Build Coastguard Worker//         (VMOVLuv8i16 (VLD1d8 addrmode6:$addr,
6862*9880d681SAndroid Build Coastguard Worker//                              (f64 (IMPLICIT_DEF)), (i32 0)))>;
6863*9880d681SAndroid Build Coastguard Workermulticlass Lengthen_Single<string DestLanes, string DestTy, string SrcTy> {
6864*9880d681SAndroid Build Coastguard Worker  let AddedComplexity = 10 in {
6865*9880d681SAndroid Build Coastguard Worker  def _Any : Pat<(!cast<ValueType>("v" # DestLanes # DestTy)
6866*9880d681SAndroid Build Coastguard Worker                    (!cast<PatFrag>("extloadvi" # SrcTy) addrmode6:$addr)),
6867*9880d681SAndroid Build Coastguard Worker                  (!cast<Instruction>("VMOVLuv" # DestLanes # DestTy)
6868*9880d681SAndroid Build Coastguard Worker                    (!cast<Instruction>("VLD1d" # SrcTy) addrmode6:$addr))>;
6869*9880d681SAndroid Build Coastguard Worker
6870*9880d681SAndroid Build Coastguard Worker  def _Z : Pat<(!cast<ValueType>("v" # DestLanes # DestTy)
6871*9880d681SAndroid Build Coastguard Worker                  (!cast<PatFrag>("zextloadvi" # SrcTy) addrmode6:$addr)),
6872*9880d681SAndroid Build Coastguard Worker                (!cast<Instruction>("VMOVLuv" # DestLanes # DestTy)
6873*9880d681SAndroid Build Coastguard Worker                    (!cast<Instruction>("VLD1d" # SrcTy) addrmode6:$addr))>;
6874*9880d681SAndroid Build Coastguard Worker
6875*9880d681SAndroid Build Coastguard Worker  def _S : Pat<(!cast<ValueType>("v" # DestLanes # DestTy)
6876*9880d681SAndroid Build Coastguard Worker                  (!cast<PatFrag>("sextloadvi" # SrcTy) addrmode6:$addr)),
6877*9880d681SAndroid Build Coastguard Worker                (!cast<Instruction>("VMOVLsv" # DestLanes # DestTy)
6878*9880d681SAndroid Build Coastguard Worker                    (!cast<Instruction>("VLD1d" # SrcTy) addrmode6:$addr))>;
6879*9880d681SAndroid Build Coastguard Worker  }
6880*9880d681SAndroid Build Coastguard Worker}
6881*9880d681SAndroid Build Coastguard Worker
6882*9880d681SAndroid Build Coastguard Worker// extload, zextload and sextload for a lengthening load which only uses
6883*9880d681SAndroid Build Coastguard Worker// half the lanes available. Example:
6884*9880d681SAndroid Build Coastguard Worker// Lengthen_HalfSingle<"4", "i16", "8", "i16", "i8"> =
6885*9880d681SAndroid Build Coastguard Worker//     Pat<(v4i16 (extloadvi8 addrmode6oneL32:$addr)),
6886*9880d681SAndroid Build Coastguard Worker//         (EXTRACT_SUBREG (VMOVLuv8i16 (VLD1LNd32 addrmode6oneL32:$addr,
6887*9880d681SAndroid Build Coastguard Worker//                                      (f64 (IMPLICIT_DEF)), (i32 0))),
6888*9880d681SAndroid Build Coastguard Worker//                         dsub_0)>;
6889*9880d681SAndroid Build Coastguard Workermulticlass Lengthen_HalfSingle<string DestLanes, string DestTy, string SrcTy,
6890*9880d681SAndroid Build Coastguard Worker                               string InsnLanes, string InsnTy> {
6891*9880d681SAndroid Build Coastguard Worker  def _Any : Pat<(!cast<ValueType>("v" # DestLanes # DestTy)
6892*9880d681SAndroid Build Coastguard Worker                   (!cast<PatFrag>("extloadv" # SrcTy) addrmode6oneL32:$addr)),
6893*9880d681SAndroid Build Coastguard Worker       (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # InsnLanes # InsnTy)
6894*9880d681SAndroid Build Coastguard Worker         (VLD1LNd32 addrmode6oneL32:$addr, (f64 (IMPLICIT_DEF)), (i32 0))),
6895*9880d681SAndroid Build Coastguard Worker         dsub_0)>;
6896*9880d681SAndroid Build Coastguard Worker  def _Z   : Pat<(!cast<ValueType>("v" # DestLanes # DestTy)
6897*9880d681SAndroid Build Coastguard Worker                   (!cast<PatFrag>("zextloadv" # SrcTy) addrmode6oneL32:$addr)),
6898*9880d681SAndroid Build Coastguard Worker       (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # InsnLanes # InsnTy)
6899*9880d681SAndroid Build Coastguard Worker         (VLD1LNd32 addrmode6oneL32:$addr, (f64 (IMPLICIT_DEF)), (i32 0))),
6900*9880d681SAndroid Build Coastguard Worker         dsub_0)>;
6901*9880d681SAndroid Build Coastguard Worker  def _S   : Pat<(!cast<ValueType>("v" # DestLanes # DestTy)
6902*9880d681SAndroid Build Coastguard Worker                   (!cast<PatFrag>("sextloadv" # SrcTy) addrmode6oneL32:$addr)),
6903*9880d681SAndroid Build Coastguard Worker       (EXTRACT_SUBREG (!cast<Instruction>("VMOVLsv" # InsnLanes # InsnTy)
6904*9880d681SAndroid Build Coastguard Worker         (VLD1LNd32 addrmode6oneL32:$addr, (f64 (IMPLICIT_DEF)), (i32 0))),
6905*9880d681SAndroid Build Coastguard Worker         dsub_0)>;
6906*9880d681SAndroid Build Coastguard Worker}
6907*9880d681SAndroid Build Coastguard Worker
6908*9880d681SAndroid Build Coastguard Worker// The following class definition is basically a copy of the
6909*9880d681SAndroid Build Coastguard Worker// Lengthen_HalfSingle definition above, however with an additional parameter
6910*9880d681SAndroid Build Coastguard Worker// "RevLanes" to select the correct VREV32dXX instruction. This is to convert
6911*9880d681SAndroid Build Coastguard Worker// data loaded by VLD1LN into proper vector format in big endian mode.
6912*9880d681SAndroid Build Coastguard Workermulticlass Lengthen_HalfSingle_Big_Endian<string DestLanes, string DestTy, string SrcTy,
6913*9880d681SAndroid Build Coastguard Worker                               string InsnLanes, string InsnTy, string RevLanes> {
6914*9880d681SAndroid Build Coastguard Worker  def _Any : Pat<(!cast<ValueType>("v" # DestLanes # DestTy)
6915*9880d681SAndroid Build Coastguard Worker                   (!cast<PatFrag>("extloadv" # SrcTy) addrmode6oneL32:$addr)),
6916*9880d681SAndroid Build Coastguard Worker       (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # InsnLanes # InsnTy)
6917*9880d681SAndroid Build Coastguard Worker         (!cast<Instruction>("VREV32d" # RevLanes)
6918*9880d681SAndroid Build Coastguard Worker           (VLD1LNd32 addrmode6oneL32:$addr, (f64 (IMPLICIT_DEF)), (i32 0)))),
6919*9880d681SAndroid Build Coastguard Worker         dsub_0)>;
6920*9880d681SAndroid Build Coastguard Worker  def _Z   : Pat<(!cast<ValueType>("v" # DestLanes # DestTy)
6921*9880d681SAndroid Build Coastguard Worker                   (!cast<PatFrag>("zextloadv" # SrcTy) addrmode6oneL32:$addr)),
6922*9880d681SAndroid Build Coastguard Worker       (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # InsnLanes # InsnTy)
6923*9880d681SAndroid Build Coastguard Worker         (!cast<Instruction>("VREV32d" # RevLanes)
6924*9880d681SAndroid Build Coastguard Worker           (VLD1LNd32 addrmode6oneL32:$addr, (f64 (IMPLICIT_DEF)), (i32 0)))),
6925*9880d681SAndroid Build Coastguard Worker         dsub_0)>;
6926*9880d681SAndroid Build Coastguard Worker  def _S   : Pat<(!cast<ValueType>("v" # DestLanes # DestTy)
6927*9880d681SAndroid Build Coastguard Worker                   (!cast<PatFrag>("sextloadv" # SrcTy) addrmode6oneL32:$addr)),
6928*9880d681SAndroid Build Coastguard Worker       (EXTRACT_SUBREG (!cast<Instruction>("VMOVLsv" # InsnLanes # InsnTy)
6929*9880d681SAndroid Build Coastguard Worker         (!cast<Instruction>("VREV32d" # RevLanes)
6930*9880d681SAndroid Build Coastguard Worker           (VLD1LNd32 addrmode6oneL32:$addr, (f64 (IMPLICIT_DEF)), (i32 0)))),
6931*9880d681SAndroid Build Coastguard Worker         dsub_0)>;
6932*9880d681SAndroid Build Coastguard Worker}
6933*9880d681SAndroid Build Coastguard Worker
6934*9880d681SAndroid Build Coastguard Worker// extload, zextload and sextload for a lengthening load followed by another
6935*9880d681SAndroid Build Coastguard Worker// lengthening load, to quadruple the initial length.
6936*9880d681SAndroid Build Coastguard Worker//
6937*9880d681SAndroid Build Coastguard Worker// Lengthen_Double<"4", "i32", "i8", "8", "i16", "4", "i32"> =
6938*9880d681SAndroid Build Coastguard Worker//     Pat<(v4i32 (extloadvi8 addrmode6oneL32:$addr))
6939*9880d681SAndroid Build Coastguard Worker//         (EXTRACT_SUBREG (VMOVLuv4i32
6940*9880d681SAndroid Build Coastguard Worker//           (EXTRACT_SUBREG (VMOVLuv8i16 (VLD1LNd32 addrmode6oneL32:$addr,
6941*9880d681SAndroid Build Coastguard Worker//                                                   (f64 (IMPLICIT_DEF)),
6942*9880d681SAndroid Build Coastguard Worker//                                                   (i32 0))),
6943*9880d681SAndroid Build Coastguard Worker//                           dsub_0)),
6944*9880d681SAndroid Build Coastguard Worker//           dsub_0)>;
6945*9880d681SAndroid Build Coastguard Workermulticlass Lengthen_Double<string DestLanes, string DestTy, string SrcTy,
6946*9880d681SAndroid Build Coastguard Worker                           string Insn1Lanes, string Insn1Ty, string Insn2Lanes,
6947*9880d681SAndroid Build Coastguard Worker                           string Insn2Ty> {
6948*9880d681SAndroid Build Coastguard Worker  def _Any : Pat<(!cast<ValueType>("v" # DestLanes # DestTy)
6949*9880d681SAndroid Build Coastguard Worker                   (!cast<PatFrag>("extloadv" # SrcTy) addrmode6oneL32:$addr)),
6950*9880d681SAndroid Build Coastguard Worker         (!cast<Instruction>("VMOVLuv" # Insn2Lanes # Insn2Ty)
6951*9880d681SAndroid Build Coastguard Worker           (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # Insn1Lanes # Insn1Ty)
6952*9880d681SAndroid Build Coastguard Worker             (VLD1LNd32 addrmode6oneL32:$addr, (f64 (IMPLICIT_DEF)), (i32 0))),
6953*9880d681SAndroid Build Coastguard Worker             dsub_0))>;
6954*9880d681SAndroid Build Coastguard Worker  def _Z   : Pat<(!cast<ValueType>("v" # DestLanes # DestTy)
6955*9880d681SAndroid Build Coastguard Worker                   (!cast<PatFrag>("zextloadv" # SrcTy) addrmode6oneL32:$addr)),
6956*9880d681SAndroid Build Coastguard Worker         (!cast<Instruction>("VMOVLuv" # Insn2Lanes # Insn2Ty)
6957*9880d681SAndroid Build Coastguard Worker           (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # Insn1Lanes # Insn1Ty)
6958*9880d681SAndroid Build Coastguard Worker             (VLD1LNd32 addrmode6oneL32:$addr, (f64 (IMPLICIT_DEF)), (i32 0))),
6959*9880d681SAndroid Build Coastguard Worker             dsub_0))>;
6960*9880d681SAndroid Build Coastguard Worker  def _S   : Pat<(!cast<ValueType>("v" # DestLanes # DestTy)
6961*9880d681SAndroid Build Coastguard Worker                   (!cast<PatFrag>("sextloadv" # SrcTy) addrmode6oneL32:$addr)),
6962*9880d681SAndroid Build Coastguard Worker         (!cast<Instruction>("VMOVLsv" # Insn2Lanes # Insn2Ty)
6963*9880d681SAndroid Build Coastguard Worker           (EXTRACT_SUBREG (!cast<Instruction>("VMOVLsv" # Insn1Lanes # Insn1Ty)
6964*9880d681SAndroid Build Coastguard Worker             (VLD1LNd32 addrmode6oneL32:$addr, (f64 (IMPLICIT_DEF)), (i32 0))),
6965*9880d681SAndroid Build Coastguard Worker             dsub_0))>;
6966*9880d681SAndroid Build Coastguard Worker}
6967*9880d681SAndroid Build Coastguard Worker
6968*9880d681SAndroid Build Coastguard Worker// The following class definition is basically a copy of the
6969*9880d681SAndroid Build Coastguard Worker// Lengthen_Double definition above, however with an additional parameter
6970*9880d681SAndroid Build Coastguard Worker// "RevLanes" to select the correct VREV32dXX instruction. This is to convert
6971*9880d681SAndroid Build Coastguard Worker// data loaded by VLD1LN into proper vector format in big endian mode.
6972*9880d681SAndroid Build Coastguard Workermulticlass Lengthen_Double_Big_Endian<string DestLanes, string DestTy, string SrcTy,
6973*9880d681SAndroid Build Coastguard Worker                           string Insn1Lanes, string Insn1Ty, string Insn2Lanes,
6974*9880d681SAndroid Build Coastguard Worker                           string Insn2Ty, string RevLanes> {
6975*9880d681SAndroid Build Coastguard Worker  def _Any : Pat<(!cast<ValueType>("v" # DestLanes # DestTy)
6976*9880d681SAndroid Build Coastguard Worker                   (!cast<PatFrag>("extloadv" # SrcTy) addrmode6oneL32:$addr)),
6977*9880d681SAndroid Build Coastguard Worker         (!cast<Instruction>("VMOVLuv" # Insn2Lanes # Insn2Ty)
6978*9880d681SAndroid Build Coastguard Worker           (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # Insn1Lanes # Insn1Ty)
6979*9880d681SAndroid Build Coastguard Worker            (!cast<Instruction>("VREV32d" # RevLanes)
6980*9880d681SAndroid Build Coastguard Worker             (VLD1LNd32 addrmode6oneL32:$addr, (f64 (IMPLICIT_DEF)), (i32 0)))),
6981*9880d681SAndroid Build Coastguard Worker             dsub_0))>;
6982*9880d681SAndroid Build Coastguard Worker  def _Z   : Pat<(!cast<ValueType>("v" # DestLanes # DestTy)
6983*9880d681SAndroid Build Coastguard Worker                   (!cast<PatFrag>("zextloadv" # SrcTy) addrmode6oneL32:$addr)),
6984*9880d681SAndroid Build Coastguard Worker         (!cast<Instruction>("VMOVLuv" # Insn2Lanes # Insn2Ty)
6985*9880d681SAndroid Build Coastguard Worker           (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # Insn1Lanes # Insn1Ty)
6986*9880d681SAndroid Build Coastguard Worker            (!cast<Instruction>("VREV32d" # RevLanes)
6987*9880d681SAndroid Build Coastguard Worker             (VLD1LNd32 addrmode6oneL32:$addr, (f64 (IMPLICIT_DEF)), (i32 0)))),
6988*9880d681SAndroid Build Coastguard Worker             dsub_0))>;
6989*9880d681SAndroid Build Coastguard Worker  def _S   : Pat<(!cast<ValueType>("v" # DestLanes # DestTy)
6990*9880d681SAndroid Build Coastguard Worker                   (!cast<PatFrag>("sextloadv" # SrcTy) addrmode6oneL32:$addr)),
6991*9880d681SAndroid Build Coastguard Worker         (!cast<Instruction>("VMOVLsv" # Insn2Lanes # Insn2Ty)
6992*9880d681SAndroid Build Coastguard Worker           (EXTRACT_SUBREG (!cast<Instruction>("VMOVLsv" # Insn1Lanes # Insn1Ty)
6993*9880d681SAndroid Build Coastguard Worker            (!cast<Instruction>("VREV32d" # RevLanes)
6994*9880d681SAndroid Build Coastguard Worker             (VLD1LNd32 addrmode6oneL32:$addr, (f64 (IMPLICIT_DEF)), (i32 0)))),
6995*9880d681SAndroid Build Coastguard Worker             dsub_0))>;
6996*9880d681SAndroid Build Coastguard Worker}
6997*9880d681SAndroid Build Coastguard Worker
6998*9880d681SAndroid Build Coastguard Worker// extload, zextload and sextload for a lengthening load followed by another
6999*9880d681SAndroid Build Coastguard Worker// lengthening load, to quadruple the initial length, but which ends up only
7000*9880d681SAndroid Build Coastguard Worker// requiring half the available lanes (a 64-bit outcome instead of a 128-bit).
7001*9880d681SAndroid Build Coastguard Worker//
7002*9880d681SAndroid Build Coastguard Worker// Lengthen_HalfDouble<"2", "i32", "i8", "8", "i16", "4", "i32"> =
7003*9880d681SAndroid Build Coastguard Worker// Pat<(v2i32 (extloadvi8 addrmode6:$addr))
7004*9880d681SAndroid Build Coastguard Worker//     (EXTRACT_SUBREG (VMOVLuv4i32
7005*9880d681SAndroid Build Coastguard Worker//       (EXTRACT_SUBREG (VMOVLuv8i16 (VLD1LNd16 addrmode6:$addr,
7006*9880d681SAndroid Build Coastguard Worker//                                               (f64 (IMPLICIT_DEF)), (i32 0))),
7007*9880d681SAndroid Build Coastguard Worker//                       dsub_0)),
7008*9880d681SAndroid Build Coastguard Worker//       dsub_0)>;
7009*9880d681SAndroid Build Coastguard Workermulticlass Lengthen_HalfDouble<string DestLanes, string DestTy, string SrcTy,
7010*9880d681SAndroid Build Coastguard Worker                           string Insn1Lanes, string Insn1Ty, string Insn2Lanes,
7011*9880d681SAndroid Build Coastguard Worker                           string Insn2Ty> {
7012*9880d681SAndroid Build Coastguard Worker  def _Any : Pat<(!cast<ValueType>("v" # DestLanes # DestTy)
7013*9880d681SAndroid Build Coastguard Worker                   (!cast<PatFrag>("extloadv" # SrcTy) addrmode6:$addr)),
7014*9880d681SAndroid Build Coastguard Worker         (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # Insn2Lanes # Insn2Ty)
7015*9880d681SAndroid Build Coastguard Worker           (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # Insn1Lanes # Insn1Ty)
7016*9880d681SAndroid Build Coastguard Worker             (VLD1LNd16 addrmode6:$addr, (f64 (IMPLICIT_DEF)), (i32 0))),
7017*9880d681SAndroid Build Coastguard Worker             dsub_0)),
7018*9880d681SAndroid Build Coastguard Worker          dsub_0)>;
7019*9880d681SAndroid Build Coastguard Worker  def _Z   : Pat<(!cast<ValueType>("v" # DestLanes # DestTy)
7020*9880d681SAndroid Build Coastguard Worker                   (!cast<PatFrag>("zextloadv" # SrcTy) addrmode6:$addr)),
7021*9880d681SAndroid Build Coastguard Worker         (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # Insn2Lanes # Insn2Ty)
7022*9880d681SAndroid Build Coastguard Worker           (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # Insn1Lanes # Insn1Ty)
7023*9880d681SAndroid Build Coastguard Worker             (VLD1LNd16 addrmode6:$addr, (f64 (IMPLICIT_DEF)), (i32 0))),
7024*9880d681SAndroid Build Coastguard Worker             dsub_0)),
7025*9880d681SAndroid Build Coastguard Worker          dsub_0)>;
7026*9880d681SAndroid Build Coastguard Worker  def _S   : Pat<(!cast<ValueType>("v" # DestLanes # DestTy)
7027*9880d681SAndroid Build Coastguard Worker                   (!cast<PatFrag>("sextloadv" # SrcTy) addrmode6:$addr)),
7028*9880d681SAndroid Build Coastguard Worker         (EXTRACT_SUBREG (!cast<Instruction>("VMOVLsv" # Insn2Lanes # Insn2Ty)
7029*9880d681SAndroid Build Coastguard Worker           (EXTRACT_SUBREG (!cast<Instruction>("VMOVLsv" # Insn1Lanes # Insn1Ty)
7030*9880d681SAndroid Build Coastguard Worker             (VLD1LNd16 addrmode6:$addr, (f64 (IMPLICIT_DEF)), (i32 0))),
7031*9880d681SAndroid Build Coastguard Worker             dsub_0)),
7032*9880d681SAndroid Build Coastguard Worker          dsub_0)>;
7033*9880d681SAndroid Build Coastguard Worker}
7034*9880d681SAndroid Build Coastguard Worker
7035*9880d681SAndroid Build Coastguard Worker// The following class definition is basically a copy of the
7036*9880d681SAndroid Build Coastguard Worker// Lengthen_HalfDouble definition above, however with an additional VREV16d8
7037*9880d681SAndroid Build Coastguard Worker// instruction to convert data loaded by VLD1LN into proper vector format
7038*9880d681SAndroid Build Coastguard Worker// in big endian mode.
7039*9880d681SAndroid Build Coastguard Workermulticlass Lengthen_HalfDouble_Big_Endian<string DestLanes, string DestTy, string SrcTy,
7040*9880d681SAndroid Build Coastguard Worker                           string Insn1Lanes, string Insn1Ty, string Insn2Lanes,
7041*9880d681SAndroid Build Coastguard Worker                           string Insn2Ty> {
7042*9880d681SAndroid Build Coastguard Worker  def _Any : Pat<(!cast<ValueType>("v" # DestLanes # DestTy)
7043*9880d681SAndroid Build Coastguard Worker                   (!cast<PatFrag>("extloadv" # SrcTy) addrmode6:$addr)),
7044*9880d681SAndroid Build Coastguard Worker         (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # Insn2Lanes # Insn2Ty)
7045*9880d681SAndroid Build Coastguard Worker           (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # Insn1Lanes # Insn1Ty)
7046*9880d681SAndroid Build Coastguard Worker            (!cast<Instruction>("VREV16d8")
7047*9880d681SAndroid Build Coastguard Worker             (VLD1LNd16 addrmode6:$addr, (f64 (IMPLICIT_DEF)), (i32 0)))),
7048*9880d681SAndroid Build Coastguard Worker             dsub_0)),
7049*9880d681SAndroid Build Coastguard Worker          dsub_0)>;
7050*9880d681SAndroid Build Coastguard Worker  def _Z   : Pat<(!cast<ValueType>("v" # DestLanes # DestTy)
7051*9880d681SAndroid Build Coastguard Worker                   (!cast<PatFrag>("zextloadv" # SrcTy) addrmode6:$addr)),
7052*9880d681SAndroid Build Coastguard Worker         (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # Insn2Lanes # Insn2Ty)
7053*9880d681SAndroid Build Coastguard Worker           (EXTRACT_SUBREG (!cast<Instruction>("VMOVLuv" # Insn1Lanes # Insn1Ty)
7054*9880d681SAndroid Build Coastguard Worker            (!cast<Instruction>("VREV16d8")
7055*9880d681SAndroid Build Coastguard Worker             (VLD1LNd16 addrmode6:$addr, (f64 (IMPLICIT_DEF)), (i32 0)))),
7056*9880d681SAndroid Build Coastguard Worker             dsub_0)),
7057*9880d681SAndroid Build Coastguard Worker          dsub_0)>;
7058*9880d681SAndroid Build Coastguard Worker  def _S   : Pat<(!cast<ValueType>("v" # DestLanes # DestTy)
7059*9880d681SAndroid Build Coastguard Worker                   (!cast<PatFrag>("sextloadv" # SrcTy) addrmode6:$addr)),
7060*9880d681SAndroid Build Coastguard Worker         (EXTRACT_SUBREG (!cast<Instruction>("VMOVLsv" # Insn2Lanes # Insn2Ty)
7061*9880d681SAndroid Build Coastguard Worker           (EXTRACT_SUBREG (!cast<Instruction>("VMOVLsv" # Insn1Lanes # Insn1Ty)
7062*9880d681SAndroid Build Coastguard Worker            (!cast<Instruction>("VREV16d8")
7063*9880d681SAndroid Build Coastguard Worker             (VLD1LNd16 addrmode6:$addr, (f64 (IMPLICIT_DEF)), (i32 0)))),
7064*9880d681SAndroid Build Coastguard Worker             dsub_0)),
7065*9880d681SAndroid Build Coastguard Worker          dsub_0)>;
7066*9880d681SAndroid Build Coastguard Worker}
7067*9880d681SAndroid Build Coastguard Worker
7068*9880d681SAndroid Build Coastguard Workerdefm : Lengthen_Single<"8", "i16", "8">; // v8i8 -> v8i16
7069*9880d681SAndroid Build Coastguard Workerdefm : Lengthen_Single<"4", "i32", "16">; // v4i16 -> v4i32
7070*9880d681SAndroid Build Coastguard Workerdefm : Lengthen_Single<"2", "i64", "32">; // v2i32 -> v2i64
7071*9880d681SAndroid Build Coastguard Worker
7072*9880d681SAndroid Build Coastguard Workerlet Predicates = [IsLE] in {
7073*9880d681SAndroid Build Coastguard Worker  defm : Lengthen_HalfSingle<"4", "i16", "i8", "8", "i16">; // v4i8 -> v4i16
7074*9880d681SAndroid Build Coastguard Worker  defm : Lengthen_HalfSingle<"2", "i32", "i16", "4", "i32">; // v2i16 -> v2i32
7075*9880d681SAndroid Build Coastguard Worker
7076*9880d681SAndroid Build Coastguard Worker  // Double lengthening - v4i8 -> v4i16 -> v4i32
7077*9880d681SAndroid Build Coastguard Worker  defm : Lengthen_Double<"4", "i32", "i8", "8", "i16", "4", "i32">;
7078*9880d681SAndroid Build Coastguard Worker  // v2i8 -> v2i16 -> v2i32
7079*9880d681SAndroid Build Coastguard Worker  defm : Lengthen_HalfDouble<"2", "i32", "i8", "8", "i16", "4", "i32">;
7080*9880d681SAndroid Build Coastguard Worker  // v2i16 -> v2i32 -> v2i64
7081*9880d681SAndroid Build Coastguard Worker  defm : Lengthen_Double<"2", "i64", "i16", "4", "i32", "2", "i64">;
7082*9880d681SAndroid Build Coastguard Worker}
7083*9880d681SAndroid Build Coastguard Worker
7084*9880d681SAndroid Build Coastguard Workerlet Predicates = [IsBE] in {
7085*9880d681SAndroid Build Coastguard Worker  defm : Lengthen_HalfSingle_Big_Endian<"4", "i16", "i8", "8", "i16", "8">; // v4i8 -> v4i16
7086*9880d681SAndroid Build Coastguard Worker  defm : Lengthen_HalfSingle_Big_Endian<"2", "i32", "i16", "4", "i32", "16">; // v2i16 -> v2i32
7087*9880d681SAndroid Build Coastguard Worker
7088*9880d681SAndroid Build Coastguard Worker  // Double lengthening - v4i8 -> v4i16 -> v4i32
7089*9880d681SAndroid Build Coastguard Worker  defm : Lengthen_Double_Big_Endian<"4", "i32", "i8", "8", "i16", "4", "i32", "8">;
7090*9880d681SAndroid Build Coastguard Worker  // v2i8 -> v2i16 -> v2i32
7091*9880d681SAndroid Build Coastguard Worker  defm : Lengthen_HalfDouble_Big_Endian<"2", "i32", "i8", "8", "i16", "4", "i32">;
7092*9880d681SAndroid Build Coastguard Worker  // v2i16 -> v2i32 -> v2i64
7093*9880d681SAndroid Build Coastguard Worker  defm : Lengthen_Double_Big_Endian<"2", "i64", "i16", "4", "i32", "2", "i64", "16">;
7094*9880d681SAndroid Build Coastguard Worker}
7095*9880d681SAndroid Build Coastguard Worker
7096*9880d681SAndroid Build Coastguard Worker// Triple lengthening - v2i8 -> v2i16 -> v2i32 -> v2i64
7097*9880d681SAndroid Build Coastguard Workerlet Predicates = [IsLE] in {
7098*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2i64 (extloadvi8 addrmode6:$addr)),
7099*9880d681SAndroid Build Coastguard Worker        (VMOVLuv2i64 (EXTRACT_SUBREG (VMOVLuv4i32 (EXTRACT_SUBREG (VMOVLuv8i16
7100*9880d681SAndroid Build Coastguard Worker           (VLD1LNd16 addrmode6:$addr,
7101*9880d681SAndroid Build Coastguard Worker                      (f64 (IMPLICIT_DEF)), (i32 0))), dsub_0)), dsub_0))>;
7102*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2i64 (zextloadvi8 addrmode6:$addr)),
7103*9880d681SAndroid Build Coastguard Worker        (VMOVLuv2i64 (EXTRACT_SUBREG (VMOVLuv4i32 (EXTRACT_SUBREG (VMOVLuv8i16
7104*9880d681SAndroid Build Coastguard Worker           (VLD1LNd16 addrmode6:$addr,
7105*9880d681SAndroid Build Coastguard Worker                      (f64 (IMPLICIT_DEF)), (i32 0))), dsub_0)), dsub_0))>;
7106*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2i64 (sextloadvi8 addrmode6:$addr)),
7107*9880d681SAndroid Build Coastguard Worker        (VMOVLsv2i64 (EXTRACT_SUBREG (VMOVLsv4i32 (EXTRACT_SUBREG (VMOVLsv8i16
7108*9880d681SAndroid Build Coastguard Worker           (VLD1LNd16 addrmode6:$addr,
7109*9880d681SAndroid Build Coastguard Worker                      (f64 (IMPLICIT_DEF)), (i32 0))), dsub_0)), dsub_0))>;
7110*9880d681SAndroid Build Coastguard Worker}
7111*9880d681SAndroid Build Coastguard Worker// The following patterns are basically a copy of the patterns above,
7112*9880d681SAndroid Build Coastguard Worker// however with an additional VREV16d instruction to convert data
7113*9880d681SAndroid Build Coastguard Worker// loaded by VLD1LN into proper vector format in big endian mode.
7114*9880d681SAndroid Build Coastguard Workerlet Predicates = [IsBE] in {
7115*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2i64 (extloadvi8 addrmode6:$addr)),
7116*9880d681SAndroid Build Coastguard Worker        (VMOVLuv2i64 (EXTRACT_SUBREG (VMOVLuv4i32 (EXTRACT_SUBREG (VMOVLuv8i16
7117*9880d681SAndroid Build Coastguard Worker           (!cast<Instruction>("VREV16d8")
7118*9880d681SAndroid Build Coastguard Worker             (VLD1LNd16 addrmode6:$addr,
7119*9880d681SAndroid Build Coastguard Worker                        (f64 (IMPLICIT_DEF)), (i32 0)))), dsub_0)), dsub_0))>;
7120*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2i64 (zextloadvi8 addrmode6:$addr)),
7121*9880d681SAndroid Build Coastguard Worker        (VMOVLuv2i64 (EXTRACT_SUBREG (VMOVLuv4i32 (EXTRACT_SUBREG (VMOVLuv8i16
7122*9880d681SAndroid Build Coastguard Worker           (!cast<Instruction>("VREV16d8")
7123*9880d681SAndroid Build Coastguard Worker             (VLD1LNd16 addrmode6:$addr,
7124*9880d681SAndroid Build Coastguard Worker                        (f64 (IMPLICIT_DEF)), (i32 0)))), dsub_0)), dsub_0))>;
7125*9880d681SAndroid Build Coastguard Worker  def : Pat<(v2i64 (sextloadvi8 addrmode6:$addr)),
7126*9880d681SAndroid Build Coastguard Worker        (VMOVLsv2i64 (EXTRACT_SUBREG (VMOVLsv4i32 (EXTRACT_SUBREG (VMOVLsv8i16
7127*9880d681SAndroid Build Coastguard Worker           (!cast<Instruction>("VREV16d8")
7128*9880d681SAndroid Build Coastguard Worker             (VLD1LNd16 addrmode6:$addr,
7129*9880d681SAndroid Build Coastguard Worker                        (f64 (IMPLICIT_DEF)), (i32 0)))), dsub_0)), dsub_0))>;
7130*9880d681SAndroid Build Coastguard Worker}
7131*9880d681SAndroid Build Coastguard Worker
7132*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===//
7133*9880d681SAndroid Build Coastguard Worker// Assembler aliases
7134*9880d681SAndroid Build Coastguard Worker//
7135*9880d681SAndroid Build Coastguard Worker
7136*9880d681SAndroid Build Coastguard Workerdef : VFP2InstAlias<"fmdhr${p} $Dd, $Rn",
7137*9880d681SAndroid Build Coastguard Worker                    (VSETLNi32 DPR:$Dd, GPR:$Rn, 1, pred:$p)>;
7138*9880d681SAndroid Build Coastguard Workerdef : VFP2InstAlias<"fmdlr${p} $Dd, $Rn",
7139*9880d681SAndroid Build Coastguard Worker                    (VSETLNi32 DPR:$Dd, GPR:$Rn, 0, pred:$p)>;
7140*9880d681SAndroid Build Coastguard Worker
7141*9880d681SAndroid Build Coastguard Worker// VAND/VBIC/VEOR/VORR accept but do not require a type suffix.
7142*9880d681SAndroid Build Coastguard Workerdefm : NEONDTAnyInstAlias<"vand${p}", "$Vd, $Vn, $Vm",
7143*9880d681SAndroid Build Coastguard Worker                         (VANDd DPR:$Vd, DPR:$Vn, DPR:$Vm, pred:$p)>;
7144*9880d681SAndroid Build Coastguard Workerdefm : NEONDTAnyInstAlias<"vand${p}", "$Vd, $Vn, $Vm",
7145*9880d681SAndroid Build Coastguard Worker                         (VANDq QPR:$Vd, QPR:$Vn, QPR:$Vm, pred:$p)>;
7146*9880d681SAndroid Build Coastguard Workerdefm : NEONDTAnyInstAlias<"vbic${p}", "$Vd, $Vn, $Vm",
7147*9880d681SAndroid Build Coastguard Worker                         (VBICd DPR:$Vd, DPR:$Vn, DPR:$Vm, pred:$p)>;
7148*9880d681SAndroid Build Coastguard Workerdefm : NEONDTAnyInstAlias<"vbic${p}", "$Vd, $Vn, $Vm",
7149*9880d681SAndroid Build Coastguard Worker                         (VBICq QPR:$Vd, QPR:$Vn, QPR:$Vm, pred:$p)>;
7150*9880d681SAndroid Build Coastguard Workerdefm : NEONDTAnyInstAlias<"veor${p}", "$Vd, $Vn, $Vm",
7151*9880d681SAndroid Build Coastguard Worker                         (VEORd DPR:$Vd, DPR:$Vn, DPR:$Vm, pred:$p)>;
7152*9880d681SAndroid Build Coastguard Workerdefm : NEONDTAnyInstAlias<"veor${p}", "$Vd, $Vn, $Vm",
7153*9880d681SAndroid Build Coastguard Worker                         (VEORq QPR:$Vd, QPR:$Vn, QPR:$Vm, pred:$p)>;
7154*9880d681SAndroid Build Coastguard Workerdefm : NEONDTAnyInstAlias<"vorr${p}", "$Vd, $Vn, $Vm",
7155*9880d681SAndroid Build Coastguard Worker                         (VORRd DPR:$Vd, DPR:$Vn, DPR:$Vm, pred:$p)>;
7156*9880d681SAndroid Build Coastguard Workerdefm : NEONDTAnyInstAlias<"vorr${p}", "$Vd, $Vn, $Vm",
7157*9880d681SAndroid Build Coastguard Worker                         (VORRq QPR:$Vd, QPR:$Vn, QPR:$Vm, pred:$p)>;
7158*9880d681SAndroid Build Coastguard Worker// ... two-operand aliases
7159*9880d681SAndroid Build Coastguard Workerdefm : NEONDTAnyInstAlias<"vand${p}", "$Vdn, $Vm",
7160*9880d681SAndroid Build Coastguard Worker                         (VANDd DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
7161*9880d681SAndroid Build Coastguard Workerdefm : NEONDTAnyInstAlias<"vand${p}", "$Vdn, $Vm",
7162*9880d681SAndroid Build Coastguard Worker                         (VANDq QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
7163*9880d681SAndroid Build Coastguard Workerdefm : NEONDTAnyInstAlias<"veor${p}", "$Vdn, $Vm",
7164*9880d681SAndroid Build Coastguard Worker                         (VEORd DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
7165*9880d681SAndroid Build Coastguard Workerdefm : NEONDTAnyInstAlias<"veor${p}", "$Vdn, $Vm",
7166*9880d681SAndroid Build Coastguard Worker                         (VEORq QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
7167*9880d681SAndroid Build Coastguard Workerdefm : NEONDTAnyInstAlias<"vorr${p}", "$Vdn, $Vm",
7168*9880d681SAndroid Build Coastguard Worker                         (VORRd DPR:$Vdn, DPR:$Vdn, DPR:$Vm, pred:$p)>;
7169*9880d681SAndroid Build Coastguard Workerdefm : NEONDTAnyInstAlias<"vorr${p}", "$Vdn, $Vm",
7170*9880d681SAndroid Build Coastguard Worker                         (VORRq QPR:$Vdn, QPR:$Vdn, QPR:$Vm, pred:$p)>;
7171*9880d681SAndroid Build Coastguard Worker// ... immediates
7172*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vand${p}.i16 $Vd, $imm",
7173*9880d681SAndroid Build Coastguard Worker                    (VBICiv4i16 DPR:$Vd, nImmSplatNotI16:$imm, pred:$p)>;
7174*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vand${p}.i32 $Vd, $imm",
7175*9880d681SAndroid Build Coastguard Worker                    (VBICiv2i32 DPR:$Vd, nImmSplatNotI32:$imm, pred:$p)>;
7176*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vand${p}.i16 $Vd, $imm",
7177*9880d681SAndroid Build Coastguard Worker                    (VBICiv8i16 QPR:$Vd, nImmSplatNotI16:$imm, pred:$p)>;
7178*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vand${p}.i32 $Vd, $imm",
7179*9880d681SAndroid Build Coastguard Worker                    (VBICiv4i32 QPR:$Vd, nImmSplatNotI32:$imm, pred:$p)>;
7180*9880d681SAndroid Build Coastguard Worker
7181*9880d681SAndroid Build Coastguard Worker
7182*9880d681SAndroid Build Coastguard Worker// VLD1 single-lane pseudo-instructions. These need special handling for
7183*9880d681SAndroid Build Coastguard Worker// the lane index that an InstAlias can't handle, so we use these instead.
7184*9880d681SAndroid Build Coastguard Workerdef VLD1LNdAsm_8 : NEONDataTypeAsmPseudoInst<"vld1${p}", ".8", "$list, $addr",
7185*9880d681SAndroid Build Coastguard Worker                 (ins VecListOneDByteIndexed:$list, addrmode6alignNone:$addr,
7186*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7187*9880d681SAndroid Build Coastguard Workerdef VLD1LNdAsm_16 : NEONDataTypeAsmPseudoInst<"vld1${p}", ".16", "$list, $addr",
7188*9880d681SAndroid Build Coastguard Worker                 (ins VecListOneDHWordIndexed:$list, addrmode6align16:$addr,
7189*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7190*9880d681SAndroid Build Coastguard Workerdef VLD1LNdAsm_32 : NEONDataTypeAsmPseudoInst<"vld1${p}", ".32", "$list, $addr",
7191*9880d681SAndroid Build Coastguard Worker                 (ins VecListOneDWordIndexed:$list, addrmode6align32:$addr,
7192*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7193*9880d681SAndroid Build Coastguard Worker
7194*9880d681SAndroid Build Coastguard Workerdef VLD1LNdWB_fixed_Asm_8 :
7195*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld1${p}", ".8", "$list, $addr!",
7196*9880d681SAndroid Build Coastguard Worker                 (ins VecListOneDByteIndexed:$list, addrmode6alignNone:$addr,
7197*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7198*9880d681SAndroid Build Coastguard Workerdef VLD1LNdWB_fixed_Asm_16 :
7199*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld1${p}", ".16", "$list, $addr!",
7200*9880d681SAndroid Build Coastguard Worker                 (ins VecListOneDHWordIndexed:$list, addrmode6align16:$addr,
7201*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7202*9880d681SAndroid Build Coastguard Workerdef VLD1LNdWB_fixed_Asm_32 :
7203*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld1${p}", ".32", "$list, $addr!",
7204*9880d681SAndroid Build Coastguard Worker                 (ins VecListOneDWordIndexed:$list, addrmode6align32:$addr,
7205*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7206*9880d681SAndroid Build Coastguard Workerdef VLD1LNdWB_register_Asm_8 :
7207*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld1${p}", ".8", "$list, $addr, $Rm",
7208*9880d681SAndroid Build Coastguard Worker                  (ins VecListOneDByteIndexed:$list, addrmode6alignNone:$addr,
7209*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7210*9880d681SAndroid Build Coastguard Workerdef VLD1LNdWB_register_Asm_16 :
7211*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld1${p}", ".16", "$list, $addr, $Rm",
7212*9880d681SAndroid Build Coastguard Worker                  (ins VecListOneDHWordIndexed:$list, addrmode6align16:$addr,
7213*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7214*9880d681SAndroid Build Coastguard Workerdef VLD1LNdWB_register_Asm_32 :
7215*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld1${p}", ".32", "$list, $addr, $Rm",
7216*9880d681SAndroid Build Coastguard Worker                  (ins VecListOneDWordIndexed:$list, addrmode6align32:$addr,
7217*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7218*9880d681SAndroid Build Coastguard Worker
7219*9880d681SAndroid Build Coastguard Worker
7220*9880d681SAndroid Build Coastguard Worker// VST1 single-lane pseudo-instructions. These need special handling for
7221*9880d681SAndroid Build Coastguard Worker// the lane index that an InstAlias can't handle, so we use these instead.
7222*9880d681SAndroid Build Coastguard Workerdef VST1LNdAsm_8 : NEONDataTypeAsmPseudoInst<"vst1${p}", ".8", "$list, $addr",
7223*9880d681SAndroid Build Coastguard Worker                 (ins VecListOneDByteIndexed:$list, addrmode6alignNone:$addr,
7224*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7225*9880d681SAndroid Build Coastguard Workerdef VST1LNdAsm_16 : NEONDataTypeAsmPseudoInst<"vst1${p}", ".16", "$list, $addr",
7226*9880d681SAndroid Build Coastguard Worker                 (ins VecListOneDHWordIndexed:$list, addrmode6align16:$addr,
7227*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7228*9880d681SAndroid Build Coastguard Workerdef VST1LNdAsm_32 : NEONDataTypeAsmPseudoInst<"vst1${p}", ".32", "$list, $addr",
7229*9880d681SAndroid Build Coastguard Worker                 (ins VecListOneDWordIndexed:$list, addrmode6align32:$addr,
7230*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7231*9880d681SAndroid Build Coastguard Worker
7232*9880d681SAndroid Build Coastguard Workerdef VST1LNdWB_fixed_Asm_8 :
7233*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst1${p}", ".8", "$list, $addr!",
7234*9880d681SAndroid Build Coastguard Worker                 (ins VecListOneDByteIndexed:$list, addrmode6alignNone:$addr,
7235*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7236*9880d681SAndroid Build Coastguard Workerdef VST1LNdWB_fixed_Asm_16 :
7237*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst1${p}", ".16", "$list, $addr!",
7238*9880d681SAndroid Build Coastguard Worker                 (ins VecListOneDHWordIndexed:$list, addrmode6align16:$addr,
7239*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7240*9880d681SAndroid Build Coastguard Workerdef VST1LNdWB_fixed_Asm_32 :
7241*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst1${p}", ".32", "$list, $addr!",
7242*9880d681SAndroid Build Coastguard Worker                 (ins VecListOneDWordIndexed:$list, addrmode6align32:$addr,
7243*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7244*9880d681SAndroid Build Coastguard Workerdef VST1LNdWB_register_Asm_8 :
7245*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst1${p}", ".8", "$list, $addr, $Rm",
7246*9880d681SAndroid Build Coastguard Worker                  (ins VecListOneDByteIndexed:$list, addrmode6alignNone:$addr,
7247*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7248*9880d681SAndroid Build Coastguard Workerdef VST1LNdWB_register_Asm_16 :
7249*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst1${p}", ".16", "$list, $addr, $Rm",
7250*9880d681SAndroid Build Coastguard Worker                  (ins VecListOneDHWordIndexed:$list, addrmode6align16:$addr,
7251*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7252*9880d681SAndroid Build Coastguard Workerdef VST1LNdWB_register_Asm_32 :
7253*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst1${p}", ".32", "$list, $addr, $Rm",
7254*9880d681SAndroid Build Coastguard Worker                  (ins VecListOneDWordIndexed:$list, addrmode6align32:$addr,
7255*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7256*9880d681SAndroid Build Coastguard Worker
7257*9880d681SAndroid Build Coastguard Worker// VLD2 single-lane pseudo-instructions. These need special handling for
7258*9880d681SAndroid Build Coastguard Worker// the lane index that an InstAlias can't handle, so we use these instead.
7259*9880d681SAndroid Build Coastguard Workerdef VLD2LNdAsm_8 : NEONDataTypeAsmPseudoInst<"vld2${p}", ".8", "$list, $addr",
7260*9880d681SAndroid Build Coastguard Worker                 (ins VecListTwoDByteIndexed:$list, addrmode6align16:$addr,
7261*9880d681SAndroid Build Coastguard Worker                  pred:$p)>;
7262*9880d681SAndroid Build Coastguard Workerdef VLD2LNdAsm_16 : NEONDataTypeAsmPseudoInst<"vld2${p}", ".16", "$list, $addr",
7263*9880d681SAndroid Build Coastguard Worker                 (ins VecListTwoDHWordIndexed:$list, addrmode6align32:$addr,
7264*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7265*9880d681SAndroid Build Coastguard Workerdef VLD2LNdAsm_32 : NEONDataTypeAsmPseudoInst<"vld2${p}", ".32", "$list, $addr",
7266*9880d681SAndroid Build Coastguard Worker                 (ins VecListTwoDWordIndexed:$list, addrmode6align64:$addr, pred:$p)>;
7267*9880d681SAndroid Build Coastguard Workerdef VLD2LNqAsm_16 : NEONDataTypeAsmPseudoInst<"vld2${p}", ".16", "$list, $addr",
7268*9880d681SAndroid Build Coastguard Worker                 (ins VecListTwoQHWordIndexed:$list, addrmode6align32:$addr,
7269*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7270*9880d681SAndroid Build Coastguard Workerdef VLD2LNqAsm_32 : NEONDataTypeAsmPseudoInst<"vld2${p}", ".32", "$list, $addr",
7271*9880d681SAndroid Build Coastguard Worker                 (ins VecListTwoQWordIndexed:$list, addrmode6align64:$addr,
7272*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7273*9880d681SAndroid Build Coastguard Worker
7274*9880d681SAndroid Build Coastguard Workerdef VLD2LNdWB_fixed_Asm_8 :
7275*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld2${p}", ".8", "$list, $addr!",
7276*9880d681SAndroid Build Coastguard Worker                 (ins VecListTwoDByteIndexed:$list, addrmode6align16:$addr,
7277*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7278*9880d681SAndroid Build Coastguard Workerdef VLD2LNdWB_fixed_Asm_16 :
7279*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld2${p}", ".16", "$list, $addr!",
7280*9880d681SAndroid Build Coastguard Worker                 (ins VecListTwoDHWordIndexed:$list, addrmode6align32:$addr,
7281*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7282*9880d681SAndroid Build Coastguard Workerdef VLD2LNdWB_fixed_Asm_32 :
7283*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld2${p}", ".32", "$list, $addr!",
7284*9880d681SAndroid Build Coastguard Worker                 (ins VecListTwoDWordIndexed:$list, addrmode6align64:$addr,
7285*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7286*9880d681SAndroid Build Coastguard Workerdef VLD2LNqWB_fixed_Asm_16 :
7287*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld2${p}", ".16", "$list, $addr!",
7288*9880d681SAndroid Build Coastguard Worker                 (ins VecListTwoQHWordIndexed:$list, addrmode6align32:$addr,
7289*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7290*9880d681SAndroid Build Coastguard Workerdef VLD2LNqWB_fixed_Asm_32 :
7291*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld2${p}", ".32", "$list, $addr!",
7292*9880d681SAndroid Build Coastguard Worker                 (ins VecListTwoQWordIndexed:$list, addrmode6align64:$addr,
7293*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7294*9880d681SAndroid Build Coastguard Workerdef VLD2LNdWB_register_Asm_8 :
7295*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld2${p}", ".8", "$list, $addr, $Rm",
7296*9880d681SAndroid Build Coastguard Worker                  (ins VecListTwoDByteIndexed:$list, addrmode6align16:$addr,
7297*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7298*9880d681SAndroid Build Coastguard Workerdef VLD2LNdWB_register_Asm_16 :
7299*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld2${p}", ".16", "$list, $addr, $Rm",
7300*9880d681SAndroid Build Coastguard Worker                  (ins VecListTwoDHWordIndexed:$list, addrmode6align32:$addr,
7301*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7302*9880d681SAndroid Build Coastguard Workerdef VLD2LNdWB_register_Asm_32 :
7303*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld2${p}", ".32", "$list, $addr, $Rm",
7304*9880d681SAndroid Build Coastguard Worker                  (ins VecListTwoDWordIndexed:$list, addrmode6align64:$addr,
7305*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7306*9880d681SAndroid Build Coastguard Workerdef VLD2LNqWB_register_Asm_16 :
7307*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld2${p}", ".16", "$list, $addr, $Rm",
7308*9880d681SAndroid Build Coastguard Worker                  (ins VecListTwoQHWordIndexed:$list, addrmode6align32:$addr,
7309*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7310*9880d681SAndroid Build Coastguard Workerdef VLD2LNqWB_register_Asm_32 :
7311*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld2${p}", ".32", "$list, $addr, $Rm",
7312*9880d681SAndroid Build Coastguard Worker                  (ins VecListTwoQWordIndexed:$list, addrmode6align64:$addr,
7313*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7314*9880d681SAndroid Build Coastguard Worker
7315*9880d681SAndroid Build Coastguard Worker
7316*9880d681SAndroid Build Coastguard Worker// VST2 single-lane pseudo-instructions. These need special handling for
7317*9880d681SAndroid Build Coastguard Worker// the lane index that an InstAlias can't handle, so we use these instead.
7318*9880d681SAndroid Build Coastguard Workerdef VST2LNdAsm_8 : NEONDataTypeAsmPseudoInst<"vst2${p}", ".8", "$list, $addr",
7319*9880d681SAndroid Build Coastguard Worker                 (ins VecListTwoDByteIndexed:$list, addrmode6align16:$addr,
7320*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7321*9880d681SAndroid Build Coastguard Workerdef VST2LNdAsm_16 : NEONDataTypeAsmPseudoInst<"vst2${p}", ".16", "$list, $addr",
7322*9880d681SAndroid Build Coastguard Worker                 (ins VecListTwoDHWordIndexed:$list, addrmode6align32:$addr,
7323*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7324*9880d681SAndroid Build Coastguard Workerdef VST2LNdAsm_32 : NEONDataTypeAsmPseudoInst<"vst2${p}", ".32", "$list, $addr",
7325*9880d681SAndroid Build Coastguard Worker                 (ins VecListTwoDWordIndexed:$list, addrmode6align64:$addr,
7326*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7327*9880d681SAndroid Build Coastguard Workerdef VST2LNqAsm_16 : NEONDataTypeAsmPseudoInst<"vst2${p}", ".16", "$list, $addr",
7328*9880d681SAndroid Build Coastguard Worker                 (ins VecListTwoQHWordIndexed:$list, addrmode6align32:$addr,
7329*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7330*9880d681SAndroid Build Coastguard Workerdef VST2LNqAsm_32 : NEONDataTypeAsmPseudoInst<"vst2${p}", ".32", "$list, $addr",
7331*9880d681SAndroid Build Coastguard Worker                 (ins VecListTwoQWordIndexed:$list, addrmode6align64:$addr,
7332*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7333*9880d681SAndroid Build Coastguard Worker
7334*9880d681SAndroid Build Coastguard Workerdef VST2LNdWB_fixed_Asm_8 :
7335*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst2${p}", ".8", "$list, $addr!",
7336*9880d681SAndroid Build Coastguard Worker                 (ins VecListTwoDByteIndexed:$list, addrmode6align16:$addr,
7337*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7338*9880d681SAndroid Build Coastguard Workerdef VST2LNdWB_fixed_Asm_16 :
7339*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst2${p}", ".16", "$list, $addr!",
7340*9880d681SAndroid Build Coastguard Worker                 (ins VecListTwoDHWordIndexed:$list, addrmode6align32:$addr,
7341*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7342*9880d681SAndroid Build Coastguard Workerdef VST2LNdWB_fixed_Asm_32 :
7343*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst2${p}", ".32", "$list, $addr!",
7344*9880d681SAndroid Build Coastguard Worker                 (ins VecListTwoDWordIndexed:$list, addrmode6align64:$addr,
7345*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7346*9880d681SAndroid Build Coastguard Workerdef VST2LNqWB_fixed_Asm_16 :
7347*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst2${p}", ".16", "$list, $addr!",
7348*9880d681SAndroid Build Coastguard Worker                 (ins VecListTwoQHWordIndexed:$list, addrmode6align32:$addr,
7349*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7350*9880d681SAndroid Build Coastguard Workerdef VST2LNqWB_fixed_Asm_32 :
7351*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst2${p}", ".32", "$list, $addr!",
7352*9880d681SAndroid Build Coastguard Worker                 (ins VecListTwoQWordIndexed:$list, addrmode6align64:$addr,
7353*9880d681SAndroid Build Coastguard Worker                      pred:$p)>;
7354*9880d681SAndroid Build Coastguard Workerdef VST2LNdWB_register_Asm_8 :
7355*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst2${p}", ".8", "$list, $addr, $Rm",
7356*9880d681SAndroid Build Coastguard Worker                  (ins VecListTwoDByteIndexed:$list, addrmode6align16:$addr,
7357*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7358*9880d681SAndroid Build Coastguard Workerdef VST2LNdWB_register_Asm_16 :
7359*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst2${p}", ".16","$list, $addr, $Rm",
7360*9880d681SAndroid Build Coastguard Worker                  (ins VecListTwoDHWordIndexed:$list, addrmode6align32:$addr,
7361*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7362*9880d681SAndroid Build Coastguard Workerdef VST2LNdWB_register_Asm_32 :
7363*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst2${p}", ".32", "$list, $addr, $Rm",
7364*9880d681SAndroid Build Coastguard Worker                  (ins VecListTwoDWordIndexed:$list, addrmode6align64:$addr,
7365*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7366*9880d681SAndroid Build Coastguard Workerdef VST2LNqWB_register_Asm_16 :
7367*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst2${p}", ".16","$list, $addr, $Rm",
7368*9880d681SAndroid Build Coastguard Worker                  (ins VecListTwoQHWordIndexed:$list, addrmode6align32:$addr,
7369*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7370*9880d681SAndroid Build Coastguard Workerdef VST2LNqWB_register_Asm_32 :
7371*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst2${p}", ".32", "$list, $addr, $Rm",
7372*9880d681SAndroid Build Coastguard Worker                  (ins VecListTwoQWordIndexed:$list, addrmode6align64:$addr,
7373*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7374*9880d681SAndroid Build Coastguard Worker
7375*9880d681SAndroid Build Coastguard Worker// VLD3 all-lanes pseudo-instructions. These need special handling for
7376*9880d681SAndroid Build Coastguard Worker// the lane index that an InstAlias can't handle, so we use these instead.
7377*9880d681SAndroid Build Coastguard Workerdef VLD3DUPdAsm_8 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr",
7378*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeDAllLanes:$list, addrmode6dupalignNone:$addr,
7379*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7380*9880d681SAndroid Build Coastguard Workerdef VLD3DUPdAsm_16: NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr",
7381*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeDAllLanes:$list, addrmode6dupalignNone:$addr,
7382*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7383*9880d681SAndroid Build Coastguard Workerdef VLD3DUPdAsm_32: NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr",
7384*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeDAllLanes:$list, addrmode6dupalignNone:$addr,
7385*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7386*9880d681SAndroid Build Coastguard Workerdef VLD3DUPqAsm_8 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr",
7387*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeQAllLanes:$list, addrmode6dupalignNone:$addr,
7388*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7389*9880d681SAndroid Build Coastguard Workerdef VLD3DUPqAsm_16: NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr",
7390*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeQAllLanes:$list, addrmode6dupalignNone:$addr,
7391*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7392*9880d681SAndroid Build Coastguard Workerdef VLD3DUPqAsm_32: NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr",
7393*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeQAllLanes:$list, addrmode6dupalignNone:$addr,
7394*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7395*9880d681SAndroid Build Coastguard Worker
7396*9880d681SAndroid Build Coastguard Workerdef VLD3DUPdWB_fixed_Asm_8 :
7397*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr!",
7398*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeDAllLanes:$list, addrmode6dupalignNone:$addr,
7399*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7400*9880d681SAndroid Build Coastguard Workerdef VLD3DUPdWB_fixed_Asm_16 :
7401*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr!",
7402*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeDAllLanes:$list, addrmode6dupalignNone:$addr,
7403*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7404*9880d681SAndroid Build Coastguard Workerdef VLD3DUPdWB_fixed_Asm_32 :
7405*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr!",
7406*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeDAllLanes:$list, addrmode6dupalignNone:$addr,
7407*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7408*9880d681SAndroid Build Coastguard Workerdef VLD3DUPqWB_fixed_Asm_8 :
7409*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr!",
7410*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeQAllLanes:$list, addrmode6dupalignNone:$addr,
7411*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7412*9880d681SAndroid Build Coastguard Workerdef VLD3DUPqWB_fixed_Asm_16 :
7413*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr!",
7414*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeQAllLanes:$list, addrmode6dupalignNone:$addr,
7415*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7416*9880d681SAndroid Build Coastguard Workerdef VLD3DUPqWB_fixed_Asm_32 :
7417*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr!",
7418*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeQAllLanes:$list, addrmode6dupalignNone:$addr,
7419*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7420*9880d681SAndroid Build Coastguard Workerdef VLD3DUPdWB_register_Asm_8 :
7421*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr, $Rm",
7422*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeDAllLanes:$list, addrmode6dupalignNone:$addr,
7423*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7424*9880d681SAndroid Build Coastguard Workerdef VLD3DUPdWB_register_Asm_16 :
7425*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr, $Rm",
7426*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeDAllLanes:$list, addrmode6dupalignNone:$addr,
7427*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7428*9880d681SAndroid Build Coastguard Workerdef VLD3DUPdWB_register_Asm_32 :
7429*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr, $Rm",
7430*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeDAllLanes:$list, addrmode6dupalignNone:$addr,
7431*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7432*9880d681SAndroid Build Coastguard Workerdef VLD3DUPqWB_register_Asm_8 :
7433*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr, $Rm",
7434*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeQAllLanes:$list, addrmode6dupalignNone:$addr,
7435*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7436*9880d681SAndroid Build Coastguard Workerdef VLD3DUPqWB_register_Asm_16 :
7437*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr, $Rm",
7438*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeQAllLanes:$list, addrmode6dupalignNone:$addr,
7439*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7440*9880d681SAndroid Build Coastguard Workerdef VLD3DUPqWB_register_Asm_32 :
7441*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr, $Rm",
7442*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeQAllLanes:$list, addrmode6dupalignNone:$addr,
7443*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7444*9880d681SAndroid Build Coastguard Worker
7445*9880d681SAndroid Build Coastguard Worker
7446*9880d681SAndroid Build Coastguard Worker// VLD3 single-lane pseudo-instructions. These need special handling for
7447*9880d681SAndroid Build Coastguard Worker// the lane index that an InstAlias can't handle, so we use these instead.
7448*9880d681SAndroid Build Coastguard Workerdef VLD3LNdAsm_8 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr",
7449*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeDByteIndexed:$list, addrmode6alignNone:$addr,
7450*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7451*9880d681SAndroid Build Coastguard Workerdef VLD3LNdAsm_16 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr",
7452*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeDHWordIndexed:$list, addrmode6alignNone:$addr,
7453*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7454*9880d681SAndroid Build Coastguard Workerdef VLD3LNdAsm_32 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr",
7455*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeDWordIndexed:$list, addrmode6alignNone:$addr,
7456*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7457*9880d681SAndroid Build Coastguard Workerdef VLD3LNqAsm_16 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr",
7458*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeQHWordIndexed:$list, addrmode6alignNone:$addr,
7459*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7460*9880d681SAndroid Build Coastguard Workerdef VLD3LNqAsm_32 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr",
7461*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeQWordIndexed:$list, addrmode6alignNone:$addr,
7462*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7463*9880d681SAndroid Build Coastguard Worker
7464*9880d681SAndroid Build Coastguard Workerdef VLD3LNdWB_fixed_Asm_8 :
7465*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr!",
7466*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeDByteIndexed:$list, addrmode6alignNone:$addr,
7467*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7468*9880d681SAndroid Build Coastguard Workerdef VLD3LNdWB_fixed_Asm_16 :
7469*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr!",
7470*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeDHWordIndexed:$list, addrmode6alignNone:$addr,
7471*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7472*9880d681SAndroid Build Coastguard Workerdef VLD3LNdWB_fixed_Asm_32 :
7473*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr!",
7474*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeDWordIndexed:$list, addrmode6alignNone:$addr,
7475*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7476*9880d681SAndroid Build Coastguard Workerdef VLD3LNqWB_fixed_Asm_16 :
7477*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr!",
7478*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeQHWordIndexed:$list, addrmode6alignNone:$addr,
7479*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7480*9880d681SAndroid Build Coastguard Workerdef VLD3LNqWB_fixed_Asm_32 :
7481*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr!",
7482*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeQWordIndexed:$list, addrmode6alignNone:$addr,
7483*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7484*9880d681SAndroid Build Coastguard Workerdef VLD3LNdWB_register_Asm_8 :
7485*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr, $Rm",
7486*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeDByteIndexed:$list, addrmode6alignNone:$addr,
7487*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7488*9880d681SAndroid Build Coastguard Workerdef VLD3LNdWB_register_Asm_16 :
7489*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr, $Rm",
7490*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeDHWordIndexed:$list,
7491*9880d681SAndroid Build Coastguard Worker                       addrmode6alignNone:$addr, rGPR:$Rm, pred:$p)>;
7492*9880d681SAndroid Build Coastguard Workerdef VLD3LNdWB_register_Asm_32 :
7493*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr, $Rm",
7494*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeDWordIndexed:$list, addrmode6alignNone:$addr,
7495*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7496*9880d681SAndroid Build Coastguard Workerdef VLD3LNqWB_register_Asm_16 :
7497*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr, $Rm",
7498*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeQHWordIndexed:$list,
7499*9880d681SAndroid Build Coastguard Worker                       addrmode6alignNone:$addr, rGPR:$Rm, pred:$p)>;
7500*9880d681SAndroid Build Coastguard Workerdef VLD3LNqWB_register_Asm_32 :
7501*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr, $Rm",
7502*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeQWordIndexed:$list, addrmode6alignNone:$addr,
7503*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7504*9880d681SAndroid Build Coastguard Worker
7505*9880d681SAndroid Build Coastguard Worker// VLD3 multiple structure pseudo-instructions. These need special handling for
7506*9880d681SAndroid Build Coastguard Worker// the vector operands that the normal instructions don't yet model.
7507*9880d681SAndroid Build Coastguard Worker// FIXME: Remove these when the register classes and instructions are updated.
7508*9880d681SAndroid Build Coastguard Workerdef VLD3dAsm_8 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr",
7509*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeD:$list, addrmode6align64:$addr, pred:$p)>;
7510*9880d681SAndroid Build Coastguard Workerdef VLD3dAsm_16 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr",
7511*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeD:$list, addrmode6align64:$addr, pred:$p)>;
7512*9880d681SAndroid Build Coastguard Workerdef VLD3dAsm_32 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr",
7513*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeD:$list, addrmode6align64:$addr, pred:$p)>;
7514*9880d681SAndroid Build Coastguard Workerdef VLD3qAsm_8 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr",
7515*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeQ:$list, addrmode6align64:$addr, pred:$p)>;
7516*9880d681SAndroid Build Coastguard Workerdef VLD3qAsm_16 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr",
7517*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeQ:$list, addrmode6align64:$addr, pred:$p)>;
7518*9880d681SAndroid Build Coastguard Workerdef VLD3qAsm_32 : NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr",
7519*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeQ:$list, addrmode6align64:$addr, pred:$p)>;
7520*9880d681SAndroid Build Coastguard Worker
7521*9880d681SAndroid Build Coastguard Workerdef VLD3dWB_fixed_Asm_8 :
7522*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr!",
7523*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeD:$list, addrmode6align64:$addr, pred:$p)>;
7524*9880d681SAndroid Build Coastguard Workerdef VLD3dWB_fixed_Asm_16 :
7525*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr!",
7526*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeD:$list, addrmode6align64:$addr, pred:$p)>;
7527*9880d681SAndroid Build Coastguard Workerdef VLD3dWB_fixed_Asm_32 :
7528*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr!",
7529*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeD:$list, addrmode6align64:$addr, pred:$p)>;
7530*9880d681SAndroid Build Coastguard Workerdef VLD3qWB_fixed_Asm_8 :
7531*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr!",
7532*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeQ:$list, addrmode6align64:$addr, pred:$p)>;
7533*9880d681SAndroid Build Coastguard Workerdef VLD3qWB_fixed_Asm_16 :
7534*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr!",
7535*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeQ:$list, addrmode6align64:$addr, pred:$p)>;
7536*9880d681SAndroid Build Coastguard Workerdef VLD3qWB_fixed_Asm_32 :
7537*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr!",
7538*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeQ:$list, addrmode6align64:$addr, pred:$p)>;
7539*9880d681SAndroid Build Coastguard Workerdef VLD3dWB_register_Asm_8 :
7540*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr, $Rm",
7541*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeD:$list, addrmode6align64:$addr,
7542*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7543*9880d681SAndroid Build Coastguard Workerdef VLD3dWB_register_Asm_16 :
7544*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr, $Rm",
7545*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeD:$list, addrmode6align64:$addr,
7546*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7547*9880d681SAndroid Build Coastguard Workerdef VLD3dWB_register_Asm_32 :
7548*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr, $Rm",
7549*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeD:$list, addrmode6align64:$addr,
7550*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7551*9880d681SAndroid Build Coastguard Workerdef VLD3qWB_register_Asm_8 :
7552*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".8", "$list, $addr, $Rm",
7553*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeQ:$list, addrmode6align64:$addr,
7554*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7555*9880d681SAndroid Build Coastguard Workerdef VLD3qWB_register_Asm_16 :
7556*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".16", "$list, $addr, $Rm",
7557*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeQ:$list, addrmode6align64:$addr,
7558*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7559*9880d681SAndroid Build Coastguard Workerdef VLD3qWB_register_Asm_32 :
7560*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld3${p}", ".32", "$list, $addr, $Rm",
7561*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeQ:$list, addrmode6align64:$addr,
7562*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7563*9880d681SAndroid Build Coastguard Worker
7564*9880d681SAndroid Build Coastguard Worker// VST3 single-lane pseudo-instructions. These need special handling for
7565*9880d681SAndroid Build Coastguard Worker// the lane index that an InstAlias can't handle, so we use these instead.
7566*9880d681SAndroid Build Coastguard Workerdef VST3LNdAsm_8 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr",
7567*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeDByteIndexed:$list, addrmode6alignNone:$addr,
7568*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7569*9880d681SAndroid Build Coastguard Workerdef VST3LNdAsm_16 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr",
7570*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeDHWordIndexed:$list, addrmode6alignNone:$addr,
7571*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7572*9880d681SAndroid Build Coastguard Workerdef VST3LNdAsm_32 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr",
7573*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeDWordIndexed:$list, addrmode6alignNone:$addr,
7574*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7575*9880d681SAndroid Build Coastguard Workerdef VST3LNqAsm_16 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr",
7576*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeQHWordIndexed:$list, addrmode6alignNone:$addr,
7577*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7578*9880d681SAndroid Build Coastguard Workerdef VST3LNqAsm_32 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr",
7579*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeQWordIndexed:$list, addrmode6alignNone:$addr,
7580*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7581*9880d681SAndroid Build Coastguard Worker
7582*9880d681SAndroid Build Coastguard Workerdef VST3LNdWB_fixed_Asm_8 :
7583*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr!",
7584*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeDByteIndexed:$list, addrmode6alignNone:$addr,
7585*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7586*9880d681SAndroid Build Coastguard Workerdef VST3LNdWB_fixed_Asm_16 :
7587*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr!",
7588*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeDHWordIndexed:$list, addrmode6alignNone:$addr,
7589*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7590*9880d681SAndroid Build Coastguard Workerdef VST3LNdWB_fixed_Asm_32 :
7591*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr!",
7592*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeDWordIndexed:$list, addrmode6alignNone:$addr,
7593*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7594*9880d681SAndroid Build Coastguard Workerdef VST3LNqWB_fixed_Asm_16 :
7595*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr!",
7596*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeQHWordIndexed:$list, addrmode6alignNone:$addr,
7597*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7598*9880d681SAndroid Build Coastguard Workerdef VST3LNqWB_fixed_Asm_32 :
7599*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr!",
7600*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeQWordIndexed:$list, addrmode6alignNone:$addr,
7601*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7602*9880d681SAndroid Build Coastguard Workerdef VST3LNdWB_register_Asm_8 :
7603*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr, $Rm",
7604*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeDByteIndexed:$list, addrmode6alignNone:$addr,
7605*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7606*9880d681SAndroid Build Coastguard Workerdef VST3LNdWB_register_Asm_16 :
7607*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr, $Rm",
7608*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeDHWordIndexed:$list,
7609*9880d681SAndroid Build Coastguard Worker                       addrmode6alignNone:$addr, rGPR:$Rm, pred:$p)>;
7610*9880d681SAndroid Build Coastguard Workerdef VST3LNdWB_register_Asm_32 :
7611*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr, $Rm",
7612*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeDWordIndexed:$list, addrmode6alignNone:$addr,
7613*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7614*9880d681SAndroid Build Coastguard Workerdef VST3LNqWB_register_Asm_16 :
7615*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr, $Rm",
7616*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeQHWordIndexed:$list,
7617*9880d681SAndroid Build Coastguard Worker                       addrmode6alignNone:$addr, rGPR:$Rm, pred:$p)>;
7618*9880d681SAndroid Build Coastguard Workerdef VST3LNqWB_register_Asm_32 :
7619*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr, $Rm",
7620*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeQWordIndexed:$list, addrmode6alignNone:$addr,
7621*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7622*9880d681SAndroid Build Coastguard Worker
7623*9880d681SAndroid Build Coastguard Worker
7624*9880d681SAndroid Build Coastguard Worker// VST3 multiple structure pseudo-instructions. These need special handling for
7625*9880d681SAndroid Build Coastguard Worker// the vector operands that the normal instructions don't yet model.
7626*9880d681SAndroid Build Coastguard Worker// FIXME: Remove these when the register classes and instructions are updated.
7627*9880d681SAndroid Build Coastguard Workerdef VST3dAsm_8 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr",
7628*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeD:$list, addrmode6align64:$addr, pred:$p)>;
7629*9880d681SAndroid Build Coastguard Workerdef VST3dAsm_16 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr",
7630*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeD:$list, addrmode6align64:$addr, pred:$p)>;
7631*9880d681SAndroid Build Coastguard Workerdef VST3dAsm_32 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr",
7632*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeD:$list, addrmode6align64:$addr, pred:$p)>;
7633*9880d681SAndroid Build Coastguard Workerdef VST3qAsm_8 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr",
7634*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeQ:$list, addrmode6align64:$addr, pred:$p)>;
7635*9880d681SAndroid Build Coastguard Workerdef VST3qAsm_16 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr",
7636*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeQ:$list, addrmode6align64:$addr, pred:$p)>;
7637*9880d681SAndroid Build Coastguard Workerdef VST3qAsm_32 : NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr",
7638*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeQ:$list, addrmode6align64:$addr, pred:$p)>;
7639*9880d681SAndroid Build Coastguard Worker
7640*9880d681SAndroid Build Coastguard Workerdef VST3dWB_fixed_Asm_8 :
7641*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr!",
7642*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeD:$list, addrmode6align64:$addr, pred:$p)>;
7643*9880d681SAndroid Build Coastguard Workerdef VST3dWB_fixed_Asm_16 :
7644*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr!",
7645*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeD:$list, addrmode6align64:$addr, pred:$p)>;
7646*9880d681SAndroid Build Coastguard Workerdef VST3dWB_fixed_Asm_32 :
7647*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr!",
7648*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeD:$list, addrmode6align64:$addr, pred:$p)>;
7649*9880d681SAndroid Build Coastguard Workerdef VST3qWB_fixed_Asm_8 :
7650*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr!",
7651*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeQ:$list, addrmode6align64:$addr, pred:$p)>;
7652*9880d681SAndroid Build Coastguard Workerdef VST3qWB_fixed_Asm_16 :
7653*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr!",
7654*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeQ:$list, addrmode6align64:$addr, pred:$p)>;
7655*9880d681SAndroid Build Coastguard Workerdef VST3qWB_fixed_Asm_32 :
7656*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr!",
7657*9880d681SAndroid Build Coastguard Worker               (ins VecListThreeQ:$list, addrmode6align64:$addr, pred:$p)>;
7658*9880d681SAndroid Build Coastguard Workerdef VST3dWB_register_Asm_8 :
7659*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr, $Rm",
7660*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeD:$list, addrmode6align64:$addr,
7661*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7662*9880d681SAndroid Build Coastguard Workerdef VST3dWB_register_Asm_16 :
7663*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr, $Rm",
7664*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeD:$list, addrmode6align64:$addr,
7665*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7666*9880d681SAndroid Build Coastguard Workerdef VST3dWB_register_Asm_32 :
7667*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr, $Rm",
7668*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeD:$list, addrmode6align64:$addr,
7669*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7670*9880d681SAndroid Build Coastguard Workerdef VST3qWB_register_Asm_8 :
7671*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst3${p}", ".8", "$list, $addr, $Rm",
7672*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeQ:$list, addrmode6align64:$addr,
7673*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7674*9880d681SAndroid Build Coastguard Workerdef VST3qWB_register_Asm_16 :
7675*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst3${p}", ".16", "$list, $addr, $Rm",
7676*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeQ:$list, addrmode6align64:$addr,
7677*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7678*9880d681SAndroid Build Coastguard Workerdef VST3qWB_register_Asm_32 :
7679*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst3${p}", ".32", "$list, $addr, $Rm",
7680*9880d681SAndroid Build Coastguard Worker                  (ins VecListThreeQ:$list, addrmode6align64:$addr,
7681*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7682*9880d681SAndroid Build Coastguard Worker
7683*9880d681SAndroid Build Coastguard Worker// VLD4 all-lanes pseudo-instructions. These need special handling for
7684*9880d681SAndroid Build Coastguard Worker// the lane index that an InstAlias can't handle, so we use these instead.
7685*9880d681SAndroid Build Coastguard Workerdef VLD4DUPdAsm_8 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr",
7686*9880d681SAndroid Build Coastguard Worker               (ins VecListFourDAllLanes:$list, addrmode6dupalign32:$addr,
7687*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7688*9880d681SAndroid Build Coastguard Workerdef VLD4DUPdAsm_16: NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr",
7689*9880d681SAndroid Build Coastguard Worker               (ins VecListFourDAllLanes:$list, addrmode6dupalign64:$addr,
7690*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7691*9880d681SAndroid Build Coastguard Workerdef VLD4DUPdAsm_32: NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr",
7692*9880d681SAndroid Build Coastguard Worker               (ins VecListFourDAllLanes:$list, addrmode6dupalign64or128:$addr,
7693*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7694*9880d681SAndroid Build Coastguard Workerdef VLD4DUPqAsm_8 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr",
7695*9880d681SAndroid Build Coastguard Worker               (ins VecListFourQAllLanes:$list, addrmode6dupalign32:$addr,
7696*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7697*9880d681SAndroid Build Coastguard Workerdef VLD4DUPqAsm_16: NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr",
7698*9880d681SAndroid Build Coastguard Worker               (ins VecListFourQAllLanes:$list, addrmode6dupalign64:$addr,
7699*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7700*9880d681SAndroid Build Coastguard Workerdef VLD4DUPqAsm_32: NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr",
7701*9880d681SAndroid Build Coastguard Worker               (ins VecListFourQAllLanes:$list, addrmode6dupalign64or128:$addr,
7702*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7703*9880d681SAndroid Build Coastguard Worker
7704*9880d681SAndroid Build Coastguard Workerdef VLD4DUPdWB_fixed_Asm_8 :
7705*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr!",
7706*9880d681SAndroid Build Coastguard Worker               (ins VecListFourDAllLanes:$list, addrmode6dupalign32:$addr,
7707*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7708*9880d681SAndroid Build Coastguard Workerdef VLD4DUPdWB_fixed_Asm_16 :
7709*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr!",
7710*9880d681SAndroid Build Coastguard Worker               (ins VecListFourDAllLanes:$list, addrmode6dupalign64:$addr,
7711*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7712*9880d681SAndroid Build Coastguard Workerdef VLD4DUPdWB_fixed_Asm_32 :
7713*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr!",
7714*9880d681SAndroid Build Coastguard Worker               (ins VecListFourDAllLanes:$list, addrmode6dupalign64or128:$addr,
7715*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7716*9880d681SAndroid Build Coastguard Workerdef VLD4DUPqWB_fixed_Asm_8 :
7717*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr!",
7718*9880d681SAndroid Build Coastguard Worker               (ins VecListFourQAllLanes:$list, addrmode6dupalign32:$addr,
7719*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7720*9880d681SAndroid Build Coastguard Workerdef VLD4DUPqWB_fixed_Asm_16 :
7721*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr!",
7722*9880d681SAndroid Build Coastguard Worker               (ins VecListFourQAllLanes:$list, addrmode6dupalign64:$addr,
7723*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7724*9880d681SAndroid Build Coastguard Workerdef VLD4DUPqWB_fixed_Asm_32 :
7725*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr!",
7726*9880d681SAndroid Build Coastguard Worker               (ins VecListFourQAllLanes:$list, addrmode6dupalign64or128:$addr,
7727*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7728*9880d681SAndroid Build Coastguard Workerdef VLD4DUPdWB_register_Asm_8 :
7729*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr, $Rm",
7730*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourDAllLanes:$list, addrmode6dupalign32:$addr,
7731*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7732*9880d681SAndroid Build Coastguard Workerdef VLD4DUPdWB_register_Asm_16 :
7733*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr, $Rm",
7734*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourDAllLanes:$list, addrmode6dupalign64:$addr,
7735*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7736*9880d681SAndroid Build Coastguard Workerdef VLD4DUPdWB_register_Asm_32 :
7737*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr, $Rm",
7738*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourDAllLanes:$list,
7739*9880d681SAndroid Build Coastguard Worker                       addrmode6dupalign64or128:$addr, rGPR:$Rm, pred:$p)>;
7740*9880d681SAndroid Build Coastguard Workerdef VLD4DUPqWB_register_Asm_8 :
7741*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr, $Rm",
7742*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourQAllLanes:$list, addrmode6dupalign32:$addr,
7743*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7744*9880d681SAndroid Build Coastguard Workerdef VLD4DUPqWB_register_Asm_16 :
7745*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr, $Rm",
7746*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourQAllLanes:$list, addrmode6dupalign64:$addr,
7747*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7748*9880d681SAndroid Build Coastguard Workerdef VLD4DUPqWB_register_Asm_32 :
7749*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr, $Rm",
7750*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourQAllLanes:$list,
7751*9880d681SAndroid Build Coastguard Worker                       addrmode6dupalign64or128:$addr, rGPR:$Rm, pred:$p)>;
7752*9880d681SAndroid Build Coastguard Worker
7753*9880d681SAndroid Build Coastguard Worker
7754*9880d681SAndroid Build Coastguard Worker// VLD4 single-lane pseudo-instructions. These need special handling for
7755*9880d681SAndroid Build Coastguard Worker// the lane index that an InstAlias can't handle, so we use these instead.
7756*9880d681SAndroid Build Coastguard Workerdef VLD4LNdAsm_8 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr",
7757*9880d681SAndroid Build Coastguard Worker               (ins VecListFourDByteIndexed:$list, addrmode6align32:$addr,
7758*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7759*9880d681SAndroid Build Coastguard Workerdef VLD4LNdAsm_16 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr",
7760*9880d681SAndroid Build Coastguard Worker               (ins VecListFourDHWordIndexed:$list, addrmode6align64:$addr,
7761*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7762*9880d681SAndroid Build Coastguard Workerdef VLD4LNdAsm_32 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr",
7763*9880d681SAndroid Build Coastguard Worker               (ins VecListFourDWordIndexed:$list, addrmode6align64or128:$addr,
7764*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7765*9880d681SAndroid Build Coastguard Workerdef VLD4LNqAsm_16 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr",
7766*9880d681SAndroid Build Coastguard Worker               (ins VecListFourQHWordIndexed:$list, addrmode6align64:$addr,
7767*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7768*9880d681SAndroid Build Coastguard Workerdef VLD4LNqAsm_32 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr",
7769*9880d681SAndroid Build Coastguard Worker               (ins VecListFourQWordIndexed:$list, addrmode6align64or128:$addr,
7770*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7771*9880d681SAndroid Build Coastguard Worker
7772*9880d681SAndroid Build Coastguard Workerdef VLD4LNdWB_fixed_Asm_8 :
7773*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr!",
7774*9880d681SAndroid Build Coastguard Worker               (ins VecListFourDByteIndexed:$list, addrmode6align32:$addr,
7775*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7776*9880d681SAndroid Build Coastguard Workerdef VLD4LNdWB_fixed_Asm_16 :
7777*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr!",
7778*9880d681SAndroid Build Coastguard Worker               (ins VecListFourDHWordIndexed:$list, addrmode6align64:$addr,
7779*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7780*9880d681SAndroid Build Coastguard Workerdef VLD4LNdWB_fixed_Asm_32 :
7781*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr!",
7782*9880d681SAndroid Build Coastguard Worker               (ins VecListFourDWordIndexed:$list, addrmode6align64or128:$addr,
7783*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7784*9880d681SAndroid Build Coastguard Workerdef VLD4LNqWB_fixed_Asm_16 :
7785*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr!",
7786*9880d681SAndroid Build Coastguard Worker               (ins VecListFourQHWordIndexed:$list, addrmode6align64:$addr,
7787*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7788*9880d681SAndroid Build Coastguard Workerdef VLD4LNqWB_fixed_Asm_32 :
7789*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr!",
7790*9880d681SAndroid Build Coastguard Worker               (ins VecListFourQWordIndexed:$list, addrmode6align64or128:$addr,
7791*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7792*9880d681SAndroid Build Coastguard Workerdef VLD4LNdWB_register_Asm_8 :
7793*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr, $Rm",
7794*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourDByteIndexed:$list, addrmode6align32:$addr,
7795*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7796*9880d681SAndroid Build Coastguard Workerdef VLD4LNdWB_register_Asm_16 :
7797*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr, $Rm",
7798*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourDHWordIndexed:$list, addrmode6align64:$addr,
7799*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7800*9880d681SAndroid Build Coastguard Workerdef VLD4LNdWB_register_Asm_32 :
7801*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr, $Rm",
7802*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourDWordIndexed:$list,
7803*9880d681SAndroid Build Coastguard Worker                       addrmode6align64or128:$addr, rGPR:$Rm, pred:$p)>;
7804*9880d681SAndroid Build Coastguard Workerdef VLD4LNqWB_register_Asm_16 :
7805*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr, $Rm",
7806*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourQHWordIndexed:$list, addrmode6align64:$addr,
7807*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7808*9880d681SAndroid Build Coastguard Workerdef VLD4LNqWB_register_Asm_32 :
7809*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr, $Rm",
7810*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourQWordIndexed:$list,
7811*9880d681SAndroid Build Coastguard Worker                       addrmode6align64or128:$addr, rGPR:$Rm, pred:$p)>;
7812*9880d681SAndroid Build Coastguard Worker
7813*9880d681SAndroid Build Coastguard Worker
7814*9880d681SAndroid Build Coastguard Worker
7815*9880d681SAndroid Build Coastguard Worker// VLD4 multiple structure pseudo-instructions. These need special handling for
7816*9880d681SAndroid Build Coastguard Worker// the vector operands that the normal instructions don't yet model.
7817*9880d681SAndroid Build Coastguard Worker// FIXME: Remove these when the register classes and instructions are updated.
7818*9880d681SAndroid Build Coastguard Workerdef VLD4dAsm_8 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr",
7819*9880d681SAndroid Build Coastguard Worker               (ins VecListFourD:$list, addrmode6align64or128or256:$addr,
7820*9880d681SAndroid Build Coastguard Worker                pred:$p)>;
7821*9880d681SAndroid Build Coastguard Workerdef VLD4dAsm_16 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr",
7822*9880d681SAndroid Build Coastguard Worker               (ins VecListFourD:$list, addrmode6align64or128or256:$addr,
7823*9880d681SAndroid Build Coastguard Worker                pred:$p)>;
7824*9880d681SAndroid Build Coastguard Workerdef VLD4dAsm_32 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr",
7825*9880d681SAndroid Build Coastguard Worker               (ins VecListFourD:$list, addrmode6align64or128or256:$addr,
7826*9880d681SAndroid Build Coastguard Worker                pred:$p)>;
7827*9880d681SAndroid Build Coastguard Workerdef VLD4qAsm_8 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr",
7828*9880d681SAndroid Build Coastguard Worker               (ins VecListFourQ:$list, addrmode6align64or128or256:$addr,
7829*9880d681SAndroid Build Coastguard Worker                pred:$p)>;
7830*9880d681SAndroid Build Coastguard Workerdef VLD4qAsm_16 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr",
7831*9880d681SAndroid Build Coastguard Worker               (ins VecListFourQ:$list, addrmode6align64or128or256:$addr,
7832*9880d681SAndroid Build Coastguard Worker                pred:$p)>;
7833*9880d681SAndroid Build Coastguard Workerdef VLD4qAsm_32 : NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr",
7834*9880d681SAndroid Build Coastguard Worker               (ins VecListFourQ:$list, addrmode6align64or128or256:$addr,
7835*9880d681SAndroid Build Coastguard Worker                pred:$p)>;
7836*9880d681SAndroid Build Coastguard Worker
7837*9880d681SAndroid Build Coastguard Workerdef VLD4dWB_fixed_Asm_8 :
7838*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr!",
7839*9880d681SAndroid Build Coastguard Worker               (ins VecListFourD:$list, addrmode6align64or128or256:$addr,
7840*9880d681SAndroid Build Coastguard Worker                pred:$p)>;
7841*9880d681SAndroid Build Coastguard Workerdef VLD4dWB_fixed_Asm_16 :
7842*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr!",
7843*9880d681SAndroid Build Coastguard Worker               (ins VecListFourD:$list, addrmode6align64or128or256:$addr,
7844*9880d681SAndroid Build Coastguard Worker                pred:$p)>;
7845*9880d681SAndroid Build Coastguard Workerdef VLD4dWB_fixed_Asm_32 :
7846*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr!",
7847*9880d681SAndroid Build Coastguard Worker               (ins VecListFourD:$list, addrmode6align64or128or256:$addr,
7848*9880d681SAndroid Build Coastguard Worker                pred:$p)>;
7849*9880d681SAndroid Build Coastguard Workerdef VLD4qWB_fixed_Asm_8 :
7850*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr!",
7851*9880d681SAndroid Build Coastguard Worker               (ins VecListFourQ:$list, addrmode6align64or128or256:$addr,
7852*9880d681SAndroid Build Coastguard Worker                pred:$p)>;
7853*9880d681SAndroid Build Coastguard Workerdef VLD4qWB_fixed_Asm_16 :
7854*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr!",
7855*9880d681SAndroid Build Coastguard Worker               (ins VecListFourQ:$list, addrmode6align64or128or256:$addr,
7856*9880d681SAndroid Build Coastguard Worker                pred:$p)>;
7857*9880d681SAndroid Build Coastguard Workerdef VLD4qWB_fixed_Asm_32 :
7858*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr!",
7859*9880d681SAndroid Build Coastguard Worker               (ins VecListFourQ:$list, addrmode6align64or128or256:$addr,
7860*9880d681SAndroid Build Coastguard Worker                pred:$p)>;
7861*9880d681SAndroid Build Coastguard Workerdef VLD4dWB_register_Asm_8 :
7862*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr, $Rm",
7863*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourD:$list, addrmode6align64or128or256:$addr,
7864*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7865*9880d681SAndroid Build Coastguard Workerdef VLD4dWB_register_Asm_16 :
7866*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr, $Rm",
7867*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourD:$list, addrmode6align64or128or256:$addr,
7868*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7869*9880d681SAndroid Build Coastguard Workerdef VLD4dWB_register_Asm_32 :
7870*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr, $Rm",
7871*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourD:$list, addrmode6align64or128or256:$addr,
7872*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7873*9880d681SAndroid Build Coastguard Workerdef VLD4qWB_register_Asm_8 :
7874*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".8", "$list, $addr, $Rm",
7875*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourQ:$list, addrmode6align64or128or256:$addr,
7876*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7877*9880d681SAndroid Build Coastguard Workerdef VLD4qWB_register_Asm_16 :
7878*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".16", "$list, $addr, $Rm",
7879*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourQ:$list, addrmode6align64or128or256:$addr,
7880*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7881*9880d681SAndroid Build Coastguard Workerdef VLD4qWB_register_Asm_32 :
7882*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vld4${p}", ".32", "$list, $addr, $Rm",
7883*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourQ:$list, addrmode6align64or128or256:$addr,
7884*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7885*9880d681SAndroid Build Coastguard Worker
7886*9880d681SAndroid Build Coastguard Worker// VST4 single-lane pseudo-instructions. These need special handling for
7887*9880d681SAndroid Build Coastguard Worker// the lane index that an InstAlias can't handle, so we use these instead.
7888*9880d681SAndroid Build Coastguard Workerdef VST4LNdAsm_8 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr",
7889*9880d681SAndroid Build Coastguard Worker               (ins VecListFourDByteIndexed:$list, addrmode6align32:$addr,
7890*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7891*9880d681SAndroid Build Coastguard Workerdef VST4LNdAsm_16 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr",
7892*9880d681SAndroid Build Coastguard Worker               (ins VecListFourDHWordIndexed:$list, addrmode6align64:$addr,
7893*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7894*9880d681SAndroid Build Coastguard Workerdef VST4LNdAsm_32 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr",
7895*9880d681SAndroid Build Coastguard Worker               (ins VecListFourDWordIndexed:$list, addrmode6align64or128:$addr,
7896*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7897*9880d681SAndroid Build Coastguard Workerdef VST4LNqAsm_16 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr",
7898*9880d681SAndroid Build Coastguard Worker               (ins VecListFourQHWordIndexed:$list, addrmode6align64:$addr,
7899*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7900*9880d681SAndroid Build Coastguard Workerdef VST4LNqAsm_32 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr",
7901*9880d681SAndroid Build Coastguard Worker               (ins VecListFourQWordIndexed:$list, addrmode6align64or128:$addr,
7902*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7903*9880d681SAndroid Build Coastguard Worker
7904*9880d681SAndroid Build Coastguard Workerdef VST4LNdWB_fixed_Asm_8 :
7905*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr!",
7906*9880d681SAndroid Build Coastguard Worker               (ins VecListFourDByteIndexed:$list, addrmode6align32:$addr,
7907*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7908*9880d681SAndroid Build Coastguard Workerdef VST4LNdWB_fixed_Asm_16 :
7909*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr!",
7910*9880d681SAndroid Build Coastguard Worker               (ins VecListFourDHWordIndexed:$list, addrmode6align64:$addr,
7911*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7912*9880d681SAndroid Build Coastguard Workerdef VST4LNdWB_fixed_Asm_32 :
7913*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr!",
7914*9880d681SAndroid Build Coastguard Worker               (ins VecListFourDWordIndexed:$list, addrmode6align64or128:$addr,
7915*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7916*9880d681SAndroid Build Coastguard Workerdef VST4LNqWB_fixed_Asm_16 :
7917*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr!",
7918*9880d681SAndroid Build Coastguard Worker               (ins VecListFourQHWordIndexed:$list, addrmode6align64:$addr,
7919*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7920*9880d681SAndroid Build Coastguard Workerdef VST4LNqWB_fixed_Asm_32 :
7921*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr!",
7922*9880d681SAndroid Build Coastguard Worker               (ins VecListFourQWordIndexed:$list, addrmode6align64or128:$addr,
7923*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7924*9880d681SAndroid Build Coastguard Workerdef VST4LNdWB_register_Asm_8 :
7925*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr, $Rm",
7926*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourDByteIndexed:$list, addrmode6align32:$addr,
7927*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7928*9880d681SAndroid Build Coastguard Workerdef VST4LNdWB_register_Asm_16 :
7929*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr, $Rm",
7930*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourDHWordIndexed:$list, addrmode6align64:$addr,
7931*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7932*9880d681SAndroid Build Coastguard Workerdef VST4LNdWB_register_Asm_32 :
7933*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr, $Rm",
7934*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourDWordIndexed:$list,
7935*9880d681SAndroid Build Coastguard Worker                       addrmode6align64or128:$addr, rGPR:$Rm, pred:$p)>;
7936*9880d681SAndroid Build Coastguard Workerdef VST4LNqWB_register_Asm_16 :
7937*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr, $Rm",
7938*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourQHWordIndexed:$list, addrmode6align64:$addr,
7939*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7940*9880d681SAndroid Build Coastguard Workerdef VST4LNqWB_register_Asm_32 :
7941*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr, $Rm",
7942*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourQWordIndexed:$list,
7943*9880d681SAndroid Build Coastguard Worker                       addrmode6align64or128:$addr, rGPR:$Rm, pred:$p)>;
7944*9880d681SAndroid Build Coastguard Worker
7945*9880d681SAndroid Build Coastguard Worker
7946*9880d681SAndroid Build Coastguard Worker// VST4 multiple structure pseudo-instructions. These need special handling for
7947*9880d681SAndroid Build Coastguard Worker// the vector operands that the normal instructions don't yet model.
7948*9880d681SAndroid Build Coastguard Worker// FIXME: Remove these when the register classes and instructions are updated.
7949*9880d681SAndroid Build Coastguard Workerdef VST4dAsm_8 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr",
7950*9880d681SAndroid Build Coastguard Worker               (ins VecListFourD:$list, addrmode6align64or128or256:$addr,
7951*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7952*9880d681SAndroid Build Coastguard Workerdef VST4dAsm_16 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr",
7953*9880d681SAndroid Build Coastguard Worker               (ins VecListFourD:$list, addrmode6align64or128or256:$addr,
7954*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7955*9880d681SAndroid Build Coastguard Workerdef VST4dAsm_32 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr",
7956*9880d681SAndroid Build Coastguard Worker               (ins VecListFourD:$list, addrmode6align64or128or256:$addr,
7957*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7958*9880d681SAndroid Build Coastguard Workerdef VST4qAsm_8 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr",
7959*9880d681SAndroid Build Coastguard Worker               (ins VecListFourQ:$list, addrmode6align64or128or256:$addr,
7960*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7961*9880d681SAndroid Build Coastguard Workerdef VST4qAsm_16 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr",
7962*9880d681SAndroid Build Coastguard Worker               (ins VecListFourQ:$list, addrmode6align64or128or256:$addr,
7963*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7964*9880d681SAndroid Build Coastguard Workerdef VST4qAsm_32 : NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr",
7965*9880d681SAndroid Build Coastguard Worker               (ins VecListFourQ:$list, addrmode6align64or128or256:$addr,
7966*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7967*9880d681SAndroid Build Coastguard Worker
7968*9880d681SAndroid Build Coastguard Workerdef VST4dWB_fixed_Asm_8 :
7969*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr!",
7970*9880d681SAndroid Build Coastguard Worker               (ins VecListFourD:$list, addrmode6align64or128or256:$addr,
7971*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7972*9880d681SAndroid Build Coastguard Workerdef VST4dWB_fixed_Asm_16 :
7973*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr!",
7974*9880d681SAndroid Build Coastguard Worker               (ins VecListFourD:$list, addrmode6align64or128or256:$addr,
7975*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7976*9880d681SAndroid Build Coastguard Workerdef VST4dWB_fixed_Asm_32 :
7977*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr!",
7978*9880d681SAndroid Build Coastguard Worker               (ins VecListFourD:$list, addrmode6align64or128or256:$addr,
7979*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7980*9880d681SAndroid Build Coastguard Workerdef VST4qWB_fixed_Asm_8 :
7981*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr!",
7982*9880d681SAndroid Build Coastguard Worker               (ins VecListFourQ:$list, addrmode6align64or128or256:$addr,
7983*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7984*9880d681SAndroid Build Coastguard Workerdef VST4qWB_fixed_Asm_16 :
7985*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr!",
7986*9880d681SAndroid Build Coastguard Worker               (ins VecListFourQ:$list, addrmode6align64or128or256:$addr,
7987*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7988*9880d681SAndroid Build Coastguard Workerdef VST4qWB_fixed_Asm_32 :
7989*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr!",
7990*9880d681SAndroid Build Coastguard Worker               (ins VecListFourQ:$list, addrmode6align64or128or256:$addr,
7991*9880d681SAndroid Build Coastguard Worker                    pred:$p)>;
7992*9880d681SAndroid Build Coastguard Workerdef VST4dWB_register_Asm_8 :
7993*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr, $Rm",
7994*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourD:$list, addrmode6align64or128or256:$addr,
7995*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
7996*9880d681SAndroid Build Coastguard Workerdef VST4dWB_register_Asm_16 :
7997*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr, $Rm",
7998*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourD:$list, addrmode6align64or128or256:$addr,
7999*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
8000*9880d681SAndroid Build Coastguard Workerdef VST4dWB_register_Asm_32 :
8001*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr, $Rm",
8002*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourD:$list, addrmode6align64or128or256:$addr,
8003*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
8004*9880d681SAndroid Build Coastguard Workerdef VST4qWB_register_Asm_8 :
8005*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst4${p}", ".8", "$list, $addr, $Rm",
8006*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourQ:$list, addrmode6align64or128or256:$addr,
8007*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
8008*9880d681SAndroid Build Coastguard Workerdef VST4qWB_register_Asm_16 :
8009*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst4${p}", ".16", "$list, $addr, $Rm",
8010*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourQ:$list, addrmode6align64or128or256:$addr,
8011*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
8012*9880d681SAndroid Build Coastguard Workerdef VST4qWB_register_Asm_32 :
8013*9880d681SAndroid Build Coastguard Worker        NEONDataTypeAsmPseudoInst<"vst4${p}", ".32", "$list, $addr, $Rm",
8014*9880d681SAndroid Build Coastguard Worker                  (ins VecListFourQ:$list, addrmode6align64or128or256:$addr,
8015*9880d681SAndroid Build Coastguard Worker                       rGPR:$Rm, pred:$p)>;
8016*9880d681SAndroid Build Coastguard Worker
8017*9880d681SAndroid Build Coastguard Worker// VMOV/VMVN takes an optional datatype suffix
8018*9880d681SAndroid Build Coastguard Workerdefm : NEONDTAnyInstAlias<"vmov${p}", "$Vd, $Vm",
8019*9880d681SAndroid Build Coastguard Worker                         (VORRd DPR:$Vd, DPR:$Vm, DPR:$Vm, pred:$p)>;
8020*9880d681SAndroid Build Coastguard Workerdefm : NEONDTAnyInstAlias<"vmov${p}", "$Vd, $Vm",
8021*9880d681SAndroid Build Coastguard Worker                         (VORRq QPR:$Vd, QPR:$Vm, QPR:$Vm, pred:$p)>;
8022*9880d681SAndroid Build Coastguard Worker
8023*9880d681SAndroid Build Coastguard Workerdefm : NEONDTAnyInstAlias<"vmvn${p}", "$Vd, $Vm",
8024*9880d681SAndroid Build Coastguard Worker                         (VMVNd DPR:$Vd, DPR:$Vm, pred:$p)>;
8025*9880d681SAndroid Build Coastguard Workerdefm : NEONDTAnyInstAlias<"vmvn${p}", "$Vd, $Vm",
8026*9880d681SAndroid Build Coastguard Worker                         (VMVNq QPR:$Vd, QPR:$Vm, pred:$p)>;
8027*9880d681SAndroid Build Coastguard Worker
8028*9880d681SAndroid Build Coastguard Worker// VCLT (register) is an assembler alias for VCGT w/ the operands reversed.
8029*9880d681SAndroid Build Coastguard Worker// D-register versions.
8030*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcle${p}.s8 $Dd, $Dn, $Dm",
8031*9880d681SAndroid Build Coastguard Worker                    (VCGEsv8i8 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
8032*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcle${p}.s16 $Dd, $Dn, $Dm",
8033*9880d681SAndroid Build Coastguard Worker                    (VCGEsv4i16 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
8034*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcle${p}.s32 $Dd, $Dn, $Dm",
8035*9880d681SAndroid Build Coastguard Worker                    (VCGEsv2i32 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
8036*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcle${p}.u8 $Dd, $Dn, $Dm",
8037*9880d681SAndroid Build Coastguard Worker                    (VCGEuv8i8 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
8038*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcle${p}.u16 $Dd, $Dn, $Dm",
8039*9880d681SAndroid Build Coastguard Worker                    (VCGEuv4i16 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
8040*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcle${p}.u32 $Dd, $Dn, $Dm",
8041*9880d681SAndroid Build Coastguard Worker                    (VCGEuv2i32 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
8042*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcle${p}.f32 $Dd, $Dn, $Dm",
8043*9880d681SAndroid Build Coastguard Worker                    (VCGEfd DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
8044*9880d681SAndroid Build Coastguard Workerlet Predicates = [HasNEON, HasFullFP16] in
8045*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcle${p}.f16 $Dd, $Dn, $Dm",
8046*9880d681SAndroid Build Coastguard Worker                    (VCGEhd DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
8047*9880d681SAndroid Build Coastguard Worker// Q-register versions.
8048*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcle${p}.s8 $Qd, $Qn, $Qm",
8049*9880d681SAndroid Build Coastguard Worker                    (VCGEsv16i8 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
8050*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcle${p}.s16 $Qd, $Qn, $Qm",
8051*9880d681SAndroid Build Coastguard Worker                    (VCGEsv8i16 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
8052*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcle${p}.s32 $Qd, $Qn, $Qm",
8053*9880d681SAndroid Build Coastguard Worker                    (VCGEsv4i32 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
8054*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcle${p}.u8 $Qd, $Qn, $Qm",
8055*9880d681SAndroid Build Coastguard Worker                    (VCGEuv16i8 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
8056*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcle${p}.u16 $Qd, $Qn, $Qm",
8057*9880d681SAndroid Build Coastguard Worker                    (VCGEuv8i16 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
8058*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcle${p}.u32 $Qd, $Qn, $Qm",
8059*9880d681SAndroid Build Coastguard Worker                    (VCGEuv4i32 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
8060*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcle${p}.f32 $Qd, $Qn, $Qm",
8061*9880d681SAndroid Build Coastguard Worker                    (VCGEfq QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
8062*9880d681SAndroid Build Coastguard Workerlet Predicates = [HasNEON, HasFullFP16] in
8063*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vcle${p}.f16 $Qd, $Qn, $Qm",
8064*9880d681SAndroid Build Coastguard Worker                    (VCGEhq QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
8065*9880d681SAndroid Build Coastguard Worker
8066*9880d681SAndroid Build Coastguard Worker// VCLT (register) is an assembler alias for VCGT w/ the operands reversed.
8067*9880d681SAndroid Build Coastguard Worker// D-register versions.
8068*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vclt${p}.s8 $Dd, $Dn, $Dm",
8069*9880d681SAndroid Build Coastguard Worker                    (VCGTsv8i8 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
8070*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vclt${p}.s16 $Dd, $Dn, $Dm",
8071*9880d681SAndroid Build Coastguard Worker                    (VCGTsv4i16 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
8072*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vclt${p}.s32 $Dd, $Dn, $Dm",
8073*9880d681SAndroid Build Coastguard Worker                    (VCGTsv2i32 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
8074*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vclt${p}.u8 $Dd, $Dn, $Dm",
8075*9880d681SAndroid Build Coastguard Worker                    (VCGTuv8i8 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
8076*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vclt${p}.u16 $Dd, $Dn, $Dm",
8077*9880d681SAndroid Build Coastguard Worker                    (VCGTuv4i16 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
8078*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vclt${p}.u32 $Dd, $Dn, $Dm",
8079*9880d681SAndroid Build Coastguard Worker                    (VCGTuv2i32 DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
8080*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vclt${p}.f32 $Dd, $Dn, $Dm",
8081*9880d681SAndroid Build Coastguard Worker                    (VCGTfd DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
8082*9880d681SAndroid Build Coastguard Workerlet Predicates = [HasNEON, HasFullFP16] in
8083*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vclt${p}.f16 $Dd, $Dn, $Dm",
8084*9880d681SAndroid Build Coastguard Worker                    (VCGThd DPR:$Dd, DPR:$Dm, DPR:$Dn, pred:$p)>;
8085*9880d681SAndroid Build Coastguard Worker// Q-register versions.
8086*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vclt${p}.s8 $Qd, $Qn, $Qm",
8087*9880d681SAndroid Build Coastguard Worker                    (VCGTsv16i8 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
8088*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vclt${p}.s16 $Qd, $Qn, $Qm",
8089*9880d681SAndroid Build Coastguard Worker                    (VCGTsv8i16 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
8090*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vclt${p}.s32 $Qd, $Qn, $Qm",
8091*9880d681SAndroid Build Coastguard Worker                    (VCGTsv4i32 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
8092*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vclt${p}.u8 $Qd, $Qn, $Qm",
8093*9880d681SAndroid Build Coastguard Worker                    (VCGTuv16i8 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
8094*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vclt${p}.u16 $Qd, $Qn, $Qm",
8095*9880d681SAndroid Build Coastguard Worker                    (VCGTuv8i16 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
8096*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vclt${p}.u32 $Qd, $Qn, $Qm",
8097*9880d681SAndroid Build Coastguard Worker                    (VCGTuv4i32 QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
8098*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vclt${p}.f32 $Qd, $Qn, $Qm",
8099*9880d681SAndroid Build Coastguard Worker                    (VCGTfq QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
8100*9880d681SAndroid Build Coastguard Workerlet Predicates = [HasNEON, HasFullFP16] in
8101*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vclt${p}.f16 $Qd, $Qn, $Qm",
8102*9880d681SAndroid Build Coastguard Worker                    (VCGThq QPR:$Qd, QPR:$Qm, QPR:$Qn, pred:$p)>;
8103*9880d681SAndroid Build Coastguard Worker
8104*9880d681SAndroid Build Coastguard Worker// VSWP allows, but does not require, a type suffix.
8105*9880d681SAndroid Build Coastguard Workerdefm : NEONDTAnyInstAlias<"vswp${p}", "$Vd, $Vm",
8106*9880d681SAndroid Build Coastguard Worker                         (VSWPd DPR:$Vd, DPR:$Vm, pred:$p)>;
8107*9880d681SAndroid Build Coastguard Workerdefm : NEONDTAnyInstAlias<"vswp${p}", "$Vd, $Vm",
8108*9880d681SAndroid Build Coastguard Worker                         (VSWPq QPR:$Vd, QPR:$Vm, pred:$p)>;
8109*9880d681SAndroid Build Coastguard Worker
8110*9880d681SAndroid Build Coastguard Worker// VBIF, VBIT, and VBSL allow, but do not require, a type suffix.
8111*9880d681SAndroid Build Coastguard Workerdefm : NEONDTAnyInstAlias<"vbif${p}", "$Vd, $Vn, $Vm",
8112*9880d681SAndroid Build Coastguard Worker                         (VBIFd DPR:$Vd, DPR:$Vn, DPR:$Vm, pred:$p)>;
8113*9880d681SAndroid Build Coastguard Workerdefm : NEONDTAnyInstAlias<"vbit${p}", "$Vd, $Vn, $Vm",
8114*9880d681SAndroid Build Coastguard Worker                         (VBITd DPR:$Vd, DPR:$Vn, DPR:$Vm, pred:$p)>;
8115*9880d681SAndroid Build Coastguard Workerdefm : NEONDTAnyInstAlias<"vbsl${p}", "$Vd, $Vn, $Vm",
8116*9880d681SAndroid Build Coastguard Worker                         (VBSLd DPR:$Vd, DPR:$Vn, DPR:$Vm, pred:$p)>;
8117*9880d681SAndroid Build Coastguard Workerdefm : NEONDTAnyInstAlias<"vbif${p}", "$Vd, $Vn, $Vm",
8118*9880d681SAndroid Build Coastguard Worker                         (VBIFq QPR:$Vd, QPR:$Vn, QPR:$Vm, pred:$p)>;
8119*9880d681SAndroid Build Coastguard Workerdefm : NEONDTAnyInstAlias<"vbit${p}", "$Vd, $Vn, $Vm",
8120*9880d681SAndroid Build Coastguard Worker                         (VBITq QPR:$Vd, QPR:$Vn, QPR:$Vm, pred:$p)>;
8121*9880d681SAndroid Build Coastguard Workerdefm : NEONDTAnyInstAlias<"vbsl${p}", "$Vd, $Vn, $Vm",
8122*9880d681SAndroid Build Coastguard Worker                         (VBSLq QPR:$Vd, QPR:$Vn, QPR:$Vm, pred:$p)>;
8123*9880d681SAndroid Build Coastguard Worker
8124*9880d681SAndroid Build Coastguard Worker// "vmov Rd, #-imm" can be handled via "vmvn".
8125*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vmov${p}.i32 $Vd, $imm",
8126*9880d681SAndroid Build Coastguard Worker                    (VMVNv2i32 DPR:$Vd, nImmVMOVI32Neg:$imm, pred:$p)>;
8127*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vmov${p}.i32 $Vd, $imm",
8128*9880d681SAndroid Build Coastguard Worker                    (VMVNv4i32 QPR:$Vd, nImmVMOVI32Neg:$imm, pred:$p)>;
8129*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vmvn${p}.i32 $Vd, $imm",
8130*9880d681SAndroid Build Coastguard Worker                    (VMOVv2i32 DPR:$Vd, nImmVMOVI32Neg:$imm, pred:$p)>;
8131*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vmvn${p}.i32 $Vd, $imm",
8132*9880d681SAndroid Build Coastguard Worker                    (VMOVv4i32 QPR:$Vd, nImmVMOVI32Neg:$imm, pred:$p)>;
8133*9880d681SAndroid Build Coastguard Worker
8134*9880d681SAndroid Build Coastguard Worker// 'gas' compatibility aliases for quad-word instructions. Strictly speaking,
8135*9880d681SAndroid Build Coastguard Worker// these should restrict to just the Q register variants, but the register
8136*9880d681SAndroid Build Coastguard Worker// classes are enough to match correctly regardless, so we keep it simple
8137*9880d681SAndroid Build Coastguard Worker// and just use MnemonicAlias.
8138*9880d681SAndroid Build Coastguard Workerdef : NEONMnemonicAlias<"vbicq", "vbic">;
8139*9880d681SAndroid Build Coastguard Workerdef : NEONMnemonicAlias<"vandq", "vand">;
8140*9880d681SAndroid Build Coastguard Workerdef : NEONMnemonicAlias<"veorq", "veor">;
8141*9880d681SAndroid Build Coastguard Workerdef : NEONMnemonicAlias<"vorrq", "vorr">;
8142*9880d681SAndroid Build Coastguard Worker
8143*9880d681SAndroid Build Coastguard Workerdef : NEONMnemonicAlias<"vmovq", "vmov">;
8144*9880d681SAndroid Build Coastguard Workerdef : NEONMnemonicAlias<"vmvnq", "vmvn">;
8145*9880d681SAndroid Build Coastguard Worker// Explicit versions for floating point so that the FPImm variants get
8146*9880d681SAndroid Build Coastguard Worker// handled early. The parser gets confused otherwise.
8147*9880d681SAndroid Build Coastguard Workerdef : NEONMnemonicAlias<"vmovq.f32", "vmov.f32">;
8148*9880d681SAndroid Build Coastguard Workerdef : NEONMnemonicAlias<"vmovq.f64", "vmov.f64">;
8149*9880d681SAndroid Build Coastguard Worker
8150*9880d681SAndroid Build Coastguard Workerdef : NEONMnemonicAlias<"vaddq", "vadd">;
8151*9880d681SAndroid Build Coastguard Workerdef : NEONMnemonicAlias<"vsubq", "vsub">;
8152*9880d681SAndroid Build Coastguard Worker
8153*9880d681SAndroid Build Coastguard Workerdef : NEONMnemonicAlias<"vminq", "vmin">;
8154*9880d681SAndroid Build Coastguard Workerdef : NEONMnemonicAlias<"vmaxq", "vmax">;
8155*9880d681SAndroid Build Coastguard Worker
8156*9880d681SAndroid Build Coastguard Workerdef : NEONMnemonicAlias<"vmulq", "vmul">;
8157*9880d681SAndroid Build Coastguard Worker
8158*9880d681SAndroid Build Coastguard Workerdef : NEONMnemonicAlias<"vabsq", "vabs">;
8159*9880d681SAndroid Build Coastguard Worker
8160*9880d681SAndroid Build Coastguard Workerdef : NEONMnemonicAlias<"vshlq", "vshl">;
8161*9880d681SAndroid Build Coastguard Workerdef : NEONMnemonicAlias<"vshrq", "vshr">;
8162*9880d681SAndroid Build Coastguard Worker
8163*9880d681SAndroid Build Coastguard Workerdef : NEONMnemonicAlias<"vcvtq", "vcvt">;
8164*9880d681SAndroid Build Coastguard Worker
8165*9880d681SAndroid Build Coastguard Workerdef : NEONMnemonicAlias<"vcleq", "vcle">;
8166*9880d681SAndroid Build Coastguard Workerdef : NEONMnemonicAlias<"vceqq", "vceq">;
8167*9880d681SAndroid Build Coastguard Worker
8168*9880d681SAndroid Build Coastguard Workerdef : NEONMnemonicAlias<"vzipq", "vzip">;
8169*9880d681SAndroid Build Coastguard Workerdef : NEONMnemonicAlias<"vswpq", "vswp">;
8170*9880d681SAndroid Build Coastguard Worker
8171*9880d681SAndroid Build Coastguard Workerdef : NEONMnemonicAlias<"vrecpeq.f32", "vrecpe.f32">;
8172*9880d681SAndroid Build Coastguard Workerdef : NEONMnemonicAlias<"vrecpeq.u32", "vrecpe.u32">;
8173*9880d681SAndroid Build Coastguard Worker
8174*9880d681SAndroid Build Coastguard Worker
8175*9880d681SAndroid Build Coastguard Worker// Alias for loading floating point immediates that aren't representable
8176*9880d681SAndroid Build Coastguard Worker// using the vmov.f32 encoding but the bitpattern is representable using
8177*9880d681SAndroid Build Coastguard Worker// the .i32 encoding.
8178*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vmov${p}.f32 $Vd, $imm",
8179*9880d681SAndroid Build Coastguard Worker                     (VMOVv4i32 QPR:$Vd, nImmVMOVI32:$imm, pred:$p)>;
8180*9880d681SAndroid Build Coastguard Workerdef : NEONInstAlias<"vmov${p}.f32 $Vd, $imm",
8181*9880d681SAndroid Build Coastguard Worker                     (VMOVv2i32 DPR:$Vd, nImmVMOVI32:$imm, pred:$p)>;
8182