From: Sanjoy Das <sanjoy@playingwithpointers.com>
Date: Tue, 20 Oct 2015 01:06:17 +0000 (+0000)
Subject: [RS4GC] Minor cleanup to `normalizeForInvokeSafepoint`; NFC
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8293dfd63f4a38dbf81da882c4ec699ebb098f95;p=oota-llvm.git

[RS4GC] Minor cleanup to `normalizeForInvokeSafepoint`; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250783 91177308-0d34-0410-b5e6-96231b3b80d8
---

diff --git a/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
index ca92b14fd90..a82750b2374 100644
--- a/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
+++ b/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
@@ -1249,14 +1249,14 @@ static BasicBlock *
 normalizeForInvokeSafepoint(BasicBlock *BB, BasicBlock *InvokeParent,
                             DominatorTree &DT) {
   BasicBlock *Ret = BB;
-  if (!BB->getUniquePredecessor()) {
+  if (!BB->getUniquePredecessor())
     Ret = SplitBlockPredecessors(BB, InvokeParent, "", &DT);
-  }
 
   // Now that 'ret' has unique predecessor we can safely remove all phi nodes
   // from it
   FoldSingleEntryPHINodes(Ret);
-  assert(!isa<PHINode>(Ret->begin()));
+  assert(!isa<PHINode>(Ret->begin()) &&
+         "All PHI nodes should have been removed!");
 
   // At this point, we can safely insert a gc.relocate as the first instruction
   // in Ret if needed.