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

Chris Lattner sabre at nondot.org
Mon Nov 24 11:40:34 PST 2008


Author: lattner
Date: Mon Nov 24 13:40:34 2008
New Revision: 59976

URL: http://llvm.org/viewvc/llvm-project?rev=59976&view=rev
Log:
revert an accidental commit, this fixes the regression on test/CodeGen/X86/isel-sink.ll

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=59976&r1=59975&r2=59976&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp Mon Nov 24 13:40:34 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();
     }
@@ -572,9 +572,6 @@
   if (Instruction *I = dyn_cast_or_null<Instruction>(AddrInst))
     AddrModeInsts.push_back(I);
 
-  if (AddrInst && !AddrInst->hasOneUse())
-    ;
-  else
   switch (Opcode) {
   case Instruction::PtrToInt:
     // PtrToInt is always a noop, as we know that the int type is pointer sized.





More information about the llvm-commits mailing list