add the correct fallback for ARMDAGToDAGISel::SelectAddrMode1

llvm-svn: 30261
This commit is contained in:
Rafael Espindola 2006-09-11 19:23:32 +00:00
parent f37b4ee4c2
commit bccf9c2f1b
1 changed files with 3 additions and 6 deletions

View File

@ -482,19 +482,16 @@ static bool isInt12Immediate(SDOperand Op, short &Imm) {
bool ARMDAGToDAGISel::SelectAddrMode1(SDOperand N, bool ARMDAGToDAGISel::SelectAddrMode1(SDOperand N,
SDOperand &Arg) { SDOperand &Arg) {
switch(N.getOpcode()) { switch(N.getOpcode()) {
case ISD::CopyFromReg:
Arg = N;
return true;
case ISD::Constant: { case ISD::Constant: {
//TODO:check that we have a valid constant //TODO:check that we have a valid constant
int32_t t = cast<ConstantSDNode>(N)->getValue(); int32_t t = cast<ConstantSDNode>(N)->getValue();
Arg = CurDAG->getTargetConstant(t, MVT::i32); Arg = CurDAG->getTargetConstant(t, MVT::i32);
return true; return true;
} }
default:
std::cerr << "OpCode = " << N.getOpcode() << "\n";
assert(0);
} }
Arg = N;
return true;
} }
//register plus/minus 12 bit offset //register plus/minus 12 bit offset