[llvm] [Scalar] Use std::none_of (NFC) (PR #143282)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 7 11:16:08 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/143282
None
>From a0629037d9cba666970a5f37a1de3d36e1c9bae3 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sat, 7 Jun 2025 09:30:12 -0700
Subject: [PATCH] [Scalar] Use std::none_of (NFC)
---
llvm/lib/Transforms/Scalar/LICM.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp
index 7965ed76a81b7..d11b4c5ee244a 100644
--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LICM.cpp
@@ -786,8 +786,7 @@ class ControlFlowHoister {
return InitialPreheader;
}
BranchInst *BI = It->first;
- assert(std::find_if(++It, HoistableBranches.end(), HasBBAsSuccessor) ==
- HoistableBranches.end() &&
+ assert(std::none_of(++It, HoistableBranches.end(), HasBBAsSuccessor) &&
"BB is expected to be the target of at most one branch");
LLVMContext &C = BB->getContext();
More information about the llvm-commits
mailing list