Skip to content

Commit c797835

Browse files
committed
[ConstantFPRange] Fix conflits after rebasing
1 parent 89736bb commit c797835

File tree

2 files changed

+0
-50
lines changed

2 files changed

+0
-50
lines changed

llvm/include/llvm/IR/ConstantFPRange.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -217,22 +217,6 @@ class [[nodiscard]] ConstantFPRange {
217217
/// range of operands/results.
218218
LLVM_ABI ConstantFPRange getWithoutInf() const;
219219

220-
/// Calculate absolute value range.
221-
LLVM_ABI ConstantFPRange abs() const;
222-
223-
/// Calculate range of negated values.
224-
LLVM_ABI ConstantFPRange negate() const;
225-
226-
/// Get the range without NaNs. It is useful when we apply nnan flag to range
227-
/// of operands/results.
228-
ConstantFPRange getWithoutNaN() const {
229-
return ConstantFPRange(Lower, Upper, false, false);
230-
}
231-
232-
/// Get the range without infinities. It is useful when we apply ninf flag to
233-
/// range of operands/results.
234-
LLVM_ABI ConstantFPRange getWithoutInf() const;
235-
236220
/// Return a new range in the specified format with the specified rounding
237221
/// mode.
238222
LLVM_ABI ConstantFPRange

llvm/lib/IR/ConstantFPRange.cpp

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
465431
ConstantFPRange ConstantFPRange::cast(const fltSemantics &DstSem,
466432
APFloat::roundingMode RM) const {
467433
bool LosesInfo;

0 commit comments

Comments
 (0)