Lines Matching refs:APFloat

74 bool ConstantFPSDNode::isExactlyValue(const APFloat& V) const {  in isExactlyValue()
79 const APFloat& Val) { in isValueValidForType()
83 APFloat Val2 = APFloat(Val); in isValueValidForType()
86 APFloat::rmNearestTiesToEven, in isValueValidForType()
1203 SDValue SelectionDAG::getConstantFP(const APFloat& V, EVT VT, bool isTarget) { in getConstantFP()
1244 return getConstantFP(APFloat((float)Val), VT, isTarget); in getConstantFP()
1246 return getConstantFP(APFloat(Val), VT, isTarget); in getConstantFP()
1250 APFloat apf = APFloat(Val); in getConstantFP()
1251 apf.convert(EVTToAPFloatSemantics(EltVT), APFloat::rmNearestTiesToEven, in getConstantFP()
1884 APFloat::cmpResult R = N1C->getValueAPF().compare(N2C->getValueAPF()); in FoldSetCC()
1887 case ISD::SETEQ: if (R==APFloat::cmpUnordered) in FoldSetCC()
1890 case ISD::SETOEQ: return getConstant(R==APFloat::cmpEqual, VT); in FoldSetCC()
1891 case ISD::SETNE: if (R==APFloat::cmpUnordered) in FoldSetCC()
1894 case ISD::SETONE: return getConstant(R==APFloat::cmpGreaterThan || in FoldSetCC()
1895 R==APFloat::cmpLessThan, VT); in FoldSetCC()
1896 case ISD::SETLT: if (R==APFloat::cmpUnordered) in FoldSetCC()
1899 case ISD::SETOLT: return getConstant(R==APFloat::cmpLessThan, VT); in FoldSetCC()
1900 case ISD::SETGT: if (R==APFloat::cmpUnordered) in FoldSetCC()
1903 case ISD::SETOGT: return getConstant(R==APFloat::cmpGreaterThan, VT); in FoldSetCC()
1904 case ISD::SETLE: if (R==APFloat::cmpUnordered) in FoldSetCC()
1907 case ISD::SETOLE: return getConstant(R==APFloat::cmpLessThan || in FoldSetCC()
1908 R==APFloat::cmpEqual, VT); in FoldSetCC()
1909 case ISD::SETGE: if (R==APFloat::cmpUnordered) in FoldSetCC()
1912 case ISD::SETOGE: return getConstant(R==APFloat::cmpGreaterThan || in FoldSetCC()
1913 R==APFloat::cmpEqual, VT); in FoldSetCC()
1914 case ISD::SETO: return getConstant(R!=APFloat::cmpUnordered, VT); in FoldSetCC()
1915 case ISD::SETUO: return getConstant(R==APFloat::cmpUnordered, VT); in FoldSetCC()
1916 case ISD::SETUEQ: return getConstant(R==APFloat::cmpUnordered || in FoldSetCC()
1917 R==APFloat::cmpEqual, VT); in FoldSetCC()
1918 case ISD::SETUNE: return getConstant(R!=APFloat::cmpEqual, VT); in FoldSetCC()
1919 case ISD::SETULT: return getConstant(R==APFloat::cmpUnordered || in FoldSetCC()
1920 R==APFloat::cmpLessThan, VT); in FoldSetCC()
1921 case ISD::SETUGT: return getConstant(R==APFloat::cmpGreaterThan || in FoldSetCC()
1922 R==APFloat::cmpUnordered, VT); in FoldSetCC()
1923 case ISD::SETULE: return getConstant(R!=APFloat::cmpGreaterThan, VT); in FoldSetCC()
1924 case ISD::SETUGE: return getConstant(R!=APFloat::cmpLessThan, VT); in FoldSetCC()
2753 APFloat apf(EVTToAPFloatSemantics(VT), in getNode()
2757 APFloat::rmNearestTiesToEven); in getNode()
2762 return getConstantFP(APFloat(APFloat::IEEEhalf, Val), VT); in getNode()
2764 return getConstantFP(APFloat(APFloat::IEEEsingle, Val), VT); in getNode()
2766 return getConstantFP(APFloat(APFloat::IEEEdouble, Val), VT); in getNode()
2787 APFloat V = C->getValueAPF(); // make copy in getNode()
2796 APFloat::opStatus fs = V.roundToIntegral(APFloat::rmTowardPositive); in getNode()
2797 if (fs == APFloat::opOK || fs == APFloat::opInexact) in getNode()
2802 APFloat::opStatus fs = V.roundToIntegral(APFloat::rmTowardZero); in getNode()
2803 if (fs == APFloat::opOK || fs == APFloat::opInexact) in getNode()
2808 APFloat::opStatus fs = V.roundToIntegral(APFloat::rmTowardNegative); in getNode()
2809 if (fs == APFloat::opOK || fs == APFloat::opInexact) in getNode()
2818 APFloat::rmNearestTiesToEven, &ignored); in getNode()
2827 APFloat::opStatus s = V.convertToInteger(x, VT.getSizeInBits(), in getNode()
2829 APFloat::rmTowardZero, &ignored); in getNode()
2830 if (s==APFloat::opInvalidOp) // inexact is OK, in fact usual in getNode()
3495 APFloat V1 = N1CFP->getValueAPF(), V2 = N2CFP->getValueAPF(); in getNode()
3496 APFloat::opStatus s; in getNode()
3499 s = V1.add(V2, APFloat::rmNearestTiesToEven); in getNode()
3500 if (!HasFPExceptions || s != APFloat::opInvalidOp) in getNode()
3504 s = V1.subtract(V2, APFloat::rmNearestTiesToEven); in getNode()
3505 if (!HasFPExceptions || s!=APFloat::opInvalidOp) in getNode()
3509 s = V1.multiply(V2, APFloat::rmNearestTiesToEven); in getNode()
3510 if (!HasFPExceptions || s!=APFloat::opInvalidOp) in getNode()
3514 s = V1.divide(V2, APFloat::rmNearestTiesToEven); in getNode()
3515 if (!HasFPExceptions || (s!=APFloat::opInvalidOp && in getNode()
3516 s!=APFloat::opDivByZero)) { in getNode()
3521 s = V1.mod(V2, APFloat::rmNearestTiesToEven); in getNode()
3522 if (!HasFPExceptions || (s!=APFloat::opInvalidOp && in getNode()
3523 s!=APFloat::opDivByZero)) { in getNode()
3535 APFloat V = N1CFP->getValueAPF(); // make copy in getNode()
3540 APFloat::rmNearestTiesToEven, &ignored); in getNode()
3655 APFloat V1 = N1CFP->getValueAPF(); in getNode()
3656 const APFloat &V2 = N2CFP->getValueAPF(); in getNode()
3657 const APFloat &V3 = N3CFP->getValueAPF(); in getNode()
3658 APFloat::opStatus s = in getNode()
3659 V1.fusedMultiplyAdd(V2, V3, APFloat::rmNearestTiesToEven); in getNode()
3660 if (!TLI->hasFloatingPointExceptions() || s != APFloat::opInvalidOp) in getNode()
3797 return DAG.getConstantFP(APFloat(DAG.EVTToAPFloatSemantics(VT), Val), VT); in getMemsetValue()