[llvm] [APFloat] Add APFloat support for E8M0 type (PR #107127)
Durgadoss R via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 16 04:17:47 PDT 2024
================
@@ -396,6 +404,8 @@ static inline Error createError(const Twine &Err) {
}
static constexpr inline unsigned int partCountForBits(unsigned int bits) {
+ if (bits == 0)
+ return 1;
----------------
durga4github wrote:
I tried that before and it resulted in extra checks in other places.
However, I have used std::max(1, ...) now, which avoids the specialized if-check.
https://github.com/llvm/llvm-project/pull/107127
More information about the llvm-commits
mailing list