Skip to content
Snippets Groups Projects
Commit 95bad854 authored by David Goodwin's avatar David Goodwin
Browse files

Check for PRE_INC and POST_INC.

llvm-svn: 75683
parent 92b969ba
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment