[llvm] [VPlan] Add specialized VPValue subclasses for different types (NFC) (PR #172758)

via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 31 16:09:14 PST 2025


================
@@ -4617,10 +4619,11 @@ void VPlanTransforms::materializeVectorTripCount(VPlan &Plan,
                                                  bool TailByMasking,
                                                  bool RequiresScalarEpilogue) {
   VPValue &VectorTC = Plan.getVectorTripCount();
-  assert(VectorTC.isLiveIn() && "vector-trip-count must be a live-in");
+  assert(isa<VPSymbolicValue>(VectorTC) &&
+         "vector-trip-count must be a live-in");
   // There's nothing to do if there are no users of the vector trip count or its
   // IR value has already been set.
-  if (VectorTC.getNumUsers() == 0 || VectorTC.getLiveInIRValue())
+  if (VectorTC.getNumUsers() == 0 || VectorTC.getUnderlyingValue())
----------------
ayalz wrote:

Materializing VectorTC should convert it from VPSymbolicValues to VPIRValues rather than setting its IR Value, which BTW should be done here to prevent rematerialzation?

https://github.com/llvm/llvm-project/pull/172758


More information about the llvm-commits mailing list