[PATCH] D140580: [SLP]Do not emit many extractelements, reuse the single one emitted.
Anna Thomas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 2 14:42:03 PST 2023
anna 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:
> 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..
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