• Home
  • Raw
  • Download

Lines Matching refs:Mask

219                                          SmallVectorImpl<Constant*> &Mask) {  in CollectSingleShuffleElements()  argument
225 Mask.assign(NumElts, UndefValue::get(Type::getInt32Ty(V->getContext()))); in CollectSingleShuffleElements()
231 Mask.push_back(ConstantInt::get(Type::getInt32Ty(V->getContext()), i)); in CollectSingleShuffleElements()
237 Mask.push_back(ConstantInt::get(Type::getInt32Ty(V->getContext()), in CollectSingleShuffleElements()
255 if (CollectSingleShuffleElements(VecOp, LHS, RHS, Mask)) { in CollectSingleShuffleElements()
257 Mask[InsertedIdx] = UndefValue::get(Type::getInt32Ty(V->getContext())); in CollectSingleShuffleElements()
270 if (CollectSingleShuffleElements(VecOp, LHS, RHS, Mask)) { in CollectSingleShuffleElements()
273 Mask[InsertedIdx % NumElts] = in CollectSingleShuffleElements()
278 Mask[InsertedIdx % NumElts] = in CollectSingleShuffleElements()
296 static Value *CollectShuffleElements(Value *V, SmallVectorImpl<Constant*> &Mask, in CollectShuffleElements() argument
304 Mask.assign(NumElts, UndefValue::get(Type::getInt32Ty(V->getContext()))); in CollectShuffleElements()
309 Mask.assign(NumElts, ConstantInt::get(Type::getInt32Ty(V->getContext()),0)); in CollectShuffleElements()
330 Value *V = CollectShuffleElements(VecOp, Mask, RHS); in CollectShuffleElements()
331 Mask[InsertedIdx % NumElts] = in CollectShuffleElements()
338 Value *V = CollectShuffleElements(EI->getOperand(0), Mask, RHS); in CollectShuffleElements()
342 Mask[i] = ConstantInt::get(Type::getInt32Ty(V->getContext()), in CollectShuffleElements()
350 if (CollectSingleShuffleElements(IEI, EI->getOperand(0), RHS, Mask)) in CollectShuffleElements()
359 Mask.push_back(ConstantInt::get(Type::getInt32Ty(V->getContext()), i)); in CollectShuffleElements()
396 SmallVector<Constant*, 16> Mask; in visitInsertElementInst() local
398 Value *LHS = CollectShuffleElements(&IE, Mask, RHS); in visitInsertElementInst()
401 return new ShuffleVectorInst(LHS, RHS, ConstantVector::get(Mask)); in visitInsertElementInst()
422 SmallVector<int, 16> Mask = SVI.getShuffleMask(); in visitShuffleVectorInst() local
457 if (Mask[i] < 0) { in visitShuffleVectorInst()
462 if ((Mask[i] >= (int)e && isa<UndefValue>(RHS)) || in visitShuffleVectorInst()
463 (Mask[i] < (int)e && isa<UndefValue>(LHS))) { in visitShuffleVectorInst()
464 Mask[i] = -1; // Turn into undef. in visitShuffleVectorInst()
467 Mask[i] = Mask[i] % e; // Force to LHS. in visitShuffleVectorInst()
469 Mask[i])); in visitShuffleVectorInst()
484 for (unsigned i = 0, e = Mask.size(); i != e; ++i) { in visitShuffleVectorInst()
485 if (Mask[i] < 0) continue; // Ignore undef values. in visitShuffleVectorInst()
487 isLHSID &= (Mask[i] == (int)i); in visitShuffleVectorInst()
490 isRHSID &= (Mask[i]-e == i); in visitShuffleVectorInst()
607 if (Mask[i] < 0) { in visitShuffleVectorInst()
610 } else if (Mask[i] < (int)LHSWidth) { in visitShuffleVectorInst()
616 eltMask = LHSMask[Mask[i]]; in visitShuffleVectorInst()
622 eltMask = Mask[i]; in visitShuffleVectorInst()
633 eltMask = RHSMask[Mask[i]-LHSWidth]; in visitShuffleVectorInst()
642 eltMask = Mask[i]-LHSWidth; in visitShuffleVectorInst()
666 if (isSplat || newMask == LHSMask || newMask == RHSMask || newMask == Mask) { in visitShuffleVectorInst()