summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-05-15 01:35:44 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-05-15 01:35:44 +0000
commite26e56e72be91df12a3ab1d82aa635df2cc8b254 (patch)
treeea516bc749f5505b2c083785651237420dbe8982 /llvm/lib/CodeGen
parent222cf0efbc174528022b6d51300247ae170a8b6d (diff)
downloadbcm5719-llvm-e26e56e72be91df12a3ab1d82aa635df2cc8b254.tar.gz
bcm5719-llvm-e26e56e72be91df12a3ab1d82aa635df2cc8b254.zip
A partial re-def instruction may be a copy.
llvm-svn: 103850
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index 78d46398a19..aa0597f6876 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -454,7 +454,14 @@ void LiveIntervals::handleVirtualRegisterDef(MachineBasicBlock *mbb,
// Value#0 is now defined by the 2-addr instruction.
OldValNo->def = RedefIndex;
- OldValNo->setCopy(0);
+ if (!PartReDef)
+ OldValNo->setCopy(0);
+ else {
+ // A re-def may be a copy. e.g. %reg1030:6<def> = VMOVD %reg1026, ...
+ unsigned SrcReg, DstReg, SrcSubReg, DstSubReg;
+ if (tii_->isMoveInstr(*mi, SrcReg, DstReg, SrcSubReg, DstSubReg))
+ OldValNo->setCopy(&*mi);
+ }
// Add the new live interval which replaces the range for the input copy.
LiveRange LR(DefIndex, RedefIndex, ValNo);
OpenPOWER on IntegriCloud