[PATCH] D135279: [SLP]Improve/fix CSE analysis of the blocks/instructions.
Valeriy Dmitriev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 5 11:31:15 PDT 2022
vdmitrie added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:8715
}
+ if (auto *ExI = dyn_cast<Instruction>(Ex))
+ GatherShuffleExtractSeq.insert(ExI);
----------------
At this point Ex is guaranteed to be an instruction. So why dyn_cast?
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:8746
Value *NewInst = ExtractAndExtendIfNeeded(Vec);
- CSEBlocks.insert(cast<Instruction>(Scalar)->getParent());
+ if (auto *NewInstI = dyn_cast<Instruction>(NewInst))
+ CSEBlocks.insert(NewInstI->getParent());
----------------
same seems applies here.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:8839
Value *NewInst = ExtractAndExtendIfNeeded(Vec);
- CSEBlocks.insert(PH->getIncomingBlock(i));
+ if (auto *NewInstI = dyn_cast<Instruction>(NewInst))
+ CSEBlocks.insert(NewInstI->getParent());
----------------
and here
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135279/new/
https://reviews.llvm.org/D135279
More information about the llvm-commits
mailing list