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

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 06:14:32 PDT 2026


================
@@ -3102,10 +3215,11 @@ getRecipesForUncountableExit(SmallVectorImpl<VPInstruction *> &Recipes,
         return nullptr;
       Recipes.push_back(cast<VPInstruction>(V->getDefiningRecipe()));
       Recipes.push_back(cast<VPInstruction>(GepR));
-    } else if (match(V, m_Freeze(m_VPValue(
-                            Op1, m_VPInstruction<VPInstruction::MaskedCond>(
-                                     m_VPValue(Op2)))))) {
-      Worklist.push_back(Op2);
+    } else if (match(V, m_Freeze(m_CombineOr(
+                            m_VPInstruction<VPInstruction::MaskedCond>(
+                                m_VPValue(Op1)),
+                            m_VPValue(Op1))))) {
+      Worklist.push_back(Op1);
----------------
fhahn wrote:

Previously we `Op1` would always be guaranteed to the `MaskedCond`, but now we match `Op1` as the condition of the `MaskedCond`. Is that necessary? 

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


More information about the llvm-commits mailing list