mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-28 06:32:09 +00:00
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:
parent
6eaeb5764c
commit
57b314cfb1
@ -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));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user