Open sizn-sc opened 2 months ago
I've checked and this will be fixed by #98721.
I've also found input data for half and double precision FMA, which seemingly trigger the same bug (off by 1 ulp error):
0x808d
, but the correct value is 0x808e
.Since this problem is fixed by your PR, then maybe these cases can be added to regression as well?
While comparing APFloat against berkeley-softfloat-3e I found a discrepancy in
fusedMultiplyAdd
in a particular corner-case:Reproduction available at compiler explorer. This occurs for NearestTiesToEven and NearestTiesToAway rounding modes. Originally this issue was discovered by linking against LLVMSupport and using APFloat directly, but it also affects constant folding with default rounding mode.
GCC and native x86 FPU seem to agree with clang without optimizations. This is likely a case of incorrect rounding and is unrelated to https://github.com/llvm/llvm-project/issues/63895.
(cc @eddyb @beetrees )