[llvm-branch-commits] [llvm] ValueTracking: x - floor(x) cannot introduce overflow (PR #189003)
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Mar 27 11:52:22 PDT 2026
================
@@ -4977,7 +4977,15 @@ static constexpr KnownFPClass::MinMaxKind getMinMaxKind(Intrinsic::ID IID) {
/// \return true if this is a floating point value that is known to have a
/// magnitude smaller than 1. i.e., fabs(X) <= 1.0
static bool isAbsoluteValueLessEqualOne(const Value *V) {
- // TODO: Handle frexp and x - floor(x)?
+ // TODO: Handle frexp
+ // TODO: Other rounding intrinsics?
+
+ // fabs(x - floor(x)) <= 1
----------------
arsenm wrote:
For the purposes of this function, it doesn't matter. It only cares about the ordered magnitude
https://github.com/llvm/llvm-project/pull/189003
More information about the llvm-branch-commits
mailing list