[llvm] [LoopVectorize] Enable vectorisation of early exit loops with live-outs (PR #120567)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 13 02:46:23 PST 2025


================
@@ -8958,6 +8968,9 @@ static void addScalarResumePhis(VPRecipeBuilder &Builder, VPlan &Plan) {
     // start value provides the value if the loop is bypassed.
     bool IsFOR = isa<VPFirstOrderRecurrencePHIRecipe>(VectorPhiR);
     auto *ResumeFromVectorLoop = VectorPhiR->getBackedgeValue();
+    assert(!Plan.getEarlyExit() &&
+           "Cannot handle reductions or first-order recurrences with "
+           "uncountable early exits");
----------------
fhahn wrote:

This could be added separately, as NFC?

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


More information about the llvm-commits mailing list