[PATCH] D126544: [SLP] Factor out scalar type as a getter. NFC
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 31 03:47:21 PDT 2022
ABataev added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7195
// Find the type of the operands in VL.
- Type *ScalarTy = VL[0]->getType();
- if (StoreInst *SI = dyn_cast<StoreInst>(VL[0]))
- ScalarTy = SI->getValueOperand()->getType();
+ Type *ScalarTy = getScalarType(VL[0]);
auto *VecTy = FixedVectorType::get(ScalarTy, VL.size());
----------------
What if we gather cmps here?
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:10070
InstructionCost MinCost = SLPCostThreshold.getValue();
- Type *ScalarTy = VL[0]->getType();
- if (auto *IE = dyn_cast<InsertElementInst>(VL[0]))
- ScalarTy = IE->getOperand(1)->getType();
+ Type *ScalarTy = getScalarType(VL[0]);
----------------
What if we vectorize list of cmps here?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126544/new/
https://reviews.llvm.org/D126544
More information about the llvm-commits
mailing list