Home | History | Annotate | Download | only in Vectorize

Lines Matching defs:CI

3076 // Estimate cost of a call instruction CI if it were vectorized with factor VF.
3080 static unsigned getVectorCallCost(CallInst *CI, unsigned VF,
3084 Function *F = CI->getCalledFunction();
3085 StringRef FnName = CI->getCalledFunction()->getName();
3086 Type *ScalarRetTy = CI->getType();
3088 for (auto &ArgOp : CI->arg_operands())
3116 if (!TLI || !TLI->isFunctionVectorizable(FnName, VF) || CI->isNoBuiltin())
3128 // Estimate cost of an intrinsic call instruction CI if it were vectorized with
3131 static unsigned getVectorIntrinsicCost(CallInst *CI, unsigned VF,
3134 Intrinsic::ID ID = getIntrinsicIDForCall(CI, TLI);
3137 Type *RetTy = ToVectorTy(CI->getType(), VF);
3139 for (unsigned i = 0, ie = CI->getNumArgOperands(); i != ie; ++i)
3140 Tys.push_back(ToVectorTy(CI->getArgOperand(i)->getType(), VF));
3190 } else if (ICmpInst *CI = dyn_cast<ICmpInst>(I)) {
3191 NewI = B.CreateICmp(CI->getPredicate(),
3192 ShrinkOperand(CI->getOperand(0)),
3193 ShrinkOperand(CI->getOperand(1)));
3198 } else if (CastInst *CI = dyn_cast<CastInst>(I)) {
3199 switch (CI->getOpcode()) {
3202 NewI = ShrinkOperand(CI->getOperand(0));
3205 NewI = B.CreateSExtOrTrunc(CI->getOperand(0),
3210 NewI = B.CreateZExtOrTrunc(CI->getOperand(0),
3844 CastInst *CI = dyn_cast<CastInst>(it);
3850 if (CI->getOperand(0) == OldInduction &&
3852 Value *ScalarCast = Builder.CreateCast(CI->getOpcode(), Induction,
3853 CI->getType());
3858 CI->getType(), II.getStepValue()->getSExtValue());
3865 Type *DestTy = (VF == 1) ? CI->getType() :
3866 VectorType::get(CI->getType(), VF);
3870 Entry[Part] = Builder.CreateCast(CI->getOpcode(), A[Part], DestTy);
3882 CallInst *CI = cast<CallInst>(it);
3884 StringRef FnName = CI->getCalledFunction()->getName();
3885 Function *F = CI->getCalledFunction();
3886 Type *RetTy = ToVectorTy(CI->getType(), VF);
3888 for (unsigned i = 0, ie = CI->getNumArgOperands(); i != ie; ++i)
3889 Tys.push_back(ToVectorTy(CI->getArgOperand(i)->getType(), VF));
3891 Intrinsic::ID ID = getIntrinsicIDForCall(CI, TLI);
3902 unsigned CallCost = getVectorCallCost(CI, VF, *TTI, TLI, NeedToScalarize);
3904 ID && getVectorIntrinsicCost(CI, VF, *TTI, TLI) <= CallCost;
3912 for (unsigned i = 0, ie = CI->getNumArgOperands(); i != ie; ++i) {
3913 Value *Arg = CI->getArgOperand(i);
3917 VectorParts &VectorArg = getVectorValue(CI->getArgOperand(i));
3926 Type *TysForDecl[] = {CI->getType()};
3928 TysForDecl[0] = VectorType::get(CI->getType()->getScalarType(), VF);
4317 CallInst *CI = dyn_cast<CallInst>(it);
4318 if (CI && !getIntrinsicIDForCall(CI, TLI) && !isa<DbgInfoIntrinsic>(CI) &&
4319 !(CI->getCalledFunction() && TLI &&
4320 TLI->isFunctionVectorizable(CI->getCalledFunction()->getName()))) {
4329 if (CI &&
4330 hasVectorInstrinsicScalarOpd(getIntrinsicIDForCall(CI, TLI), 1)) {
4332 if (!SE->isLoopInvariant(PSE.getSCEV(CI->getOperand(1)), TheLoop)) {
4335 DEBUG(dbgs() << "LV: Found unvectorizable intrinsic " << *CI << "\n");
5569 CallInst *CI = cast<CallInst>(I);
5570 unsigned CallCost = getVectorCallCost(CI, VF, TTI, TLI, NeedToScalarize);
5571 if (getIntrinsicIDForCall(CI, TLI))
5572 return std::min(CallCost, getVectorIntrinsicCost(CI, VF, TTI, TLI));