Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 8,285 Lines • ▼ Show 20 Lines | case Instruction::Call: { | ||||
Intrinsic::ID ID = getVectorIntrinsicIDForCall(CI, TLI); | Intrinsic::ID ID = getVectorIntrinsicIDForCall(CI, TLI); | ||||
auto VecCallCosts = getVectorCallCosts(CI, VecTy, TTI, TLI); | auto VecCallCosts = getVectorCallCosts(CI, VecTy, TTI, TLI); | ||||
bool UseIntrinsic = ID != Intrinsic::not_intrinsic && | bool UseIntrinsic = ID != Intrinsic::not_intrinsic && | ||||
VecCallCosts.first <= VecCallCosts.second; | VecCallCosts.first <= VecCallCosts.second; | ||||
Value *ScalarArg = nullptr; | Value *ScalarArg = nullptr; | ||||
std::vector<Value *> OpVecs; | std::vector<Value *> OpVecs; | ||||
SmallVector<Type *, 2> TysForDecl = | SmallVector<Type *, 2> TysForDecl; | ||||
{FixedVectorType::get(CI->getType(), E->Scalars.size())}; | if (isVectorIntrinsicWithReturnOverloadType(IID)) | ||||
TysForDecl.push_back( | |||||
FixedVectorType::get(CI->getType(), E->Scalars.size())); | |||||
for (int j = 0, e = CI->arg_size(); j < e; ++j) { | for (int j = 0, e = CI->arg_size(); j < e; ++j) { | ||||
ValueList OpVL; | ValueList OpVL; | ||||
// Some intrinsics have scalar arguments. This argument should not be | // Some intrinsics have scalar arguments. This argument should not be | ||||
// vectorized. | // vectorized. | ||||
if (UseIntrinsic && isVectorIntrinsicWithScalarOpAtArg(IID, j)) { | if (UseIntrinsic && isVectorIntrinsicWithScalarOpAtArg(IID, j)) { | ||||
CallInst *CEI = cast<CallInst>(VL0); | CallInst *CEI = cast<CallInst>(VL0); | ||||
ScalarArg = CEI->getArgOperand(j); | ScalarArg = CEI->getArgOperand(j); | ||||
OpVecs.push_back(CEI->getArgOperand(j)); | OpVecs.push_back(CEI->getArgOperand(j)); | ||||
▲ Show 20 Lines • Show All 4,203 Lines • Show Last 20 Lines |