diff options
author | Lang Hames <lhames@gmail.com> | 2014-11-19 19:15:41 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2014-11-19 19:15:41 +0000 |
commit | 56c0eb2d90de68978c280ab7b08377af6de03fd0 (patch) | |
tree | 53e4618c12694ca6e20dc087bd1250b034fd4010 /clang/unittests/Format/FormatTestJava.cpp | |
parent | dce60a747cb7ecad9a6b34e6f6be71cf73c055ec (diff) | |
download | llvm-56c0eb2d90de68978c280ab7b08377af6de03fd0.zip llvm-56c0eb2d90de68978c280ab7b08377af6de03fd0.tar.gz llvm-56c0eb2d90de68978c280ab7b08377af6de03fd0.tar.bz2 |
[ADT] Fix PR20728 - Incorrect APFloat::fusedMultiplyAdd results for x86_fp80.
As detailed at http://llvm.org/PR20728, due to an internal overflow in
APFloat::multiplySignificand the APFloat::fusedMultiplyAdd method can return
incorrect results for x87DoubleExtended (x86_fp80) values. This commonly
manifests as incorrect constant folding of libm fmal calls on x86. E.g.
fmal(1.0L, 1.0L, 3.0L) == 0.0L (should be 4.0L)
This patch fixes PR20728 by adding an extra bit to the significand for
intermediate results of APFloat::multiplySignificand, avoiding the overflow.
llvm-svn: 222374
Diffstat (limited to 'clang/unittests/Format/FormatTestJava.cpp')
0 files changed, 0 insertions, 0 deletions