[libc-commits] [libc] fe44992 - [libc][NFC] For remquo quotient, compare only 3 bits of MPFR and libc results.
Siva Chandra Reddy via libc-commits
libc-commits at lists.llvm.org
Tue Aug 25 23:42:43 PDT 2020
Author: Siva Chandra Reddy
Date: 2020-08-25T23:42:06-07:00
New Revision: fe44992b797fcbdf247abd860753feab22e6e148
URL: https://github.com/llvm/llvm-project/commit/fe44992b797fcbdf247abd860753feab22e6e148
DIFF: https://github.com/llvm/llvm-project/commit/fe44992b797fcbdf247abd860753feab22e6e148.diff
LOG: [libc][NFC] For remquo quotient, compare only 3 bits of MPFR and libc results.
Added:
Modified:
libc/utils/MPFRWrapper/MPFRUtils.cpp
Removed:
################################################################################
diff --git a/libc/utils/MPFRWrapper/MPFRUtils.cpp b/libc/utils/MPFRWrapper/MPFRUtils.cpp
index 1ee5cb1cefce..a121234e6224 100644
--- a/libc/utils/MPFRWrapper/MPFRUtils.cpp
+++ b/libc/utils/MPFRWrapper/MPFRUtils.cpp
@@ -448,7 +448,7 @@ bool compareBinaryOperationTwoOutputs(Operation op, const BinaryInput<T> &input,
if (mpfrIntResult != libcResult.i) {
if (op == Operation::RemQuo) {
- if ((0x7 & mpfrIntResult) != libcResult.i)
+ if ((0x7 & mpfrIntResult) != (0x7 & libcResult.i))
return false;
} else {
return false;
More information about the libc-commits
mailing list