forked from OSchip/llvm-project
[LV] Replace check with assert for reduction resume values (NFC).
At this point, we need to have resume values for all inductions. If not, this would result in silent mis-compiles.
This commit is contained in:
parent
be858bda69
commit
73950f26f5
|
@ -10498,13 +10498,13 @@ bool LoopVectorizePass::processLoop(Loop *L) {
|
|||
// updated before vectorising the epilogue loop.
|
||||
for (VPRecipeBase &R : Header->phis()) {
|
||||
if (auto *ReductionPhi = dyn_cast<VPReductionPHIRecipe>(&R)) {
|
||||
if (auto *Resume = MainILV.getReductionResumeValue(
|
||||
ReductionPhi->getRecurrenceDescriptor())) {
|
||||
Value *Resume = MainILV.getReductionResumeValue(
|
||||
ReductionPhi->getRecurrenceDescriptor());
|
||||
assert(Resume && "Must have a resume value.");
|
||||
VPValue *StartVal = BestEpiPlan.getOrAddExternalDef(Resume);
|
||||
ReductionPhi->setOperand(0, StartVal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LVP.executePlan(EPI.EpilogueVF, EPI.EpilogueUF, BestEpiPlan, EpilogILV,
|
||||
DT, true);
|
||||
|
|
Loading…
Reference in New Issue