• Home
  • Raw
  • Download

Lines Matching refs:Mask

298                                          SmallVectorImpl<Constant*> &Mask) {  in collectSingleShuffleElements()  argument
304 Mask.assign(NumElts, UndefValue::get(Type::getInt32Ty(V->getContext()))); in collectSingleShuffleElements()
310 Mask.push_back(ConstantInt::get(Type::getInt32Ty(V->getContext()), i)); in collectSingleShuffleElements()
316 Mask.push_back(ConstantInt::get(Type::getInt32Ty(V->getContext()), in collectSingleShuffleElements()
334 if (collectSingleShuffleElements(VecOp, LHS, RHS, Mask)) { in collectSingleShuffleElements()
336 Mask[InsertedIdx] = UndefValue::get(Type::getInt32Ty(V->getContext())); in collectSingleShuffleElements()
349 if (collectSingleShuffleElements(VecOp, LHS, RHS, Mask)) { in collectSingleShuffleElements()
352 Mask[InsertedIdx % NumElts] = in collectSingleShuffleElements()
357 Mask[InsertedIdx % NumElts] = in collectSingleShuffleElements()
451 SmallVectorImpl<Constant *> &Mask, in collectShuffleElements() argument
458 Mask.assign(NumElts, UndefValue::get(Type::getInt32Ty(V->getContext()))); in collectShuffleElements()
464 Mask.assign(NumElts, ConstantInt::get(Type::getInt32Ty(V->getContext()),0)); in collectShuffleElements()
484 ShuffleOps LR = collectShuffleElements(VecOp, Mask, RHS, IC); in collectShuffleElements()
495 Mask[i] = ConstantInt::get(Type::getInt32Ty(V->getContext()), i); in collectShuffleElements()
500 Mask[InsertedIdx % NumElts] = in collectShuffleElements()
512 Mask.push_back(ConstantInt::get( in collectShuffleElements()
522 Mask)) in collectShuffleElements()
530 Mask.push_back(ConstantInt::get(Type::getInt32Ty(V->getContext()), i)); in collectShuffleElements()
603 SmallVector<Constant*, 16> Mask; in visitInsertElementInst() local
604 ShuffleOps LR = collectShuffleElements(&IE, Mask, nullptr, *this); in visitInsertElementInst()
613 ConstantVector::get(Mask)); in visitInsertElementInst()
633 static bool CanEvaluateShuffled(Value *V, ArrayRef<int> Mask, in CanEvaluateShuffled() argument
681 if (!CanEvaluateShuffled(Operand, Mask, Depth-1)) in CanEvaluateShuffled()
694 for (int i = 0, e = Mask.size(); i != e; ++i) { in CanEvaluateShuffled()
695 if (Mask[i] == ElementNumber) { in CanEvaluateShuffled()
701 return CanEvaluateShuffled(I->getOperand(0), Mask, Depth-1); in CanEvaluateShuffled()
786 InstCombiner::EvaluateInDifferentElementOrder(Value *V, ArrayRef<int> Mask) { in EvaluateInDifferentElementOrder() argument
792 Mask.size())); in EvaluateInDifferentElementOrder()
797 Mask.size())); in EvaluateInDifferentElementOrder()
801 for (int i = 0, e = Mask.size(); i != e; ++i) { in EvaluateInDifferentElementOrder()
802 if (Mask[i] == -1) in EvaluateInDifferentElementOrder()
805 MaskValues.push_back(Builder->getInt32(Mask[i])); in EvaluateInDifferentElementOrder()
845 bool NeedsRebuild = (Mask.size() != I->getType()->getVectorNumElements()); in EvaluateInDifferentElementOrder()
847 Value *V = EvaluateInDifferentElementOrder(I->getOperand(i), Mask); in EvaluateInDifferentElementOrder()
864 for (int e = Mask.size(); Index != e; ++Index) { in EvaluateInDifferentElementOrder()
865 if (Mask[Index] == Element) { in EvaluateInDifferentElementOrder()
874 return EvaluateInDifferentElementOrder(I->getOperand(0), Mask); in EvaluateInDifferentElementOrder()
876 Value *V = EvaluateInDifferentElementOrder(I->getOperand(0), Mask); in EvaluateInDifferentElementOrder()
884 static void recognizeIdentityMask(const SmallVectorImpl<int> &Mask, in recognizeIdentityMask() argument
888 for (unsigned i = 0, e = Mask.size(); i != e; ++i) { in recognizeIdentityMask()
889 if (Mask[i] < 0) continue; // Ignore undef values. in recognizeIdentityMask()
891 isLHSID &= (Mask[i] == (int)i); in recognizeIdentityMask()
894 isRHSID &= (Mask[i]-e == i); in recognizeIdentityMask()
905 SmallVector<int, 16> &Mask) { in isShuffleExtractingFromLHS() argument
908 unsigned MaskElems = Mask.size(); in isShuffleExtractingFromLHS()
909 unsigned BegIdx = Mask.front(); in isShuffleExtractingFromLHS()
910 unsigned EndIdx = Mask.back(); in isShuffleExtractingFromLHS()
914 if (static_cast<unsigned>(Mask[I]) != BegIdx + I) in isShuffleExtractingFromLHS()
922 SmallVector<int, 16> Mask = SVI.getShuffleMask(); in visitShuffleVectorInst() local
958 if (Mask[i] < 0) { in visitShuffleVectorInst()
963 if ((Mask[i] >= (int)e && isa<UndefValue>(RHS)) || in visitShuffleVectorInst()
964 (Mask[i] < (int)e && isa<UndefValue>(LHS))) { in visitShuffleVectorInst()
965 Mask[i] = -1; // Turn into undef. in visitShuffleVectorInst()
968 Mask[i] = Mask[i] % e; // Force to LHS. in visitShuffleVectorInst()
969 Elts.push_back(ConstantInt::get(Int32Ty, Mask[i])); in visitShuffleVectorInst()
983 recognizeIdentityMask(Mask, isLHSID, isRHSID); in visitShuffleVectorInst()
990 if (isa<UndefValue>(RHS) && CanEvaluateShuffled(LHS, Mask)) { in visitShuffleVectorInst()
991 Value *V = EvaluateInDifferentElementOrder(LHS, Mask); in visitShuffleVectorInst()
1024 if (isShuffleExtractingFromLHS(SVI, Mask)) { in visitShuffleVectorInst()
1026 unsigned MaskElems = Mask.size(); in visitShuffleVectorInst()
1027 unsigned BegIdx = Mask.front(); in visitShuffleVectorInst()
1193 if (Mask[i] < 0) { in visitShuffleVectorInst()
1196 } else if (Mask[i] < (int)LHSWidth) { in visitShuffleVectorInst()
1202 eltMask = LHSMask[Mask[i]]; in visitShuffleVectorInst()
1208 eltMask = Mask[i]; in visitShuffleVectorInst()
1219 eltMask = RHSMask[Mask[i]-LHSWidth]; in visitShuffleVectorInst()
1228 eltMask = Mask[i]-LHSWidth; in visitShuffleVectorInst()
1252 if (isSplat || newMask == LHSMask || newMask == RHSMask || newMask == Mask) { in visitShuffleVectorInst()