[llvm-branch-commits] [llvm-branch] r120658 - /llvm/branches/Apple/whitney/lib/Target/ARM/ARMFastISel.cpp
Daniel Dunbar
daniel at zuster.org
Wed Dec 1 18:51:51 PST 2010
Author: ddunbar
Date: Wed Dec 1 20:51:51 2010
New Revision: 120658
URL: http://llvm.org/viewvc/llvm-project?rev=120658&view=rev
Log:
Merge r119911:
--
Author: Eric Christopher <echristo at apple.com>
Date: Sat Nov 20 22:01:38 2010 +0000
STRH only needs the additional operand, not t2STRH. Also invert conditional
to match the one from the load emitter above.
Modified:
llvm/branches/Apple/whitney/lib/Target/ARM/ARMFastISel.cpp
Modified: llvm/branches/Apple/whitney/lib/Target/ARM/ARMFastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/whitney/lib/Target/ARM/ARMFastISel.cpp?rev=120658&r1=120657&r2=120658&view=diff
==============================================================================
--- llvm/branches/Apple/whitney/lib/Target/ARM/ARMFastISel.cpp (original)
+++ llvm/branches/Apple/whitney/lib/Target/ARM/ARMFastISel.cpp Wed Dec 1 20:51:51 2010
@@ -843,7 +843,6 @@
bool ARMFastISel::ARMEmitStore(EVT VT, unsigned SrcReg, Address &Addr) {
unsigned StrOpc;
bool isFloat = false;
- bool needReg0Op = false;
switch (VT.getSimpleVT().SimpleTy) {
default: return false;
case MVT::i1: {
@@ -860,7 +859,6 @@
break;
case MVT::i16:
StrOpc = isThumb ? ARM::t2STRHi12 : ARM::STRH;
- needReg0Op = true;
break;
case MVT::i32:
StrOpc = isThumb ? ARM::t2STRi12 : ARM::STRi12;
@@ -884,18 +882,16 @@
if (isFloat)
Addr.Offset /= 4;
- // FIXME: The 'needReg0Op' bit goes away once STRH is converted to
- // not use the mega-addrmode stuff.
- if (!needReg0Op)
+ // ARM::STRH needs an additional operand.
+ if (!isThumb && VT.getSimpleVT().SimpleTy == MVT::i16)
AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
TII.get(StrOpc))
- .addReg(SrcReg).addReg(Addr.Base.Reg).addImm(Addr.Offset));
+ .addReg(SrcReg).addReg(Addr.Base.Reg)
+ .addReg(0).addImm(Addr.Offset));
else
AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
TII.get(StrOpc))
- .addReg(SrcReg).addReg(Addr.Base.Reg)
- .addReg(0).addImm(Addr.Offset));
-
+ .addReg(SrcReg).addReg(Addr.Base.Reg).addImm(Addr.Offset));
return true;
}
More information about the llvm-branch-commits
mailing list