[llvm] [LV] Vectorize uncountable early exit store loops with combined conditions (PR #205109)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 17 07:52:50 PDT 2026


================
@@ -2733,6 +2733,27 @@ void LoopVectorizationCostModel::collectLoopUniforms(ElementCount VF) {
     if (Legal->hasUncountableEarlyExit() && TheLoop->getLoopLatch() != E)
       continue;
     auto *Cmp = dyn_cast<Instruction>(E->getTerminator()->getOperand(0));
+    // TODO: This might occur for a multi-exit readonly loop too?
+    //       Excluded for now in LVL.
+    // TODO: Do we have the main IV available somewhere? this feels a little
+    //       fragile.
----------------
sdesmalen-arm wrote:

`Legal->getPrimaryInduction()`

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


More information about the llvm-commits mailing list