[llvm] [APFloat] Add APFloat support for E8M0 type (PR #107127)
    Matt Arsenault via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Sep 24 10:04:08 PDT 2024
    
    
  
================
@@ -1165,7 +1200,7 @@ IEEEFloat::IEEEFloat(const fltSemantics &ourSemantics, integerPart value) {
 
 IEEEFloat::IEEEFloat(const fltSemantics &ourSemantics) {
   initialize(&ourSemantics);
-  makeZero(false);
+  ourSemantics.hasZero ? makeZero(false) : makeSmallestNormalized(false);
----------------
arsenm wrote:
It's not obvious to me that makeSmallestNormalized is the alternative. What's wrong with makeZero? You'll get a zero exponent, and an empty significand? 
https://github.com/llvm/llvm-project/pull/107127
    
    
More information about the llvm-commits
mailing list