• Home
  • Raw
  • Download

Lines Matching refs:SVI

225     } 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()
922 SmallVector<int, 16> Mask = SVI.getShuffleMask(); in visitShuffleVectorInst()
923 Type *Int32Ty = Type::getInt32Ty(SVI.getContext()); in visitShuffleVectorInst()
928 if (isa<UndefValue>(SVI.getOperand(2))) in visitShuffleVectorInst()
929 return replaceInstUsesWith(SVI, UndefValue::get(SVI.getType())); in visitShuffleVectorInst()
931 unsigned VWidth = cast<VectorType>(SVI.getType())->getNumElements(); in visitShuffleVectorInst()
935 if (Value *V = SimplifyDemandedVectorElts(&SVI, AllOnesEltMask, UndefElts)) { in visitShuffleVectorInst()
936 if (V != &SVI) in visitShuffleVectorInst()
937 return replaceInstUsesWith(SVI, V); in visitShuffleVectorInst()
938 LHS = SVI.getOperand(0); in visitShuffleVectorInst()
939 RHS = SVI.getOperand(1); in visitShuffleVectorInst()
951 ? LHS : UndefValue::get(SVI.getType()); in visitShuffleVectorInst()
952 return replaceInstUsesWith(SVI, Result); in visitShuffleVectorInst()
972 SVI.setOperand(0, SVI.getOperand(1)); in visitShuffleVectorInst()
973 SVI.setOperand(1, UndefValue::get(RHS->getType())); in visitShuffleVectorInst()
974 SVI.setOperand(2, ConstantVector::get(Elts)); in visitShuffleVectorInst()
975 LHS = SVI.getOperand(0); in visitShuffleVectorInst()
976 RHS = SVI.getOperand(1); in visitShuffleVectorInst()
986 if (isLHSID) return replaceInstUsesWith(SVI, LHS); in visitShuffleVectorInst()
987 if (isRHSID) return replaceInstUsesWith(SVI, RHS); in visitShuffleVectorInst()
992 return replaceInstUsesWith(SVI, V); in visitShuffleVectorInst()
1024 if (isShuffleExtractingFromLHS(SVI, Mask)) { in visitShuffleVectorInst()
1035 for (User *U : SVI.users()) in visitShuffleVectorInst()
1062 SVI.getName() + ".extract"); in visitShuffleVectorInst()
1072 : Builder->CreateBitCast(V, CastSrcTy, SVI.getName() + ".bc"); in visitShuffleVectorInst()
1076 NewBC, ConstantInt::get(Int32Ty, BegIdx), SVI.getName() + ".extract"); in visitShuffleVectorInst()
1136 return MadeChange ? &SVI : nullptr; in visitShuffleVectorInst()
1176 return MadeChange ? &SVI : nullptr; in visitShuffleVectorInst()
1270 if (isLHSID && VWidth == LHSOp0Width) return replaceInstUsesWith(SVI, newLHS); in visitShuffleVectorInst()
1271 if (isRHSID && VWidth == RHSOp0Width) return replaceInstUsesWith(SVI, newRHS); in visitShuffleVectorInst()
1273 return MadeChange ? &SVI : nullptr; in visitShuffleVectorInst()