aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Utils/Local.cpp')
-rw-r--r--lib/Transforms/Utils/Local.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp
index cab7f03ab0..17ae971901 100644
--- a/lib/Transforms/Utils/Local.cpp
+++ b/lib/Transforms/Utils/Local.cpp
@@ -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;