diff options
author | David Majnemer <david.majnemer@gmail.com> | 2015-07-01 05:38:07 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2015-07-01 05:38:07 +0000 |
commit | 453f7a14800c1e589e25e311ec40a81acd9c4555 (patch) | |
tree | 2c9ebdb66631f3c34108d6fbb7146aa0fe12703c /llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp | |
parent | 9402e27ae0b29498cdbeb03860adfad5750c0005 (diff) | |
download | bcm5719-llvm-453f7a14800c1e589e25e311ec40a81acd9c4555.tar.gz bcm5719-llvm-453f7a14800c1e589e25e311ec40a81acd9c4555.zip |
[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.
llvm-svn: 241143
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp index 919b45d3c7b..add5432aa27 100644 --- a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp +++ b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp @@ -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); |