From 43736c7cfaea3b0c3e2660b9cd5c01e306f7c0df Mon Sep 17 00:00:00 2001 From: Andrew Trick Date: Mon, 12 Nov 2012 23:59:48 +0000 Subject: [PATCH] Cleanup -join-splitedges. Make the loop more obvious. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167785 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/RegisterCoalescer.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/CodeGen/RegisterCoalescer.cpp b/lib/CodeGen/RegisterCoalescer.cpp index 36f6b358755..7d69176729d 100644 --- a/lib/CodeGen/RegisterCoalescer.cpp +++ b/lib/CodeGen/RegisterCoalescer.cpp @@ -234,11 +234,8 @@ static bool isSplitEdge(const MachineBasicBlock *MBB) { for (MachineBasicBlock::const_iterator MII = MBB->begin(), E = MBB->end(); MII != E; ++MII) { - if (MII->isCopyLike()) - continue; - if (MII->isUnconditionalBranch()) - continue; - return false; + if (!MII->isCopyLike() || !MII->isUnconditionalBranch()) + return false; } return true; } -- 2.34.1