diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2010-04-21 20:57:54 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2010-04-21 20:57:54 +0000 |
| commit | 02e816b317dac4599b76cfd501dd5ee0eb4caaa1 (patch) | |
| tree | 605af2cea0ade663c56135d7865de0cdae3a4324 /llvm/lib/CodeGen | |
| parent | e5798dcb413e2cacfcf00452fb7fe14ba51bef6d (diff) | |
| download | bcm5719-llvm-02e816b317dac4599b76cfd501dd5ee0eb4caaa1.tar.gz bcm5719-llvm-02e816b317dac4599b76cfd501dd5ee0eb4caaa1.zip | |
Do not try to optimize a copy that has already been marked for deletion.
llvm-svn: 102027
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 78011ed67f8..543278b467d 100644 --- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp +++ b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp @@ -804,7 +804,8 @@ SimpleRegisterCoalescing::UpdateRegDefsUses(unsigned SrcReg, unsigned DstReg, CopySrcReg == SrcReg && CopyDstReg != UseDstReg) { // If the use is a copy and it won't be coalesced away, and its source // is defined by a trivial computation, try to rematerialize it instead. - if (ReMaterializeTrivialDef(li_->getInterval(SrcReg), CopyDstReg, + if (!JoinedCopies.count(UseMI) && + ReMaterializeTrivialDef(li_->getInterval(SrcReg), CopyDstReg, CopyDstSubIdx, UseMI)) continue; } |

