From 7c2b76f7cfe7493d7e437c55905c3a6b6bc4d574 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 6 Nov 2022 19:53:02 -0800 Subject: [PATCH] [PowerPC] Use llvm::is_contained (NFC) --- llvm/lib/Target/PowerPC/PPCCTRLoops.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp b/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp index 5320ae0..87d62f1 100644 --- a/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp +++ b/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp @@ -275,13 +275,9 @@ void PPCCTRLoops::expandNormalLoops(MachineLoop *ML, MachineInstr *Start, // merge the two-predecessor loop header with its successor. If the // successor happens to be a header of nest loop, then we will have a header // which has more than 2 predecessors. - assert(std::find(ML->getHeader()->predecessors().begin(), - ML->getHeader()->predecessors().end(), - Exiting) != ML->getHeader()->predecessors().end() && + assert(llvm::is_contained(ML->getHeader()->predecessors(), Exiting) && "Loop latch is not loop header predecessor!"); - assert(std::find(ML->getHeader()->predecessors().begin(), - ML->getHeader()->predecessors().end(), - Preheader) != ML->getHeader()->predecessors().end() && + assert(llvm::is_contained(ML->getHeader()->predecessors(), Preheader) && "Loop preheader is not loop header predecessor!"); PHIMIB.addReg(ADDIDef).addMBB(Exiting); -- 2.7.4