[llvm] APFloat: Fix signed zero handling in minnum/maxnum (PR #83376)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 28 21:48:48 PST 2024
================
@@ -1397,6 +1397,8 @@ inline APFloat minnum(const APFloat &A, const APFloat &B) {
return B;
if (B.isNaN())
return A;
+ if (A.isZero() && B.isZero() && (A.isNegative() != B.isNegative()))
----------------
arsenm wrote:
Not sure, I just copied this from the minimum/maximum implementations. Probably should follow the same pattern and change all of them together if it makes sense
https://github.com/llvm/llvm-project/pull/83376
More information about the llvm-commits
mailing list