aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-10-08 17:07:39 +0000
committerChris Lattner <sabre@nondot.org>2002-10-08 17:07:39 +0000
commit57b314cfb1b342e1add74fa2d160db5ff91c89fb (patch)
tree9617d95c45432926c17f7ff5986a826c79ce0a86
parent6eaeb5764cc683c356ad1a8c13ad94151de030f2 (diff)
It is illegal for PHI nodes to have zero values, delete the code to handle them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4071 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index f0e639742d..74a1496bfa 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -630,8 +630,6 @@ Instruction *InstCombiner::visitCastInst(CastInst &CI) {
//
Instruction *InstCombiner::visitPHINode(PHINode &PN) {
// If the PHI node only has one incoming value, eliminate the PHI node...
- if (PN.getNumIncomingValues() == 0)
- return ReplaceInstUsesWith(PN, Constant::getNullValue(PN.getType()));
if (PN.getNumIncomingValues() == 1)
return ReplaceInstUsesWith(PN, PN.getIncomingValue(0));