[SLP] Add an asser to make a non-obvious precondition clear [NFC]

This commit is contained in:
Philip Reames 2022-01-20 08:23:51 -08:00
parent 616f77172f
commit 3c422cbe6b
1 changed files with 2 additions and 0 deletions

View File

@ -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;