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 | 3b0714d993a37c722603f7cbfab71848a99e91cd (patch) | |
tree | 0257c2fdd139d784a995166f84804815ad65d438 /lib/CodeGen | |
parent | 660a4d9e0a15ad25db10d25a1a8caeafc0ebad5e (diff) | |
download | external_llvm-3b0714d993a37c722603f7cbfab71848a99e91cd.zip external_llvm-3b0714d993a37c722603f7cbfab71848a99e91cd.tar.gz external_llvm-3b0714d993a37c722603f7cbfab71848a99e91cd.tar.bz2 |
Rewrite instruction operands in AdjustCopiesBackFrom. Fixes PR11861.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149097 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/RegisterCoalescer.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/CodeGen/RegisterCoalescer.cpp b/lib/CodeGen/RegisterCoalescer.cpp index 3493645..b7d18ba 100644 --- a/lib/CodeGen/RegisterCoalescer.cpp +++ b/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); |