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

Durgadoss R via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 4 02:45:01 PDT 2024


================
@@ -4626,6 +4742,11 @@ void IEEEFloat::makeInf(bool Negative) {
 }
 
 void IEEEFloat::makeZero(bool Negative) {
+  // The E8M0 type cannot represent the value zero.
+  if (semantics == &semFloat8E8M0FN) {
+    assert(false && "This floating point format does not support Zero\n");
----------------
durga4github wrote:

Agreed, Converted it to an llvm_unreachable().

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


More information about the llvm-commits mailing list