From 394617f38b2c9d301f729169b968d74c4162919c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 8 Oct 2002 17:07:39 +0000 Subject: [PATCH] It is illegal for PHI nodes to have zero values, delete the code to handle them llvm-svn: 4071 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index f0e639742dc2..74a1496bfac1 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/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));