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
This commit is contained in:
Chris Lattner 2002-10-08 17:07:39 +00:00
parent 6eaeb5764c
commit 57b314cfb1

View File

@ -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));