Changeset View
Changeset View
Standalone View
Standalone View
llvm/trunk/lib/Target/Mips/MipsSEISelDAGToDAG.cpp
Show First 20 Lines • Show All 1,182 Lines • ▼ Show 20 Lines | if (SplatValue.isSignedIntN(10)) { | ||||
// We have 3 cases: | // We have 3 cases: | ||||
// The HiRes is nonzero but Res is $zero => dsll32 HiRes, 0 | // The HiRes is nonzero but Res is $zero => dsll32 HiRes, 0 | ||||
// The Res is nonzero but HiRes is $zero => dinsu Res, $zero, 32, 32 | // The Res is nonzero but HiRes is $zero => dinsu Res, $zero, 32, 32 | ||||
// Both are non zero => dinsu Res, HiRes, 32, 32 | // Both are non zero => dinsu Res, HiRes, 32, 32 | ||||
// | // | ||||
// The obvious "missing" case is when both are zero, but that case is | // The obvious "missing" case is when both are zero, but that case is | ||||
// handled by the ldi case. | // handled by the ldi case. | ||||
if (ResNonZero) { | if (ResNonZero) { | ||||
IntegerType *Int32Ty = | |||||
IntegerType::get(MF->getFunction()->getContext(), 32); | |||||
const ConstantInt *Const32 = ConstantInt::get(Int32Ty, 32); | |||||
SDValue Ops[4] = {HiResNonZero ? SDValue(HiRes, 0) : Zero64Val, | SDValue Ops[4] = {HiResNonZero ? SDValue(HiRes, 0) : Zero64Val, | ||||
CurDAG->getTargetConstant(64, DL, MVT::i32), | CurDAG->getConstant(*Const32, DL, MVT::i32), | ||||
CurDAG->getTargetConstant(32, DL, MVT::i32), | CurDAG->getConstant(*Const32, DL, MVT::i32), | ||||
SDValue(Res, 0)}; | SDValue(Res, 0)}; | ||||
Res = CurDAG->getMachineNode(Mips::DINSU, DL, MVT::i64, Ops); | Res = CurDAG->getMachineNode(Mips::DINSU, DL, MVT::i64, Ops); | ||||
} else if (HiResNonZero) { | } else if (HiResNonZero) { | ||||
Res = CurDAG->getMachineNode( | Res = CurDAG->getMachineNode( | ||||
Mips::DSLL32, DL, MVT::i64, SDValue(HiRes, 0), | Mips::DSLL32, DL, MVT::i64, SDValue(HiRes, 0), | ||||
CurDAG->getTargetConstant(0, DL, MVT::i32)); | CurDAG->getTargetConstant(0, DL, MVT::i32)); | ||||
} else | } else | ||||
▲ Show 20 Lines • Show All 104 Lines • Show Last 20 Lines |