Skip to content

Commit

Permalink
[VPlan] Replace getIRBasicBlock with IRBB in VPIRBB::execute (NFC).
Browse files Browse the repository at this point in the history
Suggested in llvm#109975. This
makes the function consistent throughout.
  • Loading branch information
fhahn committed Oct 27, 2024
1 parent 5287a9b commit 7fe149c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions llvm/lib/Transforms/Vectorize/VPlan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,13 +453,13 @@ VPBasicBlock::createEmptyBasicBlock(VPTransformState::CFGState &CFG) {
void VPIRBasicBlock::execute(VPTransformState *State) {
assert(getHierarchicalSuccessors().size() <= 2 &&
"VPIRBasicBlock can have at most two successors at the moment!");
State->Builder.SetInsertPoint(getIRBasicBlock()->getTerminator());
executeRecipes(State, getIRBasicBlock());
State->Builder.SetInsertPoint(IRBB->getTerminator());
executeRecipes(State, IRBB);
if (getSingleSuccessor()) {
assert(isa<UnreachableInst>(getIRBasicBlock()->getTerminator()));
auto *Br = State->Builder.CreateBr(getIRBasicBlock());
assert(isa<UnreachableInst>(IRBB->getTerminator()));
auto *Br = State->Builder.CreateBr(IRBB);
Br->setOperand(0, nullptr);
getIRBasicBlock()->getTerminator()->eraseFromParent();
IRBB->getTerminator()->eraseFromParent();
}

for (VPBlockBase *PredVPBlock : getHierarchicalPredecessors()) {
Expand Down

0 comments on commit 7fe149c

Please sign in to comment.