diff options
| author | Chris Lattner <sabre@nondot.org> | 2008-04-20 00:41:09 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2008-04-20 00:41:09 +0000 | 
| commit | 3b18762f40751b09d52bd3224ed634586eec9265 (patch) | |
| tree | 5691959280dc91a9e10f6de3deaee2ee00b3c173 /llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | |
| parent | d3018e6a0e459066850b851d5de568656a1c1983 (diff) | |
| download | bcm5719-llvm-3b18762f40751b09d52bd3224ed634586eec9265.tar.gz bcm5719-llvm-3b18762f40751b09d52bd3224ed634586eec9265.zip  | |
Switch to using Simplified ConstantFP::get API.
llvm-svn: 49977
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 13 | 
1 files changed, 6 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 18d1d1853e0..5f260ece552 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -491,8 +491,7 @@ static SDOperand ExpandConstantFP(ConstantFPSDNode *CFP, bool UseCP,    // an FP extending load is the same cost as a normal load (such as on the x87    // fp stack or PPC FP unit).    MVT::ValueType VT = CFP->getValueType(0); -  ConstantFP *LLVMC = ConstantFP::get(MVT::getTypeForValueType(VT), -                                      CFP->getValueAPF()); +  ConstantFP *LLVMC = ConstantFP::get(CFP->getValueAPF());    if (!UseCP) {      if (VT!=MVT::f64 && VT!=MVT::f32)        assert(0 && "Invalid type expansion"); @@ -4901,18 +4900,18 @@ SDOperand SelectionDAGLegalize::ExpandBUILD_VECTOR(SDNode *Node) {    // If all elements are constants, create a load from the constant pool.    if (isConstant) {      MVT::ValueType VT = Node->getValueType(0); -    const Type *OpNTy =  -      MVT::getTypeForValueType(Node->getOperand(0).getValueType());      std::vector<Constant*> CV;      for (unsigned i = 0, e = NumElems; i != e; ++i) {        if (ConstantFPSDNode *V =             dyn_cast<ConstantFPSDNode>(Node->getOperand(i))) { -        CV.push_back(ConstantFP::get(OpNTy, V->getValueAPF())); +        CV.push_back(ConstantFP::get(V->getValueAPF()));        } else if (ConstantSDNode *V =  -                 dyn_cast<ConstantSDNode>(Node->getOperand(i))) { -        CV.push_back(ConstantInt::get(OpNTy, V->getValue())); +                   dyn_cast<ConstantSDNode>(Node->getOperand(i))) { +        CV.push_back(ConstantInt::get(V->getAPIntValue()));        } else {          assert(Node->getOperand(i).getOpcode() == ISD::UNDEF); +        const Type *OpNTy =  +          MVT::getTypeForValueType(Node->getOperand(0).getValueType());          CV.push_back(UndefValue::get(OpNTy));        }      }  | 

