mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-11-03 14:21:30 +00:00 
			
		
		
		
	Rewrite instruction operands in AdjustCopiesBackFrom. Fixes PR11861.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149097 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
		@@ -553,10 +553,12 @@ bool RegisterCoalescer::AdjustCopiesBackFrom(const CoalescerPair &CP,
 | 
			
		||||
  if (UIdx != -1) {
 | 
			
		||||
    ValLREndInst->getOperand(UIdx).setIsKill(false);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // If the copy instruction was killing the destination register before the
 | 
			
		||||
  // merge, find the last use and trim the live range. That will also add the
 | 
			
		||||
  // isKill marker.
 | 
			
		||||
  
 | 
			
		||||
  // Rewrite the copy. If the copy instruction was killing the destination
 | 
			
		||||
  // register before the merge, find the last use and trim the live range. That
 | 
			
		||||
  // will also add the isKill marker.
 | 
			
		||||
  CopyMI->substituteRegister(IntA.reg, IntB.reg, CP.getSubIdx(),
 | 
			
		||||
                             *TRI);
 | 
			
		||||
  if (ALR->end == CopyIdx)
 | 
			
		||||
    LIS->shrinkToUses(&IntA);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user