Apply llvm fix for assertion/crash building archivers/c-blosc2
Merge commit 88ce403c6aab from llvm git (by Florian Hahn): [LV] Add new block to place recurrence splice, if needed. In some cases, a recurrence splice instructions needs to be inserted between to regions, for example if the regions get re-arranged during sinking. Fixes #56146. PR: 264979 Reported by: Robert Clausecker <fuz@fuz.su> MFC after: 3 days
This commit is contained in:
parent
c0d14b0220
commit
836d47d38e
@ -9266,7 +9266,11 @@ VPlanPtr LoopVectorizationPlanner::buildVPlanWithVPRecipes(
|
|||||||
VPBasicBlock *InsertBlock = PrevRecipe->getParent();
|
VPBasicBlock *InsertBlock = PrevRecipe->getParent();
|
||||||
auto *Region = GetReplicateRegion(PrevRecipe);
|
auto *Region = GetReplicateRegion(PrevRecipe);
|
||||||
if (Region)
|
if (Region)
|
||||||
InsertBlock = cast<VPBasicBlock>(Region->getSingleSuccessor());
|
InsertBlock = dyn_cast<VPBasicBlock>(Region->getSingleSuccessor());
|
||||||
|
if (!InsertBlock) {
|
||||||
|
InsertBlock = new VPBasicBlock(Region->getName() + ".succ");
|
||||||
|
VPBlockUtils::insertBlockAfter(InsertBlock, Region);
|
||||||
|
}
|
||||||
if (Region || PrevRecipe->isPhi())
|
if (Region || PrevRecipe->isPhi())
|
||||||
Builder.setInsertPoint(InsertBlock, InsertBlock->getFirstNonPhi());
|
Builder.setInsertPoint(InsertBlock, InsertBlock->getFirstNonPhi());
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user