[llvm] [DAG] Lower frem of power-2 using div/trunc/mul+sub (PR #91148)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Thu May 9 06:32:54 PDT 2024


================
@@ -2111,6 +2115,10 @@ class SelectionDAG {
   /// Test whether the given SDValue is known to contain non-zero value(s).
   bool isKnownNeverZero(SDValue Op, unsigned Depth = 0) const;
 
+  /// Test whether the given float value is known to be positive. +0.0, +inf and
+  /// +nan are considered positive, -0.0, -inf and -nan are not.
+  bool isKnownPositiveOrNaNFP(SDValue Op) const;
----------------
jayfoad wrote:

Right, you can only call it that if you're happy with the semantics change too, which is that it would return true for -0.0.

https://github.com/llvm/llvm-project/pull/91148


More information about the llvm-commits mailing list