mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 00:24:26 +00:00
[LoopUnroll] Use undef for phis with no value live
We would create a phi node with a zero initialized operand instead of undef in the case where no value was originally available. This was problematic for x86_mmx which has no null value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241143 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -86,7 +86,7 @@ static void ConnectProlog(Loop *L, Value *BECount, unsigned Count,
|
||||
if (L->contains(PN)) {
|
||||
NewPN->addIncoming(PN->getIncomingValueForBlock(NewPH), OrigPH);
|
||||
} else {
|
||||
NewPN->addIncoming(Constant::getNullValue(PN->getType()), OrigPH);
|
||||
NewPN->addIncoming(UndefValue::get(PN->getType()), OrigPH);
|
||||
}
|
||||
|
||||
Value *V = PN->getIncomingValueForBlock(Latch);
|
||||
|
Reference in New Issue
Block a user