[llvm] [VPlan] Use not_equal_to to improve code (NFC) (PR #190262)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 2 14:02:38 PDT 2026


https://github.com/artagnon created https://github.com/llvm/llvm-project/pull/190262

None

>From 136acf57a536694f71f86af6d1ed48768ce0582b Mon Sep 17 00:00:00 2001
From: Ramkumar Ramachandra <artagnon at tenstorrent.com>
Date: Thu, 2 Apr 2026 22:00:13 +0100
Subject: [PATCH] [VPlan] Use not_equal_to to improve code (NFC)

---
 llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
index 9944df4778774..34bb00cc0cee2 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<VPInstruction>(Phis[0]->getStartValue());



More information about the llvm-commits mailing list