[PATCH] D148674: ValueTracking: Handle frem in computeKnownFPClass

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 25 05:47:49 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4699
+        // X % X is always exactly 0.0 or a NaN.
+        Known.KnownFPClasses = fcNan | fcPosZero;
+      }
----------------
foad wrote:
> fcPosZero seems wrong. Wouldn't the result be -0 if X is -ve?
No, the signs cancel and the divide is exact. The only case to worry about would be frem -0, -0 but that's nan.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148674/new/

https://reviews.llvm.org/D148674



More information about the llvm-commits mailing list