Home
last modified time | relevance | path

Searched refs:SVI (Results 1 – 25 of 37) sorted by relevance

12

/external/swiftshader/third_party/LLVM/lib/Transforms/InstCombine/
DInstCombineVectorOps.cpp58 static std::vector<int> getShuffleMask(const ShuffleVectorInst *SVI) { in getShuffleMask() argument
59 unsigned NElts = SVI->getType()->getNumElements(); in getShuffleMask()
60 if (isa<ConstantAggregateZero>(SVI->getOperand(2))) in getShuffleMask()
62 if (isa<UndefValue>(SVI->getOperand(2))) in getShuffleMask()
66 const ConstantVector *CP = cast<ConstantVector>(SVI->getOperand(2)); in getShuffleMask()
108 if (ShuffleVectorInst *SVI = dyn_cast<ShuffleVectorInst>(V)) { in FindScalarElement() local
110 cast<VectorType>(SVI->getOperand(0)->getType())->getNumElements(); in FindScalarElement()
111 int InEl = getShuffleMask(SVI)[EltNo]; in FindScalarElement()
115 return FindScalarElement(SVI->getOperand(0), InEl); in FindScalarElement()
116 return FindScalarElement(SVI->getOperand(1), InEl - LHSWidth); in FindScalarElement()
[all …]
DInstCombineCasts.cpp1741 if (ShuffleVectorInst *SVI = dyn_cast<ShuffleVectorInst>(Src)) { in visitBitCast() local
1744 if (SVI->hasOneUse() && DestTy->isVectorTy() && in visitBitCast()
1746 SVI->getType()->getNumElements() && in visitBitCast()
1747 SVI->getType()->getNumElements() == in visitBitCast()
1748 cast<VectorType>(SVI->getOperand(0)->getType())->getNumElements()) { in visitBitCast()
1753 if (((Tmp = dyn_cast<BitCastInst>(SVI->getOperand(0))) && in visitBitCast()
1755 ((Tmp = dyn_cast<BitCastInst>(SVI->getOperand(1))) && in visitBitCast()
1757 Value *LHS = Builder->CreateBitCast(SVI->getOperand(0), DestTy); in visitBitCast()
1758 Value *RHS = Builder->CreateBitCast(SVI->getOperand(1), DestTy); in visitBitCast()
1761 return new ShuffleVectorInst(LHS, RHS, SVI->getOperand(2)); in visitBitCast()
DInstCombine.h194 Instruction *visitShuffleVectorInst(ShuffleVectorInst &SVI);
/external/swiftshader/third_party/LLVM/lib/CodeGen/
DInlineSpiller.cpp316 const InlineSpiller::SibValueInfo &SVI) { in operator <<() argument
317 OS << "spill " << PrintReg(SVI.SpillReg) << ':' in operator <<()
318 << SVI.SpillVNI->id << '@' << SVI.SpillVNI->def; in operator <<()
319 if (SVI.SpillMBB) in operator <<()
320 OS << " in BB#" << SVI.SpillMBB->getNumber(); in operator <<()
321 if (SVI.AllDefsAreReloads) in operator <<()
323 if (SVI.DefByOrigPHI) in operator <<()
325 if (SVI.KillsSource) in operator <<()
328 for (unsigned i = 0, e = SVI.Deps.size(); i != e; ++i) in operator <<()
329 OS << ' ' << SVI.Deps[i]->id << '@' << SVI.Deps[i]->def; in operator <<()
[all …]
/external/llvm/lib/CodeGen/
DInterleavedAccessPass.cpp214 ShuffleVectorInst *SVI = dyn_cast<ShuffleVectorInst>(*UI); in lowerInterleavedLoad() local
215 if (!SVI || !isa<UndefValue>(SVI->getOperand(1))) in lowerInterleavedLoad()
218 Shuffles.push_back(SVI); in lowerInterleavedLoad()
260 for (auto SVI : Shuffles) in lowerInterleavedLoad() local
261 DeadInsts.push_back(SVI); in lowerInterleavedLoad()
339 ShuffleVectorInst *SVI = dyn_cast<ShuffleVectorInst>(SI->getValueOperand()); in lowerInterleavedStore() local
340 if (!SVI || !SVI->hasOneUse()) in lowerInterleavedStore()
345 if (!isReInterleaveMask(SVI->getShuffleMask(), Factor)) in lowerInterleavedStore()
351 if (!TLI->lowerInterleavedStore(SI, SVI, Factor)) in lowerInterleavedStore()
356 DeadInsts.push_back(SVI); in lowerInterleavedStore()
DCodeGenPrepare.cpp4705 static bool isBroadcastShuffle(ShuffleVectorInst *SVI) { in isBroadcastShuffle() argument
4706 SmallVector<int, 16> Mask(SVI->getShuffleMask()); in isBroadcastShuffle()
4721 bool CodeGenPrepare::optimizeShuffleVectorInst(ShuffleVectorInst *SVI) { in optimizeShuffleVectorInst() argument
4722 BasicBlock *DefBB = SVI->getParent(); in optimizeShuffleVectorInst()
4725 if (!TLI || !TLI->isVectorShiftByScalarCheap(SVI->getType())) in optimizeShuffleVectorInst()
4730 if (!isBroadcastShuffle(SVI)) in optimizeShuffleVectorInst()
4737 for (User *U : SVI->users()) { in optimizeShuffleVectorInst()
4755 new ShuffleVectorInst(SVI->getOperand(0), SVI->getOperand(1), in optimizeShuffleVectorInst()
4756 SVI->getOperand(2), "", &*InsertPt); in optimizeShuffleVectorInst()
4759 UI->replaceUsesOfWith(SVI, InsertedShuffle); in optimizeShuffleVectorInst()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/CodeGen/
DInterleavedAccessPass.cpp294 ShuffleVectorInst *SVI = dyn_cast<ShuffleVectorInst>(*UI); in lowerInterleavedLoad() local
295 if (!SVI || !isa<UndefValue>(SVI->getOperand(1))) in lowerInterleavedLoad()
298 Shuffles.push_back(SVI); in lowerInterleavedLoad()
341 for (auto SVI : Shuffles) in lowerInterleavedLoad() local
342 DeadInsts.push_back(SVI); in lowerInterleavedLoad()
417 ShuffleVectorInst *SVI = dyn_cast<ShuffleVectorInst>(SI->getValueOperand()); in lowerInterleavedStore() local
418 if (!SVI || !SVI->hasOneUse()) in lowerInterleavedStore()
423 unsigned OpNumElts = SVI->getOperand(0)->getType()->getVectorNumElements(); in lowerInterleavedStore()
424 if (!isReInterleaveMask(SVI->getShuffleMask(), Factor, MaxFactor, OpNumElts)) in lowerInterleavedStore()
430 if (!TLI->lowerInterleavedStore(SI, SVI, Factor)) in lowerInterleavedStore()
[all …]
DCodeGenPrepare.cpp341 bool optimizeShuffleVectorInst(ShuffleVectorInst *SVI);
5745 static bool isBroadcastShuffle(ShuffleVectorInst *SVI) { in isBroadcastShuffle() argument
5746 SmallVector<int, 16> Mask(SVI->getShuffleMask()); in isBroadcastShuffle()
5761 bool CodeGenPrepare::optimizeShuffleVectorInst(ShuffleVectorInst *SVI) { in optimizeShuffleVectorInst() argument
5762 BasicBlock *DefBB = SVI->getParent(); in optimizeShuffleVectorInst()
5765 if (!TLI || !TLI->isVectorShiftByScalarCheap(SVI->getType())) in optimizeShuffleVectorInst()
5770 if (!isBroadcastShuffle(SVI)) in optimizeShuffleVectorInst()
5777 for (User *U : SVI->users()) { in optimizeShuffleVectorInst()
5795 new ShuffleVectorInst(SVI->getOperand(0), SVI->getOperand(1), in optimizeShuffleVectorInst()
5796 SVI->getOperand(2), "", &*InsertPt); in optimizeShuffleVectorInst()
[all …]
/external/llvm/lib/Transforms/InstCombine/
DInstCombineVectorOps.cpp225 } else if (ShuffleVectorInst *SVI = dyn_cast<ShuffleVectorInst>(I)) { in visitExtractElementInst() local
229 int SrcIdx = SVI->getMaskValue(Elt->getZExtValue()); in visitExtractElementInst()
232 SVI->getOperand(0)->getType()->getVectorNumElements(); in visitExtractElementInst()
237 Src = SVI->getOperand(0); in visitExtractElementInst()
240 Src = SVI->getOperand(1); in visitExtractElementInst()
904 static bool isShuffleExtractingFromLHS(ShuffleVectorInst &SVI, in isShuffleExtractingFromLHS() argument
907 cast<VectorType>(SVI.getOperand(0)->getType())->getNumElements(); in isShuffleExtractingFromLHS()
919 Instruction *InstCombiner::visitShuffleVectorInst(ShuffleVectorInst &SVI) { in visitShuffleVectorInst() argument
920 Value *LHS = SVI.getOperand(0); in visitShuffleVectorInst()
921 Value *RHS = SVI.getOperand(1); in visitShuffleVectorInst()
[all …]
DInstCombineCasts.cpp1891 if (ShuffleVectorInst *SVI = dyn_cast<ShuffleVectorInst>(Src)) { in visitBitCast() local
1894 if (SVI->hasOneUse() && DestTy->isVectorTy() && in visitBitCast()
1895 DestTy->getVectorNumElements() == SVI->getType()->getNumElements() && in visitBitCast()
1896 SVI->getType()->getNumElements() == in visitBitCast()
1897 SVI->getOperand(0)->getType()->getVectorNumElements()) { in visitBitCast()
1902 if (((Tmp = dyn_cast<BitCastInst>(SVI->getOperand(0))) && in visitBitCast()
1904 ((Tmp = dyn_cast<BitCastInst>(SVI->getOperand(1))) && in visitBitCast()
1906 Value *LHS = Builder->CreateBitCast(SVI->getOperand(0), DestTy); in visitBitCast()
1907 Value *RHS = Builder->CreateBitCast(SVI->getOperand(1), DestTy); in visitBitCast()
1910 return new ShuffleVectorInst(LHS, RHS, SVI->getOperand(2)); in visitBitCast()
DInstCombineInternal.h330 Instruction *visitShuffleVectorInst(ShuffleVectorInst &SVI);
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/InstCombine/
DInstCombineVectorOps.cpp251 } else if (ShuffleVectorInst *SVI = dyn_cast<ShuffleVectorInst>(I)) { in visitExtractElementInst() local
255 int SrcIdx = SVI->getMaskValue(Elt->getZExtValue()); in visitExtractElementInst()
258 SVI->getOperand(0)->getType()->getVectorNumElements(); in visitExtractElementInst()
263 Src = SVI->getOperand(0); in visitExtractElementInst()
266 Src = SVI->getOperand(1); in visitExtractElementInst()
1129 static bool isShuffleExtractingFromLHS(ShuffleVectorInst &SVI, in isShuffleExtractingFromLHS() argument
1131 unsigned LHSElems = SVI.getOperand(0)->getType()->getVectorNumElements(); in isShuffleExtractingFromLHS()
1353 Instruction *InstCombiner::visitShuffleVectorInst(ShuffleVectorInst &SVI) { in visitShuffleVectorInst() argument
1354 Value *LHS = SVI.getOperand(0); in visitShuffleVectorInst()
1355 Value *RHS = SVI.getOperand(1); in visitShuffleVectorInst()
[all …]
DInstCombineCasts.cpp2334 if (ShuffleVectorInst *SVI = dyn_cast<ShuffleVectorInst>(Src)) { in visitBitCast() local
2337 if (SVI->hasOneUse() && DestTy->isVectorTy() && in visitBitCast()
2338 DestTy->getVectorNumElements() == SVI->getType()->getNumElements() && in visitBitCast()
2339 SVI->getType()->getNumElements() == in visitBitCast()
2340 SVI->getOperand(0)->getType()->getVectorNumElements()) { in visitBitCast()
2345 if (((Tmp = dyn_cast<BitCastInst>(SVI->getOperand(0))) && in visitBitCast()
2347 ((Tmp = dyn_cast<BitCastInst>(SVI->getOperand(1))) && in visitBitCast()
2349 Value *LHS = Builder.CreateBitCast(SVI->getOperand(0), DestTy); in visitBitCast()
2350 Value *RHS = Builder.CreateBitCast(SVI->getOperand(1), DestTy); in visitBitCast()
2353 return new ShuffleVectorInst(LHS, RHS, SVI->getOperand(2)); in visitBitCast()
DInstCombineInternal.h406 Instruction *visitShuffleVectorInst(ShuffleVectorInst &SVI);
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Scalar/
DScalarizer.cpp176 bool visitShuffleVectorInst(ShuffleVectorInst &SVI);
663 bool Scalarizer::visitShuffleVectorInst(ShuffleVectorInst &SVI) { in visitShuffleVectorInst() argument
664 VectorType *VT = dyn_cast<VectorType>(SVI.getType()); in visitShuffleVectorInst()
669 Scatterer Op0 = scatter(&SVI, SVI.getOperand(0)); in visitShuffleVectorInst()
670 Scatterer Op1 = scatter(&SVI, SVI.getOperand(1)); in visitShuffleVectorInst()
675 int Selector = SVI.getMaskValue(I); in visitShuffleVectorInst()
683 gather(&SVI, Res); in visitShuffleVectorInst()
/external/llvm/lib/Transforms/Scalar/
DScalarizer.cpp545 bool Scalarizer::visitShuffleVectorInst(ShuffleVectorInst &SVI) { in visitShuffleVectorInst() argument
546 VectorType *VT = dyn_cast<VectorType>(SVI.getType()); in visitShuffleVectorInst()
551 Scatterer Op0 = scatter(&SVI, SVI.getOperand(0)); in visitShuffleVectorInst()
552 Scatterer Op1 = scatter(&SVI, SVI.getOperand(1)); in visitShuffleVectorInst()
557 int Selector = SVI.getMaskValue(I); in visitShuffleVectorInst()
565 gather(&SVI, Res); in visitShuffleVectorInst()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/X86/
DX86InterleavedAccess.cpp181 if (auto *SVI = dyn_cast<ShuffleVectorInst>(VecInst)) { in decompose() local
182 Value *Op0 = SVI->getOperand(0); in decompose()
183 Value *Op1 = SVI->getOperand(1); in decompose()
821 ShuffleVectorInst *SVI, in lowerInterleavedStore() argument
826 assert(SVI->getType()->getVectorNumElements() % Factor == 0 && in lowerInterleavedStore()
832 auto Mask = SVI->getShuffleMask(); in lowerInterleavedStore()
836 ArrayRef<ShuffleVectorInst *> Shuffles = makeArrayRef(SVI); in lowerInterleavedStore()
/external/llvm/lib/Analysis/
DVectorUtils.cpp260 if (ShuffleVectorInst *SVI = dyn_cast<ShuffleVectorInst>(V)) { in findScalarElement() local
261 unsigned LHSWidth = SVI->getOperand(0)->getType()->getVectorNumElements(); in findScalarElement()
262 int InEl = SVI->getMaskValue(EltNo); in findScalarElement()
266 return findScalarElement(SVI->getOperand(0), InEl); in findScalarElement()
267 return findScalarElement(SVI->getOperand(1), InEl - LHSWidth); in findScalarElement()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Analysis/
DVectorUtils.cpp262 if (ShuffleVectorInst *SVI = dyn_cast<ShuffleVectorInst>(V)) { in findScalarElement() local
263 unsigned LHSWidth = SVI->getOperand(0)->getType()->getVectorNumElements(); in findScalarElement()
264 int InEl = SVI->getMaskValue(EltNo); in findScalarElement()
268 return findScalarElement(SVI->getOperand(0), InEl); in findScalarElement()
269 return findScalarElement(SVI->getOperand(1), InEl - LHSWidth); in findScalarElement()
/external/swiftshader/third_party/LLVM/lib/Target/CBackend/
DCBackend.cpp318 void visitShuffleVectorInst(ShuffleVectorInst &SVI);
3524 void CWriter::visitShuffleVectorInst(ShuffleVectorInst &SVI) { in visitShuffleVectorInst() argument
3526 printType(Out, SVI.getType()); in visitShuffleVectorInst()
3528 VectorType *VT = SVI.getType(); in visitShuffleVectorInst()
3534 int SrcVal = SVI.getMaskValue(i); in visitShuffleVectorInst()
3538 Value *Op = SVI.getOperand((unsigned)SrcVal >= NumElts); in visitShuffleVectorInst()
/external/llvm/lib/Target/AArch64/
DAArch64ISelLowering.h308 bool lowerInterleavedStore(StoreInst *SI, ShuffleVectorInst *SVI,
/external/llvm/lib/Target/ARM/
DARMISelLowering.h458 bool lowerInterleavedStore(StoreInst *SI, ShuffleVectorInst *SVI,
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/AArch64/
DAArch64ISelLowering.h332 bool lowerInterleavedStore(StoreInst *SI, ShuffleVectorInst *SVI,
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/ARM/
DARMISelLowering.h529 bool lowerInterleavedStore(StoreInst *SI, ShuffleVectorInst *SVI,
/external/clang/lib/CodeGen/
DCGExprScalar.cpp1149 static llvm::Constant *getMaskElt(llvm::ShuffleVectorInst *SVI, unsigned Idx, in getMaskElt() argument
1151 int MV = SVI->getMaskValue(Idx); in getMaskElt()
1258 llvm::ShuffleVectorInst *SVI = cast<llvm::ShuffleVectorInst>(Init); in VisitInitListExpr() local
1259 Value *SVOp = SVI->getOperand(0); in VisitInitListExpr()
1274 Args.push_back(getMaskElt(SVI, j, Offset, CGF.Int32Ty)); in VisitInitListExpr()

12