diff options
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 01ec5c968a..85a76f436b 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -109,13 +109,12 @@ bool ISD::isBuildVectorAllOnes(const SDNode *N) { } else if (isa<ConstantFPSDNode>(NotZero)) { MVT::ValueType VT = NotZero.getValueType(); if (VT== MVT::f64) { - if (DoubleToBits(cast<ConstantFPSDNode>(NotZero)-> - getValueAPF().convertToDouble()) != - (uint64_t)-1) + if (*((cast<ConstantFPSDNode>(NotZero)->getValueAPF(). + convertToAPInt().getRawData())) != (uint64_t)-1) return false; } else { - if (FloatToBits(cast<ConstantFPSDNode>(NotZero)-> - getValueAPF().convertToFloat()) != + if ((uint32_t)*cast<ConstantFPSDNode>(NotZero)-> + getValueAPF().convertToAPInt().getRawData() != (uint32_t)-1) return false; } @@ -1698,9 +1697,9 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT, } case ISD::BIT_CONVERT: if (VT == MVT::i32 && C->getValueType(0) == MVT::f32) - return getConstant(FloatToBits(V.convertToFloat()), VT); + return getConstant((uint32_t)*V.convertToAPInt().getRawData(), VT); else if (VT == MVT::i64 && C->getValueType(0) == MVT::f64) - return getConstant(DoubleToBits(V.convertToDouble()), VT); + return getConstant(*V.convertToAPInt().getRawData(), VT); break; } } |