aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegAllocLocal.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-19 18:34:02 +0000
committerChris Lattner <sabre@nondot.org>2004-02-19 18:34:02 +0000
commitd368c6163a54190c852838b370a62a86caafde3a (patch)
tree3222f7efc115ef87c392900b4d6fef90da2f0272 /lib/CodeGen/RegAllocLocal.cpp
parenta96478d7d6b2aee1aecad4af23506167ec16752c (diff)
Fix problem fusing spill code into instructions: we didn't update the live
variable information to take into account the change of instruction address. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11628 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocLocal.cpp')
-rw-r--r--lib/CodeGen/RegAllocLocal.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/RegAllocLocal.cpp b/lib/CodeGen/RegAllocLocal.cpp
index cbbc7c2299..188b3b3417 100644
--- a/lib/CodeGen/RegAllocLocal.cpp
+++ b/lib/CodeGen/RegAllocLocal.cpp
@@ -496,6 +496,9 @@ MachineInstr *RA::reloadVirtReg(MachineBasicBlock &MBB, MachineInstr *MI,
MachineBasicBlock::iterator MII = MI;
if (RegInfo->foldMemoryOperand(MII, OpNum, FrameIndex)) {
++NumFused;
+ // Since we changed the address of MI, make sure to update live variables
+ // to know that the new instruction has the properties of the old one.
+ LV->instructionChanged(MI, MII);
return MII;
}