diff options
author | Dan Gohman <gohman@apple.com> | 2008-03-10 23:38:17 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-03-10 23:38:17 +0000 |
commit | 830d86cab8df19417e9dba2675ccd2720c15b023 (patch) | |
tree | 070a8bc4b24372af287b71ee46dd4ebae4e46976 /llvm/lib/CodeGen | |
parent | de66dc88cdf71d40ea7cb6d86038c73b0d6bd60d (diff) | |
download | bcm5719-llvm-830d86cab8df19417e9dba2675ccd2720c15b023.tar.gz bcm5719-llvm-830d86cab8df19417e9dba2675ccd2720c15b023.zip |
APInt-ify this.
llvm-svn: 48194
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeTypesExpand.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeTypesExpand.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeTypesExpand.cpp index 61ab510323c..9b228006889 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeTypesExpand.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeTypesExpand.cpp @@ -106,9 +106,10 @@ void DAGTypeLegalizer::ExpandResult_UNDEF(SDNode *N, void DAGTypeLegalizer::ExpandResult_Constant(SDNode *N, SDOperand &Lo, SDOperand &Hi) { MVT::ValueType NVT = TLI.getTypeToTransformTo(N->getValueType(0)); - uint64_t Cst = cast<ConstantSDNode>(N)->getValue(); - Lo = DAG.getConstant(Cst, NVT); - Hi = DAG.getConstant(Cst >> MVT::getSizeInBits(NVT), NVT); + unsigned NBitWidth = MVT::getSizeInBits(NVT); + const APInt &Cst = cast<ConstantSDNode>(N)->getAPIntValue(); + Lo = DAG.getConstant(APInt(Cst).trunc(NBitWidth), NVT); + Hi = DAG.getConstant(Cst.lshr(NBitWidth).trunc(NBitWidth), NVT); } void DAGTypeLegalizer::ExpandResult_BUILD_PAIR(SDNode *N, |