Change ConstantSDNode and ConstantFPSDNode to use ConstantInt* and
[oota-llvm.git] / lib / CodeGen / SelectionDAG / SelectionDAGBuild.cpp
index 51f7a75b6bb6ae1e270818924d0fe67c7c740d39..a95a50bea72d4d5f835452d2eea2c7326a852e6b 100644 (file)
@@ -794,7 +794,7 @@ SDValue SelectionDAGLowering::getValue(const Value *V) {
     MVT VT = TLI.getValueType(V->getType(), true);
     
     if (ConstantInt *CI = dyn_cast<ConstantInt>(C))
-      return N = DAG.getConstant(CI->getValue(), VT);
+      return N = DAG.getConstant(*CI, VT);
 
     if (GlobalValue *GV = dyn_cast<GlobalValue>(C))
       return N = DAG.getGlobalAddress(GV, VT);
@@ -803,7 +803,7 @@ SDValue SelectionDAGLowering::getValue(const Value *V) {
       return N = DAG.getConstant(0, TLI.getPointerTy());
     
     if (ConstantFP *CFP = dyn_cast<ConstantFP>(C))
-      return N = DAG.getConstantFP(CFP->getValueAPF(), VT);
+      return N = DAG.getConstantFP(*CFP, VT);
     
     if (isa<UndefValue>(C) && !isa<VectorType>(V->getType()) &&
         !V->getType()->isAggregateType())