aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SplitKit.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-10-26 22:36:02 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-10-26 22:36:02 +0000
commit79c0262fa8516d0b673b2fcacff920dcc62a9b94 (patch)
tree57a5ff724d469467b8e7eb341c8c3f5fe179156c /lib/CodeGen/SplitKit.cpp
parent7e13efad388f86a4adcb48ec164ee0ba154d0296 (diff)
downloadexternal_llvm-79c0262fa8516d0b673b2fcacff920dcc62a9b94.zip
external_llvm-79c0262fa8516d0b673b2fcacff920dcc62a9b94.tar.gz
external_llvm-79c0262fa8516d0b673b2fcacff920dcc62a9b94.tar.bz2
Preserve PHIDef bits in cloned values during splitting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117405 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SplitKit.cpp')
-rw-r--r--lib/CodeGen/SplitKit.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/SplitKit.cpp b/lib/CodeGen/SplitKit.cpp
index 798f714..0d43341 100644
--- a/lib/CodeGen/SplitKit.cpp
+++ b/lib/CodeGen/SplitKit.cpp
@@ -321,6 +321,10 @@ VNInfo *LiveIntervalMap::defValue(const VNInfo *ParentVNI, SlotIndex Idx) {
// Create a new value.
VNInfo *VNI = li_->getNextValue(Idx, 0, lis_.getVNInfoAllocator());
+ // Preserve the PHIDef bit.
+ if (ParentVNI->isPHIDef() && Idx == ParentVNI->def)
+ VNI->setIsPHIDef(true);
+
// Use insert for lookup, so we can add missing values with a second lookup.
std::pair<ValueMap::iterator,bool> InsP =
valueMap_.insert(makeVV(ParentVNI, Idx == ParentVNI->def ? VNI : 0));