summaryrefslogtreecommitdiff
path: root/lib/CodeGen/ExecutionDepsFix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/ExecutionDepsFix.cpp')
-rw-r--r--lib/CodeGen/ExecutionDepsFix.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/ExecutionDepsFix.cpp b/lib/CodeGen/ExecutionDepsFix.cpp
index 0d26f9d4cb..031f19c135 100644
--- a/lib/CodeGen/ExecutionDepsFix.cpp
+++ b/lib/CodeGen/ExecutionDepsFix.cpp
@@ -557,6 +557,9 @@ void ExeDepsFix::processUndefReads(MachineBasicBlock *MBB) {
for (MachineBasicBlock::reverse_iterator I = MBB->rbegin(), E = MBB->rend();
I != E; ++I) {
+ // Update liveness, including the current instrucion's defs.
+ LiveUnits.stepBackward(*I, *TRI);
+
if (UndefMI == &*I) {
if (!LiveUnits.contains(UndefMI->getOperand(OpIdx).getReg(), *TRI))
TII->breakPartialRegDependency(UndefMI, OpIdx, TRI);
@@ -568,7 +571,6 @@ void ExeDepsFix::processUndefReads(MachineBasicBlock *MBB) {
UndefMI = UndefReads.back().first;
OpIdx = UndefReads.back().second;
}
- LiveUnits.stepBackward(*I, *TRI);
}
}