[llvm] [VPlan] Fix VPInstruction::AnyOf combine undoing freeze (PR #223640)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 01:36:45 PDT 2026


================
@@ -3123,8 +3123,9 @@ getRecipesForUncountableExit(SmallVectorImpl<VPInstruction *> &Recipes,
         return nullptr;
       Recipes.push_back(cast<VPInstruction>(V->getDefiningRecipe()));
       Recipes.push_back(cast<VPInstruction>(GepR));
-    } else if (match(V, m_VPInstruction<VPInstruction::MaskedCond>(
-                            m_VPValue(Op1)))) {
+    } else if (match(V, m_CombineOr(m_VPInstruction<VPInstruction::MaskedCond>(
+                                        m_VPValue(Op1)),
+                                    m_Freeze(m_VPValue(Op1))))) {
----------------
lukel97 wrote:

I think it would have only accepted a freeze whose operand matches the patterns above, but yeah we should probably tighten it, done in a10ece428de6

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


More information about the llvm-commits mailing list