[PATCH] D83779: [SLP] Fix order of `insertelement`/`insertvalue` seed operands
Anton Afanasyev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 6 08:08:14 PDT 2020
anton-afanasyev marked 3 inline comments as done.
anton-afanasyev added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7089
+ if (auto *IE = dyn_cast<InsertElementInst>(InsertInst))
+ return IE->getType()->getNumElements();
+
----------------
RKSimon wrote:
> VectorType::getNumElements() will be going away soon - you need to replace this with cast<FixedVectorType>(IE->getType())->getNumElements()
Replaced
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7104
+ CurrentType = AT->getElementType();
+ } else if (auto *VT = dyn_cast<VectorType>(CurrentType)) {
+ AggregateSize *= VT->getNumElements();
----------------
RKSimon wrote:
> dyn_cast<FixedVectorType>
Fixed
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:7120
+ if (auto *CI = dyn_cast<ConstantInt>(IE->getOperand(2))) {
+ auto *VT = cast<VectorType>(IE->getType());
+ OperandIndex *= VT->getNumElements();
----------------
RKSimon wrote:
> cast<FixedVectorType>(IE->getType())
Fixed
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83779/new/
https://reviews.llvm.org/D83779
More information about the llvm-commits
mailing list