Skip to content

Commit be2c3a6

Browse files
committed
!fixup use insertOnEdge.
1 parent 2b4c71f commit be2c3a6

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2449,9 +2449,8 @@ static void introduceCheckBlockInVPlan(VPlan &Plan, BasicBlock *CheckIRBB) {
24492449
VPBlockBase *VectorPH = Plan.getVectorPreheader();
24502450
VPBlockBase *PreVectorPH = VectorPH->getSinglePredecessor();
24512451
VPIRBasicBlock *CheckVPIRBB = VPIRBasicBlock::fromBasicBlock(CheckIRBB);
2452-
VPBlockUtils::connectBlocks(PreVectorPH, CheckVPIRBB, -1, 1);
24532452
VPBlockUtils::connectBlocks(CheckVPIRBB, ScalarPH);
2454-
VPBlockUtils::connectBlocks(CheckVPIRBB, VectorPH, 0, -1);
2453+
VPBlockUtils::insertOnEdge(PreVectorPH, VectorPH, CheckVPIRBB);
24552454
}
24562455

24572456
void InnerLoopVectorizer::emitIterationCountCheck(BasicBlock *Bypass) {

llvm/unittests/Transforms/Vectorize/VPlanTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ TEST(VPBasicBlockTest, print) {
743743
auto * ScalarHeaderVPBB = new VPIRBasicBlock(ScalarHeader);
744744
VPBlockUtils::connectBlocks(VPBB0, VPBB1);
745745
VPBlockUtils::connectBlocks(VPBB2, ScalarHeaderVPBB);
746-
VPlan Plan(VPBB0, TC, VPBB1, ScalarHeaderVPBB);
746+
VPlan Plan(VPBB0, TC, ScalarHeaderVPBB);
747747
std::string FullDump;
748748
raw_string_ostream OS(FullDump);
749749
Plan.printDOT(OS);

0 commit comments

Comments
 (0)