[llvm] r272650 - [LoopVer] Remove an assert that's redundant now. NFC

Adam Nemet via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 14 02:39:01 PDT 2016


Author: anemet
Date: Tue Jun 14 04:39:01 2016
New Revision: 272650

URL: http://llvm.org/viewvc/llvm-project?rev=272650&view=rev
Log:
[LoopVer] Remove an assert that's redundant now. NFC

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.

Modified:
    llvm/trunk/lib/Transforms/Utils/LoopVersioning.cpp

Modified: llvm/trunk/lib/Transforms/Utils/LoopVersioning.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LoopVersioning.cpp?rev=272650&r1=272649&r2=272650&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/LoopVersioning.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/LoopVersioning.cpp Tue Jun 14 04:39:01 2016
@@ -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) {




More information about the llvm-commits mailing list