Skip to content

Commit 9937480

Browse files
committed
Add assertion that StepVector operand is poison
1 parent 6759922 commit 9937480

File tree

1 file changed

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

1 file changed

+6
-2
lines changed

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1864,7 +1864,9 @@ class VPWidenIntOrFpInductionRecipe : public VPWidenInductionRecipe {
18641864
Step, IndDesc, DL),
18651865
Trunc(nullptr) {
18661866
addOperand(VF);
1867-
// Dummy StepVector replaced in convertToConcreteRecipes
1867+
// Temporarily use Poison for step-vector, which will only be introduced
1868+
// when needed, when preparing to execute.
1869+
assert(isa<PoisonValue>(StepVector->getLiveInIRValue()));
18681870
addOperand(StepVector);
18691871
}
18701872

@@ -1876,7 +1878,9 @@ class VPWidenIntOrFpInductionRecipe : public VPWidenInductionRecipe {
18761878
Step, IndDesc, DL),
18771879
Trunc(Trunc) {
18781880
addOperand(VF);
1879-
// Dummy StepVector replaced in convertToConcreteRecipes
1881+
// Temporarily use Poison for step-vector, which will only be introduced
1882+
// when needed, when preparing to execute.
1883+
assert(isa<PoisonValue>(StepVector->getLiveInIRValue()));
18801884
addOperand(StepVector);
18811885
SmallVector<std::pair<unsigned, MDNode *>> Metadata;
18821886
(void)Metadata;

0 commit comments

Comments
 (0)