[llvm] 898a81d - [NFC][ARM] Replace lambda with any_of
Sam Parker via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 11 02:03:31 PST 2020
Author: Sam Parker
Date: 2020-11-11T10:02:55Z
New Revision: 898a81dfc5449eeee564eff670561ffa4799812e
URL: https://github.com/llvm/llvm-project/commit/898a81dfc5449eeee564eff670561ffa4799812e
DIFF: https://github.com/llvm/llvm-project/commit/898a81dfc5449eeee564eff670561ffa4799812e.diff
LOG: [NFC][ARM] Replace lambda with any_of
Added:
Modified:
llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp b/llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
index 71429920a150..bde17cc055b5 100644
--- a/llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
+++ b/llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
@@ -738,20 +738,10 @@ bool LowOverheadLoop::ValidateTailPredicate() {
// width, the Loop Start instruction will immediately generate one or more
// false lane mask which can, incorrectly, affect the proceeding MVE
// instructions in the preheader.
- auto CannotInsertWDLSTPBetween = [](MachineBasicBlock::iterator I,
- MachineBasicBlock::iterator E) {
- for (; I != E; ++I) {
- if (shouldInspect(*I)) {
- LLVM_DEBUG(dbgs() << "ARM Loops: Instruction blocks [W|D]LSTP"
- << " insertion: " << *I);
- return true;
- }
- }
- return false;
- };
-
- if (CannotInsertWDLSTPBetween(StartInsertPt, StartInsertBB->end()))
+ if (std::any_of(StartInsertPt, StartInsertBB->end(), shouldInspect)) {
+ LLVM_DEBUG(dbgs() << "ARM Loops: Instruction blocks [W|D]LSTP\n");
return false;
+ }
// Check that the value change of the element count is what we expect and
// that the predication will be equivalent. For this we need:
More information about the llvm-commits
mailing list