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

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 06:31:33 PDT 2026


================
@@ -3238,9 +3267,14 @@ static bool handleUncountableExitsWithSideEffects(
   if (!match(IV->getStartValue(), m_SpecificInt(0)) ||
       !match(IV->getStepValue(), m_SpecificInt(1)))
     return false;
-  if (!match(Ptr, m_VPInstruction<Instruction::GetElementPtr>(m_LiveIn(),
-                                                              m_Specific(IV))))
+  if (!match(Ptr, m_VPInstruction<Instruction::GetElementPtr>(
+                      m_LiveIn(), m_Specific(IV)))) {
+    reportVectorizationFailure("Early exit loop with side effects contains "
+                               "unsupported critical load.\n",
----------------
lukel97 wrote:

Nit, same here

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


More information about the llvm-commits mailing list