From: Adam Nemet Date: Tue, 14 Jun 2016 09:39:01 +0000 (+0000) Subject: [LoopVer] Remove an assert that's redundant now. NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8083593c09bf0d1ff47552ef74e12021595599fd;p=llvm [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272650 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Utils/LoopVersioning.cpp b/lib/Transforms/Utils/LoopVersioning.cpp index 83af2d8ea33..65d781b392b 100644 --- a/lib/Transforms/Utils/LoopVersioning.cpp +++ b/lib/Transforms/Utils/LoopVersioning.cpp @@ -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(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) {