aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/VirtRegMap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/VirtRegMap.cpp')
-rw-r--r--lib/CodeGen/VirtRegMap.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp
index 633cf2bf8d..f7306c5d0a 100644
--- a/lib/CodeGen/VirtRegMap.cpp
+++ b/lib/CodeGen/VirtRegMap.cpp
@@ -490,11 +490,11 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, const VirtRegMap &VRM) {
if (DestReg != It->second) {
MRI->copyRegToReg(MBB, &MI, DestReg, It->second,
MF.getSSARegMap()->getRegClass(VirtReg));
- // Revisit the copy if the destination is a vreg.
- if (MRegisterInfo::isVirtualRegister(DestReg)) {
- NextMII = &MI;
- --NextMII; // backtrack to the copy.
- }
+ // Revisit the copy so we make sure to notice the effects of the
+ // operation on the destreg (either needing to RA it if it's
+ // virtual or needing to clobber any values if it's physical).
+ NextMII = &MI;
+ --NextMII; // backtrack to the copy.
}
MBB.erase(&MI);
goto ProcessNextInst;