[llvm] r176734 - Remove wrong and unnecessary assertion.

Jakob Stoklund Olesen stoklund at 2pi.dk
Fri Mar 8 15:00:13 PST 2013


Author: stoklund
Date: Fri Mar  8 17:00:13 2013
New Revision: 176734

URL: http://llvm.org/viewvc/llvm-project?rev=176734&view=rev
Log:
Remove wrong and unnecessary assertion.

PHIs are allowed to have multiple operand pairs per predecessor, and
this code works just fine when it happens.

Modified:
    llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp

Modified: llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp?rev=176734&r1=176733&r2=176734&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp (original)
+++ llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp Fri Mar  8 17:00:13 2013
@@ -459,7 +459,6 @@ void SSAIfConv::replacePHIInstrs() {
   for (unsigned i = 0, e = PHIs.size(); i != e; ++i) {
     PHIInfo &PI = PHIs[i];
     DEBUG(dbgs() << "If-converting " << *PI.PHI);
-    assert(PI.PHI->getNumOperands() == 5 && "Unexpected PHI operands.");
     unsigned DstReg = PI.PHI->getOperand(0).getReg();
     TII->insertSelect(*Head, FirstTerm, HeadDL, DstReg, Cond, PI.TReg, PI.FReg);
     DEBUG(dbgs() << "          --> " << *llvm::prior(FirstTerm));





More information about the llvm-commits mailing list