[APFloat] Fix truncation of certain subnormal numbers
authorDanila Malyutin <dmalyutin@azul.com>
Mon, 6 Jun 2022 17:12:43 +0000 (20:12 +0300)
committerDanila Malyutin <dmalyutin@azul.com>
Wed, 8 Jun 2022 18:54:35 +0000 (21:54 +0300)
commited6c309d4bf60b8a6abcf37a4e9d5b4bef96191b
tree9e9a5684595580eaf7564909461e0a201be45fa6
parentd897a14c2ef756d99344f4fae8864108e0131007
[APFloat] Fix truncation of certain subnormal numbers

Certain subnormals would be incorrectly rounded away from zero.

Fixes #55838

Differential Revision: https://reviews.llvm.org/D127140
llvm/lib/Support/APFloat.cpp
llvm/test/Transforms/InstSimplify/ConstProp/cast.ll
llvm/unittests/ADT/APFloatTest.cpp