diff options
author | Dan Gohman <gohman@apple.com> | 2008-03-03 22:20:46 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-03-03 22:20:46 +0000 |
commit | 050f550aeb3938d8e202156473fac5eabf0fa703 (patch) | |
tree | 259621465c0695d5429ccf1f8f1ff5c8a3b82304 /lib/CodeGen/SelectionDAG | |
parent | 7194aaf738a1b89441635340403f1c5b06ae18ef (diff) |
More APInt-ification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47864 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG')
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index c28c2f9236..0dc4447343 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<ConstantSDNode>(Node)->getValue(); - Lo = DAG.getConstant(Cst, NVT); - Hi = DAG.getConstant(Cst >> MVT::getSizeInBits(NVT), NVT); + unsigned NVTBits = MVT::getSizeInBits(NVT); + const APInt &Cst = cast<ConstantSDNode>(Node)->getAPIntValue(); + Lo = DAG.getConstant(APInt(Cst).trunc(NVTBits), NVT); + Hi = DAG.getConstant(Cst.lshr(NVTBits).trunc(NVTBits), NVT); break; } case ISD::ConstantFP: { |