Skip to content

Commit 4a51d29

Browse files
committed
!fixup use first successor for middle block.
1 parent 1e7cac7 commit 4a51d29

File tree

1 file changed

+2
-2
lines changed
  • llvm/lib/Transforms/Vectorize

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3891,10 +3891,10 @@ class VPlan {
38913891
/// whether to execute the scalar tail loop or the exit block from the loop
38923892
/// latch.
38933893
const VPBasicBlock *getMiddleBlock() const {
3894-
return cast<VPBasicBlock>(getScalarPreheader()->getSinglePredecessor());
3894+
return cast<VPBasicBlock>(getScalarPreheader()->getPredecessors()[0]);
38953895
}
38963896
VPBasicBlock *getMiddleBlock() {
3897-
return cast<VPBasicBlock>(getScalarPreheader()->getSinglePredecessor());
3897+
return cast<VPBasicBlock>(getScalarPreheader()->getPredecessors()[0]);
38983898
}
38993899

39003900
/// Return the VPBasicBlock for the preheader of the scalar loop.

0 commit comments

Comments
 (0)