[PATCH] D154175: [SLP] Fix crash on attempt to access on invalid iterator state.
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 30 11:01:58 PDT 2023
ABataev added a comment.
Could you try this one instead:
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 82563091f7ce..84c30da74d3d 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -9074,8 +9074,8 @@ Instruction &BoUpSLP::getLastInstructionInBundle(const TreeEntry *E) {
// Set the insert point to the beginning of the basic block if the entry
// should not be scheduled.
- if (E->State != TreeEntry::NeedToGather &&
- (doesNotNeedToSchedule(E->Scalars) ||
+ if (doesNotNeedToSchedule(E->Scalars) ||
+ (E->State != TreeEntry::NeedToGather &&
all_of(E->Scalars, isVectorLikeInstWithConstOps))) {
Instruction *InsertInst;
if ((E->getOpcode() == Instruction::GetElementPtr &&
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154175/new/
https://reviews.llvm.org/D154175
More information about the llvm-commits
mailing list