@@ -259,6 +259,7 @@ TEST(VPBasicBlockTest, getPlan) {
259
259
260
260
auto TC = std::make_unique<VPValue>();
261
261
VPIRBasicBlock *ScalarHeaderVPBB = new VPIRBasicBlock (*ScalarHeader);
262
+ VPBlockUtils::connectBlocks (VPBB4, ScalarHeaderVPBB);
262
263
VPlan Plan (VPPH, &*TC, VPBB1, ScalarHeaderVPBB);
263
264
264
265
EXPECT_EQ (&Plan, VPBB1->getPlan ());
@@ -280,6 +281,7 @@ TEST(VPBasicBlockTest, getPlan) {
280
281
281
282
auto TC = std::make_unique<VPValue>();
282
283
VPIRBasicBlock *ScalarHeaderVPBB = new VPIRBasicBlock (*ScalarHeader);
284
+ VPBlockUtils::connectBlocks (R1, ScalarHeaderVPBB);
283
285
VPlan Plan (VPPH, &*TC, VPBB1, ScalarHeaderVPBB);
284
286
285
287
EXPECT_EQ (&Plan, VPBB1->getPlan ());
@@ -311,6 +313,7 @@ TEST(VPBasicBlockTest, getPlan) {
311
313
312
314
auto TC = std::make_unique<VPValue>();
313
315
VPIRBasicBlock *ScalarHeaderVPBB = new VPIRBasicBlock (*ScalarHeader);
316
+ VPBlockUtils::connectBlocks (R2, ScalarHeaderVPBB);
314
317
VPlan Plan (VPPH, &*TC, VPBB1, ScalarHeaderVPBB);
315
318
316
319
EXPECT_EQ (&Plan, VPBB1->getPlan ());
@@ -355,6 +358,7 @@ TEST(VPBasicBlockTest, TraversingIteratorTest) {
355
358
// Use Plan to properly clean up created blocks.
356
359
auto TC = std::make_unique<VPValue>();
357
360
VPIRBasicBlock *ScalarHeaderVPBB = new VPIRBasicBlock (*ScalarHeader);
361
+ VPBlockUtils::connectBlocks (VPBB4, ScalarHeaderVPBB);
358
362
VPlan Plan (VPPH, &*TC, VPBB1, ScalarHeaderVPBB);
359
363
}
360
364
@@ -456,6 +460,7 @@ TEST(VPBasicBlockTest, TraversingIteratorTest) {
456
460
// Use Plan to properly clean up created blocks.
457
461
auto TC = std::make_unique<VPValue>();
458
462
VPIRBasicBlock *ScalarHeaderVPBB = new VPIRBasicBlock (*ScalarHeader);
463
+ VPBlockUtils::connectBlocks (R2, ScalarHeaderVPBB);
459
464
VPlan Plan (VPPH, &*TC, VPBB0, ScalarHeaderVPBB);
460
465
}
461
466
@@ -540,6 +545,7 @@ TEST(VPBasicBlockTest, TraversingIteratorTest) {
540
545
// Use Plan to properly clean up created blocks.
541
546
auto TC = std::make_unique<VPValue>();
542
547
VPIRBasicBlock *ScalarHeaderVPBB = new VPIRBasicBlock (*ScalarHeader);
548
+ VPBlockUtils::connectBlocks (VPBB2, ScalarHeaderVPBB);
543
549
VPlan Plan (VPPH, &*TC, VPBB1, ScalarHeaderVPBB);
544
550
}
545
551
@@ -589,6 +595,7 @@ TEST(VPBasicBlockTest, TraversingIteratorTest) {
589
595
// Use Plan to properly clean up created blocks.
590
596
auto TC = std::make_unique<VPValue>();
591
597
VPIRBasicBlock *ScalarHeaderVPBB = new VPIRBasicBlock (*ScalarHeader);
598
+ VPBlockUtils::connectBlocks (R1, ScalarHeaderVPBB);
592
599
VPlan Plan (VPPH, &*TC, VPBB1, ScalarHeaderVPBB);
593
600
}
594
601
@@ -682,6 +689,7 @@ TEST(VPBasicBlockTest, TraversingIteratorTest) {
682
689
// Use Plan to properly clean up created blocks.
683
690
auto TC = std::make_unique<VPValue>();
684
691
VPIRBasicBlock *ScalarHeaderVPBB = new VPIRBasicBlock (*ScalarHeader);
692
+ VPBlockUtils::connectBlocks (VPBB2, ScalarHeaderVPBB);
685
693
VPlan Plan (VPPH, &*TC, VPBB1, ScalarHeaderVPBB);
686
694
}
687
695
}
@@ -808,6 +816,7 @@ TEST(VPBasicBlockTest, printPlanWithVFsAndUFs) {
808
816
LLVMContext C;
809
817
auto ScalarHeader = std::make_unique<BasicBlock *>(BasicBlock::Create (C, " " ));
810
818
VPIRBasicBlock *ScalarHeaderVPBB = new VPIRBasicBlock (*ScalarHeader);
819
+ VPBlockUtils::connectBlocks (VPBB1, ScalarHeaderVPBB);
811
820
VPlan Plan (VPBB0, TC, VPBB1, ScalarHeaderVPBB);
812
821
Plan.setName (" TestPlan" );
813
822
Plan.addVF (ElementCount::getFixed (4 ));
@@ -826,6 +835,9 @@ No successors
826
835
827
836
bb1:
828
837
EMIT vp<%2> = add
838
+ Successor(s): ir-bb<>
839
+
840
+ ir-bb<>:
829
841
No successors
830
842
}
831
843
)" ;
@@ -847,6 +859,9 @@ No successors
847
859
848
860
bb1:
849
861
EMIT vp<%2> = add
862
+ Successor(s): ir-bb<>
863
+
864
+ ir-bb<>:
850
865
No successors
851
866
}
852
867
)" ;
@@ -868,6 +883,9 @@ No successors
868
883
869
884
bb1:
870
885
EMIT vp<%2> = add
886
+ Successor(s): ir-bb<>
887
+
888
+ ir-bb<>:
871
889
No successors
872
890
}
873
891
)" ;
@@ -1271,6 +1289,7 @@ TEST(VPRecipeTest, dumpRecipeInPlan) {
1271
1289
LLVMContext C;
1272
1290
auto ScalarHeader = std::make_unique<BasicBlock *>(BasicBlock::Create (C, " " ));
1273
1291
VPIRBasicBlock *ScalarHeaderVPBB = new VPIRBasicBlock (*ScalarHeader);
1292
+ VPBlockUtils::connectBlocks (VPBB1, ScalarHeaderVPBB);
1274
1293
VPlan Plan (VPBB0, VPBB1, ScalarHeaderVPBB);
1275
1294
1276
1295
IntegerType *Int32 = IntegerType::get (C, 32 );
@@ -1341,6 +1360,7 @@ TEST(VPRecipeTest, dumpRecipeUnnamedVPValuesInPlan) {
1341
1360
LLVMContext C;
1342
1361
auto ScalarHeader = std::make_unique<BasicBlock *>(BasicBlock::Create (C, " " ));
1343
1362
VPIRBasicBlock *ScalarHeaderVPBB = new VPIRBasicBlock (*ScalarHeader);
1363
+ VPBlockUtils::connectBlocks (VPBB1, ScalarHeaderVPBB);
1344
1364
VPlan Plan (VPBB0, VPBB1, ScalarHeaderVPBB);
1345
1365
1346
1366
IntegerType *Int32 = IntegerType::get (C, 32 );
0 commit comments