From: Dan Gohman Date: Mon, 3 Mar 2008 22:20:46 +0000 (+0000) Subject: More APInt-ification. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=050f550aeb3938d8e202156473fac5eabf0fa703;p=oota-llvm.git More APInt-ification. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47864 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index c28c2f9236d..0dc4447343f 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -5760,9 +5760,10 @@ void SelectionDAGLegalize::ExpandOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi){ Hi = DAG.getNode(ISD::UNDEF, NVT); break; case ISD::Constant: { - uint64_t Cst = cast(Node)->getValue(); - Lo = DAG.getConstant(Cst, NVT); - Hi = DAG.getConstant(Cst >> MVT::getSizeInBits(NVT), NVT); + unsigned NVTBits = MVT::getSizeInBits(NVT); + const APInt &Cst = cast(Node)->getAPIntValue(); + Lo = DAG.getConstant(APInt(Cst).trunc(NVTBits), NVT); + Hi = DAG.getConstant(Cst.lshr(NVTBits).trunc(NVTBits), NVT); break; } case ISD::ConstantFP: {