[llvm] CodeGen: Add -denormal-fp-math-bf16 flag (PR #90425)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 7 02:44:22 PDT 2024


arsenm wrote:

> I don't accept that. Denormals have a specific and clear meaning in the IEEE types, but once you say "This is like the IEEE type except..." you can no longer assume anything that isn't part of the specification for the new type. 

The IEEE formats are specified as M mantissa bits and E exponent bits, just because the standard didn't prescribe this particular combination of bits as a suggested format doesn't mean it's some wild thing with no obligation to be consistent. Denormals are a set of values in the encoding, which bfloat certainly has. The choice for a computation to drop bits on the floor when a value would need to be encoded as a denormal is somewhat orthogonal to the format itself.


https://github.com/llvm/llvm-project/pull/90425


More information about the llvm-commits mailing list