[PATCH] D140580: [SLP]Do not emit many extractelements, reuse the single one emitted.
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 2 14:43:54 PST 2023
ABataev added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:9590
+ auto EEIt = It->second.find(Builder.GetInsertBlock());
+ if (EEIt != It->second.end()) {
+ auto *I = cast<Instruction>(EEIt->second);
----------------
anna wrote:
> anna wrote:
> > You need to check here that `EEIt->second` is an instruction.
> > ```
> > if (EEIt != It->second.end() && isa<Instruction>(EEIt->second))
> > ```
> > avoids the assertion failure.
> Although all values passed into `ScalarToEEs` are indeed instructions. So, why do we end up with some empty value in the map..
Need a reproducer to understand better the cause and provide the best fix.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140580/new/
https://reviews.llvm.org/D140580
More information about the llvm-commits
mailing list