[PATCH] D158102: APFloat: Add getExactLog2Abs
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 17 05:35:39 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/include/llvm/ADT/APFloat.h:494-495
+ // sign bit. If it's not an exact power of 2, return INT_MIN
+ LLVM_READONLY
+ int getExactLog2Abs() const;
+
----------------
sepavloff wrote:
> It looks like using `std::optional<int>` as return value can produce clearer interface, no?
It shouldn’t differ from the non-abs version. I also don’t think optional is any nicer here
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158102/new/
https://reviews.llvm.org/D158102
More information about the llvm-commits
mailing list