remove some weirdness that came from the LSR code that has
authorChris Lattner <sabre@nondot.org>
Fri, 28 Nov 2008 00:58:15 +0000 (00:58 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 28 Nov 2008 00:58:15 +0000 (00:58 +0000)
nothing to do with dead instruction elimination.  No tests in
dejagnu depend on this, so I don't know what it was needed for.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60202 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/Local.cpp

index cab7f03ab0fc7a9121b70ab31fa9c7377dfef18c..17ae971901127195ab3d30de3b44d9d6f5058d81 100644 (file)
@@ -190,14 +190,7 @@ void llvm::RecursivelyDeleteTriviallyDeadInstructions(Value *V,
   while (!Insts.empty()) {
     I = *Insts.begin();
     Insts.erase(I);
-    
-    // If this is a PHI node, we may be able to make it dead if we know all the
-    // input values are the same.
-    if (PHINode *PN = dyn_cast<PHINode>(I)) {
-      if (Value *PNV = PN->hasConstantValue())
-        PN->replaceAllUsesWith(PNV);
-    }
-    
+
     // Okay, if the instruction is dead, delete it.
     if (!isInstructionTriviallyDead(I))
       continue;