forked from OSchip/llvm-project
3b207d3691
MLIR does not have support for parsing special floating point values such as infinities and NaNs. If programmatically constructed, these values are printed as NaN and (+-)Inf and cannot be parsed back. Add parser support for hexadecimal literals in float attributes, following LLVM IR. The literal corresponds to the in-memory representation of the floating point value. IEEE 754 defines a range of possible values for NaNs, storing the bitwise representation allows MLIR to properly roundtrip NaNs with different bit values of significands. The initial version of this commit was missing support for float literals that used to be printed in decimal notation as a fallback, but ended up being printed in hexadecimal format which became the fallback for special values. The decimal fallback behavior was not exercised by tests. It is currently reinstated and tested by the newly added test @f32_potential_precision_loss in parser.mlir. PiperOrigin-RevId: 260790900 |
||
---|---|---|
.. | ||
Dialects | ||
Tutorials | ||
includes | ||
Canonicalization.md | ||
ConversionToLLVMDialect.md | ||
DefiningAttributesAndTypes.md | ||
DeveloperGuide.md | ||
Diagnostics.md | ||
GenericDAGRewriter.md | ||
LangRef.md | ||
MLIRForGraphAlgorithms.md | ||
OpDefinitions.md | ||
Passes.md | ||
Quantization.md | ||
QuickstartRewrites.md | ||
Rationale.md | ||
RationaleSimplifiedPolyhedralForm.md | ||
TestingGuide.md | ||
UsageOfConst.md | ||
WritingAPass.md |