Check for PRE_INC and POST_INC.

llvm-svn: 75683
This commit is contained in:
David Goodwin 2009-07-14 21:29:29 +00:00
parent 92b969ba80
commit 95bad85498
1 changed files with 1 additions and 1 deletions

View File

@ -644,7 +644,7 @@ bool ARMDAGToDAGISel::SelectT2AddrModeImm8Offset(SDValue Op, SDValue N,
if (ConstantSDNode *RHS = dyn_cast<ConstantSDNode>(N)) {
int RHSC = (int)RHS->getZExtValue();
if (RHSC >= 0 && RHSC < 0x100) { // 8 bits.
OffImm = (AM == ISD::PRE_INC)
OffImm = ((AM == ISD::PRE_INC) || (AM == ISD::POST_INC))
? CurDAG->getTargetConstant(RHSC, MVT::i32)
: CurDAG->getTargetConstant(-RHSC, MVT::i32);
return true;