Skip to content

Commit 4122565

Browse files
committed
!fixup add assert when VectorTripCount is already set
1 parent 8ed8191 commit 4122565

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/Transforms/Vectorize/VPlan.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,9 @@ void VPlan::prepareToExecute(Value *TripCountV, Value *VectorTripCountV,
953953

954954
if (!VectorTripCount.getUnderlyingValue())
955955
VectorTripCount.setUnderlyingValue(VectorTripCountV);
956+
else
957+
assert(VectorTripCount.getUnderlyingValue() == VectorTripCountV &&
958+
"VectorTripCount set earlier must much VectorTripCountV");
956959

957960
IRBuilder<> Builder(State.CFG.PrevBB->getTerminator());
958961
// FIXME: Model VF * UF computation completely in VPlan.

0 commit comments

Comments
 (0)