[llvm] [LV][NFC] Emit remarks when failing to vectorise early exit loops (PR #225078)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 06:58:28 PDT 2026


================
@@ -3296,8 +3344,12 @@ static bool handleUncountableExitsWithSideEffects(
   auto Phis = ScalarPH->phis();
   // TODO: Handle more than one Phi; re-derive from IV.
   // TODO: Handle reductions.
-  if (range_size(Phis) != 1)
+  if (range_size(Phis) != 1) {
+    reportVectorizationFailure("Early exit loop with side effects contains "
+                               "unsupported reductions or recurrences.\n",
----------------
fhahn wrote:

I guess recurrence may include inductions, but may be good to also mention for completeness

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


More information about the llvm-commits mailing list