[libc-commits] [PATCH] D105561: [libc] Capture floating point encoding and arrange it sequentially in memory
Tue Ly via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon Jul 12 22:32:32 PDT 2021
lntue added inline comments.
================
Comment at: libc/utils/FPUtil/FPBits.h:76
+
+ bool getSign() const {
+ return ((bits & FloatProp::signMask) >> (FloatProp::bitWidth - 1));
----------------
Sorry for late comments! Since you already updated to get* and set*, can you also add getBits and setBits? I think they would be a better than the current uintval() (and technically no equivalent of setBits).
================
Comment at: libc/utils/FPUtil/NextAfterLongDoubleX86.h:53
// it will never overflow "beyond" infinity.
- ++fromBits.encoding.exponent;
+ fromBits.setUnbiasedExponent(fromBits.getUnbiasedExponent() + 1);
return fromBits;
----------------
I'm a bit curious about generated assembly of this line. @sivachandra : can we check if there is any regression with this one? I think no regression for O2 and O3 would be good enough.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105561/new/
https://reviews.llvm.org/D105561
More information about the libc-commits
mailing list