[llvm-commits] [llvm] r59985 - /llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp

Chris Lattner sabre at nondot.org
Mon Nov 24 13:26:21 PST 2008


Author: lattner
Date: Mon Nov 24 15:26:21 2008
New Revision: 59985

URL: http://llvm.org/viewvc/llvm-project?rev=59985&view=rev
Log:
reenable the right part of the code.

Modified:
    llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp?rev=59985&r1=59984&r2=59985&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp Mon Nov 24 15:26:21 2008
@@ -208,7 +208,7 @@
     while (PHINode *PN = dyn_cast<PHINode>(DestBB->begin())) {
       Value *NewVal = PN->getIncomingValue(0);
       // Replace self referencing PHI with undef, it must be dead.
-      //if (NewVal == PN) NewVal = UndefValue::get(PN->getType());
+      if (NewVal == PN) NewVal = UndefValue::get(PN->getType());
       PN->replaceAllUsesWith(NewVal);
       PN->eraseFromParent();
     }





More information about the llvm-commits mailing list