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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 15 11:44:14 PDT 2024


================
@@ -1727,6 +1752,8 @@ IEEEFloat::opStatus IEEEFloat::normalize(roundingMode rounding_mode,
   /* Canonicalize zeroes.  */
   if (omsb == 0) {
     category = fcZero;
+    if (!APFloat::hasZero(*semantics))
+      makeSmallestNormalized(false);
----------------
arsenm wrote:

Not sure why you need to do anything here, or why the category is fcZero if there is no zero 

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


More information about the llvm-commits mailing list