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

Diego Caballero via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 5 11:36:53 PDT 2024


================
@@ -4626,6 +4742,10 @@ void IEEEFloat::makeInf(bool Negative) {
 }
 
 void IEEEFloat::makeZero(bool Negative) {
+  // The E8M0 type cannot represent the value zero.
+  if (semantics == &semFloat8E8M0FN)
----------------
dcaballe wrote:

use `hasZero` query?

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


More information about the llvm-commits mailing list