Skip to content

Commit

Permalink
ValueTracking: Really remove CannotBeOrderedLessThanZero
Browse files Browse the repository at this point in the history
6640df9 did not actually remove it,
just its final user. cannotBeOrderedLessThanZeroImpl still has a user
which needs to be updated before it can be removed.

The users of SignBitMustBeZero currently have broken expectations for
nan handling, so requires more work to replace.
  • Loading branch information
arsenm committed Aug 7, 2023
1 parent 0b17e9d commit 1d9f77f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
3 changes: 0 additions & 3 deletions llvm/include/llvm/Analysis/ValueTracking.h
Original file line number Diff line number Diff line change
Expand Up @@ -490,9 +490,6 @@ inline bool cannotBeNegativeZero(const Value *V, const DataLayout &DL,
return Known.isKnownNeverNegZero();
}

bool CannotBeOrderedLessThanZero(const Value *V, const DataLayout &DL,
const TargetLibraryInfo *TLI);

/// Return true if we can prove that the specified FP value is either NaN or
/// never less than -0.0.
///
Expand Down
8 changes: 3 additions & 5 deletions llvm/lib/Analysis/ValueTracking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3650,6 +3650,8 @@ Intrinsic::ID llvm::getIntrinsicForCallSite(const CallBase &CB,
return Intrinsic::not_intrinsic;
}

/// Deprecated, use computeKnownFPClass instead.
///
/// If \p SignBitOnly is true, test for a known 0 sign bit rather than a
/// standard ordered compare. e.g. make -0.0 olt 0.0 be true because of the sign
/// bit despite comparing equal.
Expand Down Expand Up @@ -3841,13 +3843,9 @@ static bool cannotBeOrderedLessThanZeroImpl(const Value *V,
return false;
}

bool llvm::CannotBeOrderedLessThanZero(const Value *V, const DataLayout &DL,
const TargetLibraryInfo *TLI) {
return cannotBeOrderedLessThanZeroImpl(V, DL, TLI, false, 0);
}

bool llvm::SignBitMustBeZero(const Value *V, const DataLayout &DL,
const TargetLibraryInfo *TLI) {
// FIXME: Use computeKnownFPClass and pass all arguments
return cannotBeOrderedLessThanZeroImpl(V, DL, TLI, true, 0);
}

Expand Down

0 comments on commit 1d9f77f

Please sign in to comment.