From 4453324e5b564b71e37cf1b786f573b5db6e3052 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Tue, 26 Oct 2010 22:36:02 +0000 Subject: Preserve PHIDef bits in cloned values during splitting. llvm-svn: 117405 --- llvm/lib/CodeGen/SplitKit.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/SplitKit.cpp b/llvm/lib/CodeGen/SplitKit.cpp index 798f71465d3..0d43341aa0f 100644 --- a/llvm/lib/CodeGen/SplitKit.cpp +++ b/llvm/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)); -- cgit v1.2.3