[PATCH] D57779: [SLP] Add support for throttling.
weiwei via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 18 23:19:31 PDT 2020
wwei added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:4065
+ if (Tree->ScalarsToVec.count(Op))
+ InsertCost += getGatherCost(V);
+ }
----------------
I think the input for `getGatherCost` should be `Entry->Scalars` instead of `V`. The code in `getGatherCost` likes:
```
int BoUpSLP::getGatherCost(ArrayRef<Value *> VL) const {
// Find the type of the operands in VL.
Type *ScalarTy = VL[0]->getType();
... ...
VectorType *VecTy = VectorType::get(ScalarTy, VL.size());
... ...
return getGatherCost(VecTy, ShuffledElements);
```
So, if input is `V`, `VectTy` will always be equal to `<1 x iN>`, I think it's the same with `iN` type, and `getGatherCost(VecTy, ShuffledElements)` will return incorrect InsertCost value.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57779/new/
https://reviews.llvm.org/D57779
More information about the llvm-commits
mailing list