[llvm-branch-commits] [llvm-branch] r90167 - in /llvm/branches/Apple/Zoidberg: lib/CodeGen/LiveIntervalAnalysis.cpp test/CodeGen/X86/2008-08-05-SpillerBug.ll

Jakob Stoklund Olesen stoklund at 2pi.dk
Mon Nov 30 15:39:35 PST 2009


Author: stoklund
Date: Mon Nov 30 17:39:34 2009
New Revision: 90167

URL: http://llvm.org/viewvc/llvm-project?rev=90167&view=rev
Log:
Merged r90163

Modified:
    llvm/branches/Apple/Zoidberg/lib/CodeGen/LiveIntervalAnalysis.cpp
    llvm/branches/Apple/Zoidberg/test/CodeGen/X86/2008-08-05-SpillerBug.ll

Modified: llvm/branches/Apple/Zoidberg/lib/CodeGen/LiveIntervalAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Zoidberg/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=90167&r1=90166&r2=90167&view=diff

==============================================================================
--- llvm/branches/Apple/Zoidberg/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
+++ llvm/branches/Apple/Zoidberg/lib/CodeGen/LiveIntervalAnalysis.cpp Mon Nov 30 17:39:34 2009
@@ -1095,6 +1095,12 @@
       NewVReg = mri_->createVirtualRegister(rc);
       vrm.grow();
       CreatedNewVReg = true;
+
+      // The new virtual register should get the same allocation hints as the
+      // old one.
+      std::pair<unsigned, unsigned> Hint = mri_->getRegAllocationHint(Reg);
+      if (Hint.first || Hint.second)
+        mri_->setRegAllocationHint(NewVReg, Hint.first, Hint.second);
     }
 
     if (!TryFold)

Modified: llvm/branches/Apple/Zoidberg/test/CodeGen/X86/2008-08-05-SpillerBug.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Zoidberg/test/CodeGen/X86/2008-08-05-SpillerBug.ll?rev=90167&r1=90166&r2=90167&view=diff

==============================================================================
--- llvm/branches/Apple/Zoidberg/test/CodeGen/X86/2008-08-05-SpillerBug.ll (original)
+++ llvm/branches/Apple/Zoidberg/test/CodeGen/X86/2008-08-05-SpillerBug.ll Mon Nov 30 17:39:34 2009
@@ -1,4 +1,4 @@
-; RUN: llc < %s -mtriple=i386-apple-darwin -disable-fp-elim -stats |& grep asm-printer | grep 59
+; RUN: llc < %s -mtriple=i386-apple-darwin -disable-fp-elim -stats |& grep asm-printer | grep 58
 ; PR2568
 
 @g_3 = external global i16		; <i16*> [#uses=1]





More information about the llvm-branch-commits mailing list