[llvm] [VPlan] Strengthen materializeFactors with assert (NFC) (PR #181665)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 18 07:14:22 PST 2026
================
@@ -5095,6 +5091,10 @@ void VPlanTransforms::materializeFactors(VPlan &Plan, VPBasicBlock *VectorPH,
VPValue *MulByUF = Builder.createOverflowingOp(
Instruction::Mul, {RuntimeVF, UF}, {true, false});
VFxUF.replaceAllUsesWith(MulByUF);
+
+ assert(Plan.getVF().getNumUsers() == 0 && Plan.getUF().getNumUsers() == 0 &&
+ Plan.getVFxUF().getNumUsers() == 0 &&
+ "VF, UF, and VFxUF not expected to be used");
----------------
MacDue wrote:
Does this capture the intention of the TODO? I interpreted as `Plan.getVF()` (etc) should not be used _again_ by another transform after `materializeFactors`.
https://github.com/llvm/llvm-project/pull/181665
More information about the llvm-commits
mailing list