mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Fix ARM codegen breakage caused by r138653.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138657 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1f4a32f5ac
commit
2b568fb3ce
@ -1352,12 +1352,21 @@ SDNode *ARMDAGToDAGISel::SelectARMIndexedLoad(SDNode *N) {
|
||||
}
|
||||
|
||||
if (Match) {
|
||||
SDValue Chain = LD->getChain();
|
||||
SDValue Base = LD->getBasePtr();
|
||||
SDValue Ops[]= { Base, Offset, AMOpc, getAL(CurDAG),
|
||||
CurDAG->getRegister(0, MVT::i32), Chain };
|
||||
return CurDAG->getMachineNode(Opcode, N->getDebugLoc(), MVT::i32, MVT::i32,
|
||||
MVT::Other, Ops, 6);
|
||||
if (Opcode == ARM::LDR_PRE_IMM || Opcode == ARM::LDRB_PRE_IMM) {
|
||||
SDValue Chain = LD->getChain();
|
||||
SDValue Base = LD->getBasePtr();
|
||||
SDValue Ops[]= { Base, AMOpc, getAL(CurDAG),
|
||||
CurDAG->getRegister(0, MVT::i32), Chain };
|
||||
return CurDAG->getMachineNode(Opcode, N->getDebugLoc(), MVT::i32, MVT::i32,
|
||||
MVT::Other, Ops, 5);
|
||||
} else {
|
||||
SDValue Chain = LD->getChain();
|
||||
SDValue Base = LD->getBasePtr();
|
||||
SDValue Ops[]= { Base, Offset, AMOpc, getAL(CurDAG),
|
||||
CurDAG->getRegister(0, MVT::i32), Chain };
|
||||
return CurDAG->getMachineNode(Opcode, N->getDebugLoc(), MVT::i32, MVT::i32,
|
||||
MVT::Other, Ops, 6);
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user