Fix APFloat::toString on Float8E5M2 values.
authorReed <reedwm@google.com>
Tue, 13 Dec 2022 08:50:02 +0000 (09:50 +0100)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 13 Dec 2022 08:52:07 +0000 (09:52 +0100)
commit7476d59414d3f94b6e14e6917a6c1151135a28c1
treecefee5e81c463a18194ae07aa8914db89a2d0bc0
parent492c471839a66e354ebe696bd3e15f7477c63613
Fix APFloat::toString on Float8E5M2 values.

Before, an APInt with value 10 was created, whose width was the significand width. But 10 cannot fit in Float8E5M2's significand.

Differential Revision: https://reviews.llvm.org/D138540
llvm/lib/Support/APFloat.cpp
llvm/unittests/ADT/APFloatTest.cpp