add the correct fallback for ARMDAGToDAGISel::SelectAddrMode1

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30261 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2006-09-11 19:23:32 +00:00
parent b082f8648b
commit 1b3956b516

View File

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