Skip to content

Commit 5843ffb

Browse files
authored
[VPlan] Improve code using m_One (NFC) (#161686)
1 parent 4195942 commit 5843ffb

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3346,12 +3346,7 @@ void VPlanTransforms::convertToConcreteRecipes(VPlan &Plan) {
33463346
VectorStep = Builder.createWidenCast(CastOp, VectorStep, IVTy);
33473347
}
33483348

3349-
[[maybe_unused]] auto *ConstStep =
3350-
ScalarStep->isLiveIn()
3351-
? dyn_cast<ConstantInt>(ScalarStep->getLiveInIRValue())
3352-
: nullptr;
3353-
assert(!ConstStep || ConstStep->getValue() != 1);
3354-
(void)ConstStep;
3349+
assert(!match(ScalarStep, m_One()) && "Expected non-unit scalar-step");
33553350
if (TypeInfo.inferScalarType(ScalarStep) != IVTy) {
33563351
ScalarStep =
33573352
Builder.createWidenCast(Instruction::Trunc, ScalarStep, IVTy);

0 commit comments

Comments
 (0)