[llvm] [VPlan] Model branch cond to enter scalar epilogue in VPlan. (PR #92651)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 4 05:25:16 PDT 2024
================
@@ -448,11 +448,13 @@ VPBasicBlock::createEmptyBasicBlock(VPTransformState::CFGState &CFG) {
}
void VPIRBasicBlock::execute(VPTransformState *State) {
- assert(getHierarchicalSuccessors().empty() &&
- "VPIRBasicBlock cannot have successors at the moment");
-
State->Builder.SetInsertPoint(getIRBasicBlock()->getTerminator());
executeRecipes(State, getIRBasicBlock());
+ if (getSingleSuccessor() && isa<UnreachableInst>(getIRBasicBlock()->getTerminator())) {
----------------
ayalz wrote:
If terminator is not UnreachableInst then it was already backpatched - is that possible? Should this check be an assert.
// Replace the terminating UnreachableInst with an unconditional branch set to null (explicitly as constructor accepts only non-null destinations), to be reset when executing the successor.
Replacing one stub with another ... would having the successor take care of this replacement, or creating a branch-to-null originally instead of unreachable, be better.
https://github.com/llvm/llvm-project/pull/92651
More information about the llvm-commits
mailing list