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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu May 9 06:26:19 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;
----------------
arsenm wrote:

Best to follow the ValueTracking naming and call this cannotBeOrderedLessThanZero

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


More information about the llvm-commits mailing list