diff --git a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp index a33743edb133..fd69759be0f4 100644 --- a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp +++ b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp @@ -2165,7 +2165,7 @@ static bool tryToReplaceALMWithWideALM(VPlan &Plan, ElementCount VF, } } - assert(all_of(Phis, [](VPActiveLaneMaskPHIRecipe *Phi) { return Phi; }) && + assert(all_of(Phis, not_equal_to(nullptr)) && "Expected one VPActiveLaneMaskPHIRecipe for each unroll part"); auto *EntryALM = cast(Phis[0]->getStartValue());