blob: 38834030d2955bd992b3a7ea149cce3c2cab67ac [file] [log] [blame]
Chandler Carruth664e3542013-01-07 01:37:14 +00001//===-- ARMTargetTransformInfo.cpp - ARM specific TTI pass ----------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9/// \file
10/// This file implements a TargetTransformInfo analysis pass specific to the
11/// ARM target machine. It uses the target's detailed information to provide
12/// more precise answers to certain TTI queries, while letting the target
13/// independent and default TTI implementations handle the rest.
14///
15//===----------------------------------------------------------------------===//
16
17#define DEBUG_TYPE "armtti"
18#include "ARM.h"
19#include "ARMTargetMachine.h"
Chandler Carruthd3e73552013-01-07 03:08:10 +000020#include "llvm/Analysis/TargetTransformInfo.h"
Chandler Carruth664e3542013-01-07 01:37:14 +000021#include "llvm/Support/Debug.h"
22#include "llvm/Target/TargetLowering.h"
Renato Golin5e9d55e2013-01-29 23:31:38 +000023#include "llvm/Target/CostTable.h"
Chandler Carruth664e3542013-01-07 01:37:14 +000024using namespace llvm;
25
26// Declare the pass initialization routine locally as target-specific passes
27// don't havve a target-wide initialization entry point, and so we rely on the
28// pass constructor initialization.
29namespace llvm {
30void initializeARMTTIPass(PassRegistry &);
31}
32
33namespace {
34
35class ARMTTI : public ImmutablePass, public TargetTransformInfo {
36 const ARMBaseTargetMachine *TM;
37 const ARMSubtarget *ST;
Renato Golin5e9d55e2013-01-29 23:31:38 +000038 const ARMTargetLowering *TLI;
Chandler Carruth664e3542013-01-07 01:37:14 +000039
40 /// Estimate the overhead of scalarizing an instruction. Insert and Extract
41 /// are set if the result needs to be inserted and/or extracted from vectors.
42 unsigned getScalarizationOverhead(Type *Ty, bool Insert, bool Extract) const;
43
44public:
Renato Golin5e9d55e2013-01-29 23:31:38 +000045 ARMTTI() : ImmutablePass(ID), TM(0), ST(0), TLI(0) {
Chandler Carruth664e3542013-01-07 01:37:14 +000046 llvm_unreachable("This pass cannot be directly constructed");
47 }
48
49 ARMTTI(const ARMBaseTargetMachine *TM)
Renato Golin5e9d55e2013-01-29 23:31:38 +000050 : ImmutablePass(ID), TM(TM), ST(TM->getSubtargetImpl()),
51 TLI(TM->getTargetLowering()) {
Chandler Carruth664e3542013-01-07 01:37:14 +000052 initializeARMTTIPass(*PassRegistry::getPassRegistry());
53 }
54
55 virtual void initializePass() {
56 pushTTIStack(this);
57 }
58
59 virtual void finalizePass() {
60 popTTIStack();
61 }
62
63 virtual void getAnalysisUsage(AnalysisUsage &AU) const {
64 TargetTransformInfo::getAnalysisUsage(AU);
65 }
66
67 /// Pass identification.
68 static char ID;
69
70 /// Provide necessary pointer adjustments for the two base classes.
71 virtual void *getAdjustedAnalysisPointer(const void *ID) {
72 if (ID == &TargetTransformInfo::ID)
73 return (TargetTransformInfo*)this;
74 return this;
75 }
76
77 /// \name Scalar TTI Implementations
78 /// @{
79
80 virtual unsigned getIntImmCost(const APInt &Imm, Type *Ty) const;
81
82 /// @}
Nadav Rotemb696c362013-01-09 01:15:42 +000083
84
85 /// \name Vector TTI Implementations
86 /// @{
87
88 unsigned getNumberOfRegisters(bool Vector) const {
89 if (Vector) {
90 if (ST->hasNEON())
91 return 16;
92 return 0;
93 }
94
95 if (ST->isThumb1Only())
96 return 8;
97 return 16;
98 }
99
Nadav Rotemb1791a72013-01-09 22:29:00 +0000100 unsigned getRegisterBitWidth(bool Vector) const {
101 if (Vector) {
102 if (ST->hasNEON())
103 return 128;
104 return 0;
105 }
106
107 return 32;
108 }
109
Nadav Rotemb696c362013-01-09 01:15:42 +0000110 unsigned getMaximumUnrollFactor() const {
111 // These are out of order CPUs:
112 if (ST->isCortexA15() || ST->isSwift())
113 return 2;
114 return 1;
115 }
116
Arnold Schwaighofer89aef932013-02-12 02:40:39 +0000117 unsigned getShuffleCost(ShuffleKind Kind, Type *Tp,
118 int Index, Type *SubTp) const;
119
Renato Golin5e9d55e2013-01-29 23:31:38 +0000120 unsigned getCastInstrCost(unsigned Opcode, Type *Dst,
121 Type *Src) const;
122
Arnold Schwaighofer213fced2013-02-07 16:10:15 +0000123 unsigned getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy) const;
124
Arnold Schwaighofer98f10122013-02-04 02:52:05 +0000125 unsigned getVectorInstrCost(unsigned Opcode, Type *Val, unsigned Index) const;
Arnold Schwaighofer594fa2d2013-02-08 14:50:48 +0000126
127 unsigned getAddressComputationCost(Type *Val) const;
Nadav Rotemb696c362013-01-09 01:15:42 +0000128 /// @}
Chandler Carruth664e3542013-01-07 01:37:14 +0000129};
130
131} // end anonymous namespace
132
133INITIALIZE_AG_PASS(ARMTTI, TargetTransformInfo, "armtti",
134 "ARM Target Transform Info", true, true, false)
135char ARMTTI::ID = 0;
136
137ImmutablePass *
138llvm::createARMTargetTransformInfoPass(const ARMBaseTargetMachine *TM) {
139 return new ARMTTI(TM);
140}
141
142
143unsigned ARMTTI::getIntImmCost(const APInt &Imm, Type *Ty) const {
144 assert(Ty->isIntegerTy());
145
146 unsigned Bits = Ty->getPrimitiveSizeInBits();
147 if (Bits == 0 || Bits > 32)
148 return 4;
149
150 int32_t SImmVal = Imm.getSExtValue();
151 uint32_t ZImmVal = Imm.getZExtValue();
152 if (!ST->isThumb()) {
153 if ((SImmVal >= 0 && SImmVal < 65536) ||
154 (ARM_AM::getSOImmVal(ZImmVal) != -1) ||
155 (ARM_AM::getSOImmVal(~ZImmVal) != -1))
156 return 1;
157 return ST->hasV6T2Ops() ? 2 : 3;
158 } else if (ST->isThumb2()) {
159 if ((SImmVal >= 0 && SImmVal < 65536) ||
160 (ARM_AM::getT2SOImmVal(ZImmVal) != -1) ||
161 (ARM_AM::getT2SOImmVal(~ZImmVal) != -1))
162 return 1;
163 return ST->hasV6T2Ops() ? 2 : 3;
164 } else /*Thumb1*/ {
165 if (SImmVal >= 0 && SImmVal < 256)
166 return 1;
167 if ((~ZImmVal < 256) || ARM_AM::isThumbImmShiftedVal(ZImmVal))
168 return 2;
169 // Load from constantpool.
170 return 3;
171 }
172 return 2;
173}
Renato Golin5e9d55e2013-01-29 23:31:38 +0000174
175unsigned ARMTTI::getCastInstrCost(unsigned Opcode, Type *Dst,
176 Type *Src) const {
177 int ISD = TLI->InstructionOpcodeToISD(Opcode);
178 assert(ISD && "Invalid opcode");
179
Arnold Schwaighoferf5284ff2013-03-15 15:10:47 +0000180 // Single to/from double precision conversions.
181 static const CostTblEntry<MVT> NEONFltDblTbl[] = {
182 // Vector fptrunc/fpext conversions.
183 { ISD::FP_ROUND, MVT::v2f64, 2 },
184 { ISD::FP_EXTEND, MVT::v2f32, 2 },
185 { ISD::FP_EXTEND, MVT::v4f32, 4 }
186 };
187
188 if (Src->isVectorTy() && ST->hasNEON() && (ISD == ISD::FP_ROUND ||
189 ISD == ISD::FP_EXTEND)) {
190 std::pair<unsigned, MVT> LT = TLI->getTypeLegalizationCost(Src);
191 int Idx = CostTableLookup<MVT>(NEONFltDblTbl, array_lengthof(NEONFltDblTbl),
192 ISD, LT.second);
193 if (Idx != -1)
194 return LT.first * NEONFltDblTbl[Idx].Cost;
195 }
196
Renato Golin5e9d55e2013-01-29 23:31:38 +0000197 EVT SrcTy = TLI->getValueType(Src);
198 EVT DstTy = TLI->getValueType(Dst);
199
200 if (!SrcTy.isSimple() || !DstTy.isSimple())
201 return TargetTransformInfo::getCastInstrCost(Opcode, Dst, Src);
202
203 // Some arithmetic, load and store operations have specific instructions
Arnold Schwaighofera804bbe2013-02-05 14:05:55 +0000204 // to cast up/down their types automatically at no extra cost.
205 // TODO: Get these tables to know at least what the related operations are.
206 static const TypeConversionCostTblEntry<MVT> NEONVectorConversionTbl[] = {
Renato Golin5e9d55e2013-01-29 23:31:38 +0000207 { ISD::SIGN_EXTEND, MVT::v4i32, MVT::v4i16, 0 },
208 { ISD::ZERO_EXTEND, MVT::v4i32, MVT::v4i16, 0 },
209 { ISD::SIGN_EXTEND, MVT::v2i64, MVT::v2i32, 1 },
210 { ISD::ZERO_EXTEND, MVT::v2i64, MVT::v2i32, 1 },
211 { ISD::TRUNCATE, MVT::v4i32, MVT::v4i64, 0 },
212 { ISD::TRUNCATE, MVT::v4i16, MVT::v4i32, 1 },
Arnold Schwaighofera804bbe2013-02-05 14:05:55 +0000213
Arnold Schwaighofer90774f32013-03-12 21:19:22 +0000214 // Operations that we legalize using load/stores to the stack.
215 { ISD::SIGN_EXTEND, MVT::v16i32, MVT::v16i8, 16*2 + 4*4 },
216 { ISD::ZERO_EXTEND, MVT::v16i32, MVT::v16i8, 16*2 + 4*3 },
217 { ISD::SIGN_EXTEND, MVT::v8i32, MVT::v8i8, 8*2 + 2*4 },
218 { ISD::ZERO_EXTEND, MVT::v8i32, MVT::v8i8, 8*2 + 2*3 },
219 { ISD::TRUNCATE, MVT::v16i8, MVT::v16i32, 4*1 + 16*2 + 2*1 },
220 { ISD::TRUNCATE, MVT::v8i8, MVT::v8i32, 2*1 + 8*2 + 1 },
221
Arnold Schwaighofera804bbe2013-02-05 14:05:55 +0000222 // Vector float <-> i32 conversions.
223 { ISD::SINT_TO_FP, MVT::v4f32, MVT::v4i32, 1 },
224 { ISD::UINT_TO_FP, MVT::v4f32, MVT::v4i32, 1 },
225 { ISD::FP_TO_SINT, MVT::v4i32, MVT::v4f32, 1 },
226 { ISD::FP_TO_UINT, MVT::v4i32, MVT::v4f32, 1 },
Arnold Schwaighofer6c9c3a82013-03-18 22:47:06 +0000227 { ISD::FP_TO_SINT, MVT::v4i8, MVT::v4f32, 3 },
228 { ISD::FP_TO_UINT, MVT::v4i8, MVT::v4f32, 3 },
229 { ISD::FP_TO_SINT, MVT::v4i16, MVT::v4f32, 2 },
230 { ISD::FP_TO_UINT, MVT::v4i16, MVT::v4f32, 2 },
Arnold Schwaighofera804bbe2013-02-05 14:05:55 +0000231
232 // Vector double <-> i32 conversions.
233 { ISD::SINT_TO_FP, MVT::v2f64, MVT::v2i32, 2 },
234 { ISD::UINT_TO_FP, MVT::v2f64, MVT::v2i32, 2 },
235 { ISD::FP_TO_SINT, MVT::v2i32, MVT::v2f64, 2 },
Arnold Schwaighofer6c9c3a82013-03-18 22:47:06 +0000236 { ISD::FP_TO_UINT, MVT::v2i32, MVT::v2f64, 2 },
237 { ISD::FP_TO_SINT, MVT::v8i16, MVT::v8f32, 4 },
238 { ISD::FP_TO_UINT, MVT::v8i16, MVT::v8f32, 4 },
239 { ISD::FP_TO_SINT, MVT::v16i16, MVT::v16f32, 8 },
240 { ISD::FP_TO_UINT, MVT::v16i16, MVT::v16f32, 8 }
Renato Golin5e9d55e2013-01-29 23:31:38 +0000241 };
242
Arnold Schwaighofera804bbe2013-02-05 14:05:55 +0000243 if (SrcTy.isVector() && ST->hasNEON()) {
244 int Idx = ConvertCostTableLookup<MVT>(NEONVectorConversionTbl,
245 array_lengthof(NEONVectorConversionTbl),
Renato Golin5e9d55e2013-01-29 23:31:38 +0000246 ISD, DstTy.getSimpleVT(), SrcTy.getSimpleVT());
247 if (Idx != -1)
Arnold Schwaighofera804bbe2013-02-05 14:05:55 +0000248 return NEONVectorConversionTbl[Idx].Cost;
Renato Golin5e9d55e2013-01-29 23:31:38 +0000249 }
250
Arnold Schwaighofera804bbe2013-02-05 14:05:55 +0000251 // Scalar float to integer conversions.
252 static const TypeConversionCostTblEntry<MVT> NEONFloatConversionTbl[] = {
253 { ISD::FP_TO_SINT, MVT::i1, MVT::f32, 2 },
254 { ISD::FP_TO_UINT, MVT::i1, MVT::f32, 2 },
255 { ISD::FP_TO_SINT, MVT::i1, MVT::f64, 2 },
256 { ISD::FP_TO_UINT, MVT::i1, MVT::f64, 2 },
257 { ISD::FP_TO_SINT, MVT::i8, MVT::f32, 2 },
258 { ISD::FP_TO_UINT, MVT::i8, MVT::f32, 2 },
259 { ISD::FP_TO_SINT, MVT::i8, MVT::f64, 2 },
260 { ISD::FP_TO_UINT, MVT::i8, MVT::f64, 2 },
261 { ISD::FP_TO_SINT, MVT::i16, MVT::f32, 2 },
262 { ISD::FP_TO_UINT, MVT::i16, MVT::f32, 2 },
263 { ISD::FP_TO_SINT, MVT::i16, MVT::f64, 2 },
264 { ISD::FP_TO_UINT, MVT::i16, MVT::f64, 2 },
265 { ISD::FP_TO_SINT, MVT::i32, MVT::f32, 2 },
266 { ISD::FP_TO_UINT, MVT::i32, MVT::f32, 2 },
267 { ISD::FP_TO_SINT, MVT::i32, MVT::f64, 2 },
268 { ISD::FP_TO_UINT, MVT::i32, MVT::f64, 2 },
269 { ISD::FP_TO_SINT, MVT::i64, MVT::f32, 10 },
270 { ISD::FP_TO_UINT, MVT::i64, MVT::f32, 10 },
271 { ISD::FP_TO_SINT, MVT::i64, MVT::f64, 10 },
272 { ISD::FP_TO_UINT, MVT::i64, MVT::f64, 10 }
273 };
274 if (SrcTy.isFloatingPoint() && ST->hasNEON()) {
275 int Idx = ConvertCostTableLookup<MVT>(NEONFloatConversionTbl,
276 array_lengthof(NEONFloatConversionTbl),
277 ISD, DstTy.getSimpleVT(),
278 SrcTy.getSimpleVT());
279 if (Idx != -1)
280 return NEONFloatConversionTbl[Idx].Cost;
281 }
282
Arnold Schwaighofera804bbe2013-02-05 14:05:55 +0000283 // Scalar integer to float conversions.
284 static const TypeConversionCostTblEntry<MVT> NEONIntegerConversionTbl[] = {
285 { ISD::SINT_TO_FP, MVT::f32, MVT::i1, 2 },
286 { ISD::UINT_TO_FP, MVT::f32, MVT::i1, 2 },
287 { ISD::SINT_TO_FP, MVT::f64, MVT::i1, 2 },
288 { ISD::UINT_TO_FP, MVT::f64, MVT::i1, 2 },
289 { ISD::SINT_TO_FP, MVT::f32, MVT::i8, 2 },
290 { ISD::UINT_TO_FP, MVT::f32, MVT::i8, 2 },
291 { ISD::SINT_TO_FP, MVT::f64, MVT::i8, 2 },
292 { ISD::UINT_TO_FP, MVT::f64, MVT::i8, 2 },
293 { ISD::SINT_TO_FP, MVT::f32, MVT::i16, 2 },
294 { ISD::UINT_TO_FP, MVT::f32, MVT::i16, 2 },
295 { ISD::SINT_TO_FP, MVT::f64, MVT::i16, 2 },
296 { ISD::UINT_TO_FP, MVT::f64, MVT::i16, 2 },
297 { ISD::SINT_TO_FP, MVT::f32, MVT::i32, 2 },
298 { ISD::UINT_TO_FP, MVT::f32, MVT::i32, 2 },
299 { ISD::SINT_TO_FP, MVT::f64, MVT::i32, 2 },
300 { ISD::UINT_TO_FP, MVT::f64, MVT::i32, 2 },
301 { ISD::SINT_TO_FP, MVT::f32, MVT::i64, 10 },
302 { ISD::UINT_TO_FP, MVT::f32, MVT::i64, 10 },
303 { ISD::SINT_TO_FP, MVT::f64, MVT::i64, 10 },
304 { ISD::UINT_TO_FP, MVT::f64, MVT::i64, 10 }
305 };
306
307 if (SrcTy.isInteger() && ST->hasNEON()) {
308 int Idx = ConvertCostTableLookup<MVT>(NEONIntegerConversionTbl,
309 array_lengthof(NEONIntegerConversionTbl),
310 ISD, DstTy.getSimpleVT(),
311 SrcTy.getSimpleVT());
312 if (Idx != -1)
313 return NEONIntegerConversionTbl[Idx].Cost;
314 }
315
316 // Scalar integer conversion costs.
317 static const TypeConversionCostTblEntry<MVT> ARMIntegerConversionTbl[] = {
318 // i16 -> i64 requires two dependent operations.
319 { ISD::SIGN_EXTEND, MVT::i64, MVT::i16, 2 },
320
321 // Truncates on i64 are assumed to be free.
322 { ISD::TRUNCATE, MVT::i32, MVT::i64, 0 },
323 { ISD::TRUNCATE, MVT::i16, MVT::i64, 0 },
324 { ISD::TRUNCATE, MVT::i8, MVT::i64, 0 },
325 { ISD::TRUNCATE, MVT::i1, MVT::i64, 0 }
326 };
327
328 if (SrcTy.isInteger()) {
329 int Idx =
330 ConvertCostTableLookup<MVT>(ARMIntegerConversionTbl,
331 array_lengthof(ARMIntegerConversionTbl),
332 ISD, DstTy.getSimpleVT(),
333 SrcTy.getSimpleVT());
334 if (Idx != -1)
335 return ARMIntegerConversionTbl[Idx].Cost;
336 }
337
Renato Golin5e9d55e2013-01-29 23:31:38 +0000338 return TargetTransformInfo::getCastInstrCost(Opcode, Dst, Src);
339}
Arnold Schwaighofer98f10122013-02-04 02:52:05 +0000340
341unsigned ARMTTI::getVectorInstrCost(unsigned Opcode, Type *ValTy,
342 unsigned Index) const {
Arnold Schwaighofer594fa2d2013-02-08 14:50:48 +0000343 // Penalize inserting into an D-subregister. We end up with a three times
344 // lower estimated throughput on swift.
Arnold Schwaighofer98f10122013-02-04 02:52:05 +0000345 if (ST->isSwift() &&
346 Opcode == Instruction::InsertElement &&
347 ValTy->isVectorTy() &&
348 ValTy->getScalarSizeInBits() <= 32)
Arnold Schwaighofer594fa2d2013-02-08 14:50:48 +0000349 return 3;
Arnold Schwaighofer98f10122013-02-04 02:52:05 +0000350
351 return TargetTransformInfo::getVectorInstrCost(Opcode, ValTy, Index);
352}
Arnold Schwaighofer213fced2013-02-07 16:10:15 +0000353
354unsigned ARMTTI::getCmpSelInstrCost(unsigned Opcode, Type *ValTy,
355 Type *CondTy) const {
356
357 int ISD = TLI->InstructionOpcodeToISD(Opcode);
358 // On NEON a a vector select gets lowered to vbsl.
359 if (ST->hasNEON() && ValTy->isVectorTy() && ISD == ISD::SELECT) {
Arnold Schwaighofer8070b382013-03-14 19:17:02 +0000360 // Lowering of some vector selects is currently far from perfect.
361 static const TypeConversionCostTblEntry<MVT> NEONVectorSelectTbl[] = {
Arnold Schwaighofer8070b382013-03-14 19:17:02 +0000362 { ISD::SELECT, MVT::v16i1, MVT::v16i16, 2*16 + 1 + 3*1 + 4*1 },
363 { ISD::SELECT, MVT::v8i1, MVT::v8i32, 4*8 + 1*3 + 1*4 + 1*2 },
364 { ISD::SELECT, MVT::v16i1, MVT::v16i32, 4*16 + 1*6 + 1*8 + 1*4 },
365 { ISD::SELECT, MVT::v4i1, MVT::v4i64, 4*4 + 1*2 + 1 },
366 { ISD::SELECT, MVT::v8i1, MVT::v8i64, 50 },
367 { ISD::SELECT, MVT::v16i1, MVT::v16i64, 100 }
368 };
369
370 EVT SelCondTy = TLI->getValueType(CondTy);
371 EVT SelValTy = TLI->getValueType(ValTy);
372 int Idx = ConvertCostTableLookup<MVT>(NEONVectorSelectTbl,
373 array_lengthof(NEONVectorSelectTbl),
374 ISD, SelCondTy.getSimpleVT(),
375 SelValTy.getSimpleVT());
376 if (Idx != -1)
377 return NEONVectorSelectTbl[Idx].Cost;
378
Arnold Schwaighofer213fced2013-02-07 16:10:15 +0000379 std::pair<unsigned, MVT> LT = TLI->getTypeLegalizationCost(ValTy);
380 return LT.first;
381 }
382
383 return TargetTransformInfo::getCmpSelInstrCost(Opcode, ValTy, CondTy);
384}
Arnold Schwaighofer594fa2d2013-02-08 14:50:48 +0000385
386unsigned ARMTTI::getAddressComputationCost(Type *Ty) const {
387 // In many cases the address computation is not merged into the instruction
388 // addressing mode.
389 return 1;
390}
Arnold Schwaighofer89aef932013-02-12 02:40:39 +0000391
392unsigned ARMTTI::getShuffleCost(ShuffleKind Kind, Type *Tp, int Index,
393 Type *SubTp) const {
394 // We only handle costs of reverse shuffles for now.
395 if (Kind != SK_Reverse)
396 return TargetTransformInfo::getShuffleCost(Kind, Tp, Index, SubTp);
397
398 static const CostTblEntry<MVT> NEONShuffleTbl[] = {
399 // Reverse shuffle cost one instruction if we are shuffling within a double
400 // word (vrev) or two if we shuffle a quad word (vrev, vext).
401 { ISD::VECTOR_SHUFFLE, MVT::v2i32, 1 },
402 { ISD::VECTOR_SHUFFLE, MVT::v2f32, 1 },
403 { ISD::VECTOR_SHUFFLE, MVT::v2i64, 1 },
404 { ISD::VECTOR_SHUFFLE, MVT::v2f64, 1 },
405
406 { ISD::VECTOR_SHUFFLE, MVT::v4i32, 2 },
407 { ISD::VECTOR_SHUFFLE, MVT::v4f32, 2 },
408 { ISD::VECTOR_SHUFFLE, MVT::v8i16, 2 },
409 { ISD::VECTOR_SHUFFLE, MVT::v16i8, 2 }
410 };
411
412 std::pair<unsigned, MVT> LT = TLI->getTypeLegalizationCost(Tp);
413
414 int Idx = CostTableLookup<MVT>(NEONShuffleTbl, array_lengthof(NEONShuffleTbl),
415 ISD::VECTOR_SHUFFLE, LT.second);
416 if (Idx == -1)
417 return TargetTransformInfo::getShuffleCost(Kind, Tp, Index, SubTp);
418
419 return LT.first * NEONShuffleTbl[Idx].Cost;
420}