[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
================
@@ -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;
----------------
dcaballe wrote:
Orthogonal to the discussion above but if we moved forward with the early exit, could we implement it using `hasExponentOnly()` to cover any other future cases?
https://github.com/llvm/llvm-project/pull/107127
More information about the llvm-commits
mailing list