@@ -428,40 +428,6 @@ ConstantFPRange ConstantFPRange::getWithoutInf() const {
428428 MayBeSNaN);
429429}
430430
431- ConstantFPRange ConstantFPRange::abs () const {
432- if (isNaNOnly ())
433- return *this ;
434- // Check if the range is all non-negative or all non-positive.
435- if (Lower.isNegative () == Upper.isNegative ()) {
436- if (Lower.isNegative ())
437- return negate ();
438- return *this ;
439- }
440- // The range contains both positive and negative values.
441- APFloat NewLower = APFloat::getZero (getSemantics ());
442- APFloat NewUpper = maxnum (-Lower, Upper);
443- return ConstantFPRange (std::move (NewLower), std::move (NewUpper), MayBeQNaN,
444- MayBeSNaN);
445- }
446-
447- ConstantFPRange ConstantFPRange::negate () const {
448- return ConstantFPRange (-Upper, -Lower, MayBeQNaN, MayBeSNaN);
449- }
450-
451- ConstantFPRange ConstantFPRange::getWithoutInf () const {
452- if (isNaNOnly ())
453- return *this ;
454- APFloat NewLower = Lower;
455- APFloat NewUpper = Upper;
456- if (Lower.isNegInfinity ())
457- NewLower = APFloat::getLargest (getSemantics (), /* Negative=*/ true );
458- if (Upper.isPosInfinity ())
459- NewUpper = APFloat::getLargest (getSemantics (), /* Negative=*/ false );
460- canonicalizeRange (NewLower, NewUpper);
461- return ConstantFPRange (std::move (NewLower), std::move (NewUpper), MayBeQNaN,
462- MayBeSNaN);
463- }
464-
465431ConstantFPRange ConstantFPRange::cast (const fltSemantics &DstSem,
466432 APFloat::roundingMode RM) const {
467433 bool LosesInfo;
0 commit comments