[PATCH] D133823: Add APFloat and MLIR type support for fp8 (e5m2).

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 3 10:45:46 PDT 2022


craig.topper added inline comments.


================
Comment at: llvm/include/llvm/ADT/APFloat.h:160
+    // layout S1E5M2 as described in https://arxiv.org/abs/2209.05433
+    S_Float8E5M2,
+    S_x87DoubleExtended,
----------------
stellaraccident wrote:
> chapuni wrote:
> > This triggers a warning in clang/lib/AST/MicrosoftMangle.cpp:mangleFloat. Any idea?
> I'm not familiar with that code but it appears that it is assuming full coverage of every APFloat semantic to an msvc mangling -- which can't be valid. It looks like the way such things are handled within that file for errors is llvm_unreachable so should probably add a default with that.
Probably best to use llvm_unreachable for `S_Float8E5M2` instead of adding a default. That will keep the fully covered switch warning if another semantic is added in the future.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133823/new/

https://reviews.llvm.org/D133823



More information about the llvm-commits mailing list