[llvm] [Scalar] Use std::none_of (NFC) (PR #143282)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 7 11:16:41 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/143282.diff
1 Files Affected:
- (modified) llvm/lib/Transforms/Scalar/LICM.cpp (+1-2)
``````````diff
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();
``````````
</details>
https://github.com/llvm/llvm-project/pull/143282
More information about the llvm-commits
mailing list