[llvm-branch-commits] [llvm] 4ce9587 - Revert "[VPlan] Strengthen materializeFactors with assert (NFC) (#181665)"

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Feb 19 09:54:02 PST 2026


Author: Benjamin Maxwell
Date: 2026-02-19T17:53:59Z
New Revision: 4ce95879bb497f18d5269c26a1c66dfe4d7dfb8f

URL: https://github.com/llvm/llvm-project/commit/4ce95879bb497f18d5269c26a1c66dfe4d7dfb8f
DIFF: https://github.com/llvm/llvm-project/commit/4ce95879bb497f18d5269c26a1c66dfe4d7dfb8f.diff

LOG: Revert "[VPlan] Strengthen materializeFactors with assert (NFC) (#181665)"

This reverts commit aab9412a69a07787e9ec98b25709d709b7b537a6.

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
index 22a8edaf30eb6..2a8bb4b53bcfa 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
@@ -5080,6 +5080,10 @@ void VPlanTransforms::materializeFactors(VPlan &Plan, VPBasicBlock *VectorPH,
   Type *TCTy = VPTypeAnalysis(Plan).inferScalarType(Plan.getTripCount());
   VPValue &VF = Plan.getVF();
   VPValue &VFxUF = Plan.getVFxUF();
+  // Note that after the transform, Plan.getVF and Plan.getVFxUF should not be
+  // used.
+  // TODO: Assert that they aren't used.
+
   VPValue *UF =
       Plan.getOrAddLiveIn(ConstantInt::get(TCTy, Plan.getConcreteUF()));
   Plan.getUF().replaceAllUsesWith(UF);
@@ -5106,10 +5110,6 @@ 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");
 }
 
 DenseMap<const SCEV *, Value *>


        


More information about the llvm-branch-commits mailing list