[llvm] 3c422cb - [SLP] Add an asser to make a non-obvious precondition clear [NFC]
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 20 08:24:33 PST 2022
Author: Philip Reames
Date: 2022-01-20T08:24:10-08:00
New Revision: 3c422cbe6b7e2ea70fdd97883a9cd4d7d6a2efb2
URL: https://github.com/llvm/llvm-project/commit/3c422cbe6b7e2ea70fdd97883a9cd4d7d6a2efb2
DIFF: https://github.com/llvm/llvm-project/commit/3c422cbe6b7e2ea70fdd97883a9cd4d7d6a2efb2.diff
LOG: [SLP] Add an asser to make a non-obvious precondition clear [NFC]
Added:
Modified:
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 015973d65f4ff..37e4a4e5732fd 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -7539,6 +7539,8 @@ void BoUpSLP::BlockScheduling::calculateDependencies(ScheduleData *SD,
ScheduleData *DepDest = BundleMember->NextLoadStore;
if (DepDest) {
Instruction *SrcInst = BundleMember->Inst;
+ assert(SrcInst->mayReadOrWriteMemory() &&
+ "NextLoadStore list for non memory effecting bundle?");
MemoryLocation SrcLoc = getLocation(SrcInst, SLP->AA);
bool SrcMayWrite = BundleMember->Inst->mayWriteToMemory();
unsigned numAliased = 0;
More information about the llvm-commits
mailing list