From f364a63c3ec9f4010de18c009bec7cd0e7883d40 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Thu, 19 Jul 2012 10:46:05 +0000 Subject: Replace some explicit compare loops with std::equal. No functionality change. llvm-svn: 160501 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index cfe71708fe0..b971b696a3b 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -4681,13 +4681,7 @@ SDVTList SelectionDAG::getVTList(const EVT *VTs, unsigned NumVTs) { if (I->NumVTs != NumVTs || VTs[0] != I->VTs[0] || VTs[1] != I->VTs[1]) continue; - bool NoMatch = false; - for (unsigned i = 2; i != NumVTs; ++i) - if (VTs[i] != I->VTs[i]) { - NoMatch = true; - break; - } - if (!NoMatch) + if (std::equal(&VTs[2], &VTs[NumVTs], &I->VTs[2])) return *I; } -- cgit v1.2.3