]> granicus.if.org Git - llvm/commitdiff
[LoopVer] Remove an assert that's redundant now. NFC
authorAdam Nemet <anemet@apple.com>
Tue, 14 Jun 2016 09:39:01 +0000 (09:39 +0000)
committerAdam Nemet <anemet@apple.com>
Tue, 14 Jun 2016 09:39:01 +0000 (09:39 +0000)
Ensuring that the PHI are all single-operand is not performed in the
second pass added by the previous pass.  This removes the assert from
the first pass.

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

lib/Transforms/Utils/LoopVersioning.cpp

index 83af2d8ea33ba7873352c2dc679651fc6fafe9fc..65d781b392b954b73c6a8c68ed86855d0f80465a 100644 (file)
@@ -133,11 +133,8 @@ void LoopVersioning::addPHINodes(
     // See if we have a single-operand PHI with the value defined by the
     // original loop.
     for (auto I = PHIBlock->begin(); (PN = dyn_cast<PHINode>(I)); ++I) {
-      if (PN->getIncomingValue(0) == Inst) {
-        assert(PN->getNumOperands() == 1 &&
-               "Exit block should only have on predecessor");
+      if (PN->getIncomingValue(0) == Inst)
         break;
-      }
     }
     // If not create it.
     if (!PN) {