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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337735
91177308-0d34-0410-b5e6-
96231b3b80d8
determineKillsAndDefs();
// Commit the changes.
- setUsed(KillRegUnits);
setUnused(DefRegUnits);
+ setUsed(KillRegUnits);
}
if (MBBI == MBB->begin()) {