Skip to content

Commit 898a81d

Browse files
committed
[NFC][ARM] Replace lambda with any_of
1 parent 0141f5a commit 898a81d

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -738,20 +738,10 @@ bool LowOverheadLoop::ValidateTailPredicate() {
738738
// width, the Loop Start instruction will immediately generate one or more
739739
// false lane mask which can, incorrectly, affect the proceeding MVE
740740
// instructions in the preheader.
741-
auto CannotInsertWDLSTPBetween = [](MachineBasicBlock::iterator I,
742-
MachineBasicBlock::iterator E) {
743-
for (; I != E; ++I) {
744-
if (shouldInspect(*I)) {
745-
LLVM_DEBUG(dbgs() << "ARM Loops: Instruction blocks [W|D]LSTP"
746-
<< " insertion: " << *I);
747-
return true;
748-
}
749-
}
750-
return false;
751-
};
752-
753-
if (CannotInsertWDLSTPBetween(StartInsertPt, StartInsertBB->end()))
741+
if (std::any_of(StartInsertPt, StartInsertBB->end(), shouldInspect)) {
742+
LLVM_DEBUG(dbgs() << "ARM Loops: Instruction blocks [W|D]LSTP\n");
754743
return false;
744+
}
755745

756746
// Check that the value change of the element count is what we expect and
757747
// that the predication will be equivalent. For this we need:

0 commit comments

Comments
 (0)