[llvm] [APFloat] Add APFloat support for E8M0 type (PR #107127)

Durgadoss R via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 6 06:37:34 PDT 2024


================
@@ -1091,6 +1103,31 @@ class APFloat : public APFloatBase {
     }
   }
 
+  /// Returns true if the given semantics can represent Zero.
+  ///
+  /// \param Sem - type float semantics
+  static bool hasZero(const fltSemantics &Sem) {
+    switch (SemanticsToEnum(Sem)) {
----------------
durga4github wrote:

Yes, that makes sense for now, since there is only one type.
Fixed it in the latest revision.

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


More information about the llvm-commits mailing list