From: Jakob Stoklund Olesen Date: Tue, 26 Oct 2010 22:36:02 +0000 (+0000) Subject: Preserve PHIDef bits in cloned values during splitting. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=79c0262fa8516d0b673b2fcacff920dcc62a9b94;p=oota-llvm.git 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 --- diff --git a/lib/CodeGen/SplitKit.cpp b/lib/CodeGen/SplitKit.cpp index 798f71465d3..0d43341aa0f 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 InsP = valueMap_.insert(makeVV(ParentVNI, Idx == ParentVNI->def ? VNI : 0));