make 0 codegen much better

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25131 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Lenharth 2006-01-06 19:41:51 +00:00
parent 4f637d4db1
commit 919e666d8c

View File

@ -241,6 +241,10 @@ SDOperand AlphaDAGToDAGISel::Select(SDOperand Op) {
}
case ISD::Constant: {
uint64_t uval = cast<ConstantSDNode>(N)->getValue();
if (uval == 0)
return CurDAG->getCopyFromReg(CurDAG->getEntryNode(), Alpha::R31, MVT::i64);
int64_t val = (int64_t)uval;
int32_t val32 = (int32_t)val;
if (val <= IMM_HIGH + IMM_HIGH * IMM_MULT &&