File tree 3 files changed +6
-14
lines changed
test/Transforms/LoopVectorize 3 files changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -1182,16 +1182,6 @@ const VPRegionBlock *VPlan::getVectorLoopRegion() const {
1182
1182
return nullptr ;
1183
1183
}
1184
1184
1185
- VPBasicBlock *VPlan::getScalarPreheader () const {
1186
- auto *MiddleVPBB =
1187
- cast<VPBasicBlock>(getVectorLoopRegion ()->getSingleSuccessor ());
1188
- auto *LastSucc = MiddleVPBB->getSuccessors ().back ();
1189
- // If scalar preheader is connected to VPlan, it is the last successor of
1190
- // MiddleVPBB. If this last successor is a VPIRBasicBlock, it is the Exit
1191
- // block rather than the scalar preheader.
1192
- return isa<VPIRBasicBlock>(LastSucc) ? nullptr : cast<VPBasicBlock>(LastSucc);
1193
- }
1194
-
1195
1185
LLVM_DUMP_METHOD
1196
1186
void VPlan::printDOT (raw_ostream &O) const {
1197
1187
VPlanPrinter Printer (O, *this );
Original file line number Diff line number Diff line change @@ -3898,7 +3898,9 @@ class VPlan {
3898
3898
}
3899
3899
3900
3900
// / Return the VPBasicBlock for the preheader of the scalar loop.
3901
- VPBasicBlock *getScalarPreheader () const ;
3901
+ VPBasicBlock *getScalarPreheader () const {
3902
+ return cast<VPBasicBlock>(getScalarHeader ()->getSinglePredecessor ());
3903
+ }
3902
3904
3903
3905
// / Return the VPIRBasicBlock wrapping the header of the scalar loop.
3904
3906
VPIRBasicBlock *getScalarHeader () const { return ScalarHeader; }
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ define i64 @multi_exiting_to_different_exits_live_in_exit_values() {
15
15
; CHECK-NEXT: ir-bb<entry>:
16
16
; CHECK-NEXT: IR %src = alloca [128 x i32], align 4
17
17
; CHECK-NEXT: IR call void @init(ptr %src)
18
- ; CHECK-NEXT: No successors
18
+ ; CHECK-NEXT: Successor(s): vector.ph
19
19
; CHECK-EMPTY:
20
20
; CHECK-NEXT: vector.ph:
21
21
; CHECK-NEXT: Successor(s): vector loop
@@ -99,7 +99,7 @@ define i64 @multi_exiting_to_same_exit_live_in_exit_values() {
99
99
; CHECK-NEXT: ir-bb<entry>:
100
100
; CHECK-NEXT: IR %src = alloca [128 x i32], align 4
101
101
; CHECK-NEXT: IR call void @init(ptr %src)
102
- ; CHECK-NEXT: No successors
102
+ ; CHECK-NEXT: Successor(s): vector.ph
103
103
; CHECK-EMPTY:
104
104
; CHECK-NEXT: vector.ph:
105
105
; CHECK-NEXT: Successor(s): vector loop
@@ -176,7 +176,7 @@ define i64 @multi_exiting_to_same_exit_live_in_exit_values_2() {
176
176
; CHECK-NEXT: ir-bb<entry>:
177
177
; CHECK-NEXT: IR %src = alloca [128 x i32], align 4
178
178
; CHECK-NEXT: IR call void @init(ptr %src)
179
- ; CHECK-NEXT: No successors
179
+ ; CHECK-NEXT: Successor(s): vector.ph
180
180
; CHECK-EMPTY:
181
181
; CHECK-NEXT: vector.ph:
182
182
; CHECK-NEXT: Successor(s): vector loop
You can’t perform that action at this time.
0 commit comments