[llvm] [VPlan] Replace UnrollPart for VPScalarIVSteps with start index op (NFC) (PR #170906)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 18 13:34:35 PST 2026
================
@@ -1526,7 +1526,9 @@ static void simplifyRecipe(VPSingleDefRecipe *Def, VPTypeAnalysis &TypeInfo) {
// VPScalarIVSteps for part 0 can be replaced by their start value, if only
// the first lane is demanded.
if (auto *Steps = dyn_cast<VPScalarIVStepsRecipe>(Def)) {
- if (Steps->isPart0() && vputils::onlyFirstLaneUsed(Steps)) {
+ if ((Steps->getNumOperands() == 3 ||
+ match(Steps->getOperand(3), m_ZeroInt())) &&
----------------
ayalz wrote:
Having 3 operands is fine, trying to see bout the 4th operand, i.e., if `match(Steps->getOperand(3), m_ZeroInt())` can ever be true. OTOH, suggesting above that it should be.
https://github.com/llvm/llvm-project/pull/170906
More information about the llvm-commits
mailing list