diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2008-03-24 23:31:21 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2008-03-24 23:31:21 +0000 |
| commit | 69a3f9c4177711dada3a126a91e875af65282394 (patch) | |
| tree | bd825632572255995e20ef348ac02cb3d3b1788e /llvm/lib/CodeGen | |
| parent | 6e225173c55c13d7b107d6768a927d4910c7172e (diff) | |
| download | bcm5719-llvm-69a3f9c4177711dada3a126a91e875af65282394.tar.gz bcm5719-llvm-69a3f9c4177711dada3a126a91e875af65282394.zip | |
If the coalescer commuted a def MI to allow coalescing, it can changed a previously coalesced copy into an non-identity copy.
llvm-svn: 48752
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp index 6326edab349..6f5b5236386 100644 --- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp +++ b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp @@ -323,7 +323,8 @@ bool SimpleRegisterCoalescing::RemoveCopyByCommutingDef(LiveInterval &IntA, MachineInstr *UseMI = &*UI; ++UI; if (JoinedCopies.count(UseMI)) - continue; + // It'll no longer be "joined" after the change. + JoinedCopies.erase(UseMI); unsigned UseIdx = li_->getInstructionIndex(UseMI); LiveInterval::iterator ULR = IntA.FindLiveRangeContaining(UseIdx); if (ULR->valno != AValNo) |

