projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0e23c5
)
When using multiple instructions to reference a frame index, make sure to
author
Jim Grosbach
<grosbach@apple.com>
Thu, 9 Dec 2010 01:22:13 +0000
(
01:22
+0000)
committer
Jim Grosbach
<grosbach@apple.com>
Thu, 9 Dec 2010 01:22:13 +0000
(
01:22
+0000)
update the opcode when necessary as well as the source register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121346
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Target/ARM/ARMBaseRegisterInfo.cpp
patch
|
blob
|
history
diff --git
a/lib/Target/ARM/ARMBaseRegisterInfo.cpp
b/lib/Target/ARM/ARMBaseRegisterInfo.cpp
index 3e7c1c3075b4fe5bd4811f098bef6b8e243d53d9..bdecaca37d0ece0002c2550e516a625b31d32cc7 100644
(file)
--- a/
lib/Target/ARM/ARMBaseRegisterInfo.cpp
+++ b/
lib/Target/ARM/ARMBaseRegisterInfo.cpp
@@
-1209,7
+1209,12
@@
ARMBaseRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
emitT2RegPlusImmediate(MBB, II, MI.getDebugLoc(), ScratchReg, FrameReg,
Offset, Pred, PredReg, TII);
}
+ // Update the original instruction to use the scratch register.
MI.getOperand(i).ChangeToRegister(ScratchReg, false, false, true);
+ if (MI.getOpcode() == ARM::t2ADDrSPi)
+ MI.setDesc(TII.get(ARM::t2ADDri));
+ else if (MI.getOpcode() == ARM::t2SUBrSPi)
+ MI.setDesc(TII.get(ARM::t2SUBri));
}
}