[llvm] [APFloat] Add APFloat support for E8M0 type (PR #107127)
Thorsten Schütt via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 3 13:22:24 PDT 2024
================
@@ -1091,6 +1100,26 @@ class APFloat : public APFloatBase {
}
}
+ static bool hasZero(const fltSemantics &Sem) {
+ switch (SemanticsToEnum(Sem)) {
+ default:
+ return true;
+ // The Float8E8M0FN does not have an encoding for Zeroes.
+ case APFloat::S_Float8E8M0FN:
+ return false;
+ }
+ }
+
+ static bool hasExponentOnly(const fltSemantics &Sem) {
----------------
tschuett wrote:
doxygen comment:
/// yyy
https://github.com/llvm/llvm-project/pull/107127
More information about the llvm-commits
mailing list