[llvm] [VPlan] Assert that replacement types match in VPUser::setOperand (NFC). (PR #195891)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Thu May 21 06:04:36 PDT 2026
================
@@ -2092,17 +2092,18 @@ static bool optimizeVectorInductionWidthForTCAndVFUF(VPlan &Plan,
continue;
// Update IV operands and comparison bound to use new narrower type.
- auto *NewStart = Plan.getZero(NewIVTy);
- WideIV->setStartValue(NewStart);
- auto *NewStep = Plan.getConstantInt(NewIVTy, 1);
- WideIV->setStepValue(NewStep);
+ auto *NewWideIV = WideIV->cloneWithOperands(Plan.getZero(NewIVTy),
+ Plan.getConstantInt(NewIVTy, 1),
+ WideIV->getVFValue());
+ NewWideIV->insertBefore(WideIV);
----------------
lukel97 wrote:
I presume we want to erase `WideIV` here if we switched the iterator to `make_early_inc_range`?
https://github.com/llvm/llvm-project/pull/195891
More information about the llvm-commits
mailing list