[llvm] [APFloat] Add APFloat support for E8M0 type (PR #107127)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 4 04:55:59 PDT 2024
================
@@ -1075,6 +1099,11 @@ bool IEEEFloat::isSignificandAllOnesExceptLSB() const {
}
bool IEEEFloat::isSignificandAllZeros() const {
+ // For the E8M0 format, this is always true since there are no
+ // actual significand bits.
+ if (semantics == &semFloat8E8M0FN)
+ return true;
----------------
arsenm wrote:
I would assume it's possible to rework the code to handle 0 part count instead of an explicit check. I'm also wondering if this is exotic enough to be its own subclass of APFloatBase instead of pretending it's IEEEfloat since it's reached a new level of degeneracy
https://github.com/llvm/llvm-project/pull/107127
More information about the llvm-commits
mailing list