aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegAllocLocal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/RegAllocLocal.cpp')
-rw-r--r--lib/CodeGen/RegAllocLocal.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/CodeGen/RegAllocLocal.cpp b/lib/CodeGen/RegAllocLocal.cpp
index 2530663911..82691baf3d 100644
--- a/lib/CodeGen/RegAllocLocal.cpp
+++ b/lib/CodeGen/RegAllocLocal.cpp
@@ -651,9 +651,11 @@ void RALocal::ComputeLocalLiveness(MachineBasicBlock& MBB) {
// Physical registers and those that are not live-out of the block
// are killed/dead at their last use/def within this block.
if (isPhysReg || !usedOutsideBlock) {
- if (MO.isUse())
- MO.setIsKill(true);
- else
+ if (MO.isUse()) {
+ // Don't mark uses that are tied to defs as kills.
+ if (MI->getDesc().getOperandConstraint(idx, TOI::TIED_TO) == -1)
+ MO.setIsKill(true);
+ } else
MO.setIsDead(true);
}
}