summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-04-21 20:57:54 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-04-21 20:57:54 +0000
commit02e816b317dac4599b76cfd501dd5ee0eb4caaa1 (patch)
tree605af2cea0ade663c56135d7865de0cdae3a4324 /llvm/lib/CodeGen
parente5798dcb413e2cacfcf00452fb7fe14ba51bef6d (diff)
downloadbcm5719-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.cpp3
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;
}
OpenPOWER on IntegriCloud