[llvm] [VPlan] Add transformation to narrow interleave groups. (PR #106441)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 18 12:08:54 PST 2024


================
@@ -939,8 +939,13 @@ void VPlan::prepareToExecute(Value *TripCountV, Value *VectorTripCountV,
 
   IRBuilder<> Builder(State.CFG.PrevBB->getTerminator());
   // FIXME: Model VF * UF computation completely in VPlan.
-  assert(VFxUF.getNumUsers() && "VFxUF expected to always have users");
   unsigned UF = getUF();
+
+  if (VFxUF.getNumUsers() == 0) {
+    assert(VF.getNumUsers() == 0 && "expected no users of VF");
----------------
fhahn wrote:

It's mostly to ensure there are no users of `VF` in the case. In theory there could be users of `VF` even if there are no users of `VFxUF` but should never happen, which this assert should ensure

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


More information about the llvm-commits mailing list