[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
================
@@ -4574,7 +4671,11 @@ IEEEFloat::opStatus IEEEFloat::next(bool nextDown) {
// the integral bit to 1, and increment the exponent. If we have a
// denormal always increment since moving denormals and the numbers in the
// smallest normal binade have the same exponent in our representation.
- bool WillCrossBinadeBoundary = !isDenormal() && isSignificandAllOnes();
+ // If there are only exponents, any increment always crosses the
+ // BinadeBoundary.
+ bool WillCrossBinadeBoundary =
+ !isDenormal() &&
+ (APFloat::hasSignificand(*semantics) ? isSignificandAllOnes() : true);
----------------
arsenm wrote:
this is an and
https://github.com/llvm/llvm-project/pull/107127
More information about the llvm-commits
mailing list