[llvm-commits] [llvm] r47864 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Dan Gohman
gohman at apple.com
Mon Mar 3 14:20:46 PST 2008
Author: djg
Date: Mon Mar 3 16:20:46 2008
New Revision: 47864
URL: http://llvm.org/viewvc/llvm-project?rev=47864&view=rev
Log:
More APInt-ification.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=47864&r1=47863&r2=47864&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon Mar 3 16:20:46 2008
@@ -5760,9 +5760,10 @@
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: {
More information about the llvm-commits
mailing list