diff options
author | Lang Hames <lhames@gmail.com> | 2012-01-27 00:05:42 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2012-01-27 00:05:42 +0000 |
commit | 286fed5c8ced2ee642ed6e3b97a7bdd6d929937c (patch) | |
tree | 70973973a767e4a0a71372dcb8c3cfb08a689119 /llvm/lib/CodeGen | |
parent | 5aac954be9d64368784cb19c5f04d85fcdb7affb (diff) | |
download | bcm5719-llvm-286fed5c8ced2ee642ed6e3b97a7bdd6d929937c.tar.gz bcm5719-llvm-286fed5c8ced2ee642ed6e3b97a7bdd6d929937c.zip |
Rewrite instruction operands in AdjustCopiesBackFrom. Fixes PR11861.
llvm-svn: 149097
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/RegisterCoalescer.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp index 3493645f7f2..b7d18ba1a14 100644 --- a/llvm/lib/CodeGen/RegisterCoalescer.cpp +++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp @@ -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); |