diff options
author | David Greene <greened@obbligato.org> | 2018-07-23 20:23:50 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2018-07-23 20:23:50 +0000 |
commit | 4345df3dade18e30680108e1b0bd8e88f1c7da2a (patch) | |
tree | 4e4b82f752b8ccbccdd86afd914b3419ee487b1a | |
parent | 5af81d5bfac9e5266a2879834d744ba5ee4b1c8f (diff) | |
download | bcm5719-llvm-4345df3dade18e30680108e1b0bd8e88f1c7da2a.tar.gz bcm5719-llvm-4345df3dade18e30680108e1b0bd8e88f1c7da2a.zip |
Fix RegScavenger::unprocess
RegScavenger::unprocess walks backward, so it should undo the effects
of defs before undoing effects of kills. Previously it did things in
the opposite order, leaving a register apparently unused (dead) in the
case where an instruction both used (killed) and defined a register.
Differential Revision: https://reviews.llvm.org/D42200
llvm-svn: 337735
-rw-r--r-- | llvm/lib/CodeGen/RegisterScavenging.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegisterScavenging.cpp b/llvm/lib/CodeGen/RegisterScavenging.cpp index d7cd5a096ef..a878c34f9aa 100644 --- a/llvm/lib/CodeGen/RegisterScavenging.cpp +++ b/llvm/lib/CodeGen/RegisterScavenging.cpp @@ -162,8 +162,8 @@ void RegScavenger::unprocess() { determineKillsAndDefs(); // Commit the changes. - setUsed(KillRegUnits); setUnused(DefRegUnits); + setUsed(KillRegUnits); } if (MBBI == MBB->begin()) { |