[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:44:37 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) {
----------------
durga4github wrote:
Added in the latest revision..
https://github.com/llvm/llvm-project/pull/107127
More information about the llvm-commits
mailing list