[mlir] Use double format when parsing bfloat16 hexadecimal values
authorRiver Riddle <riverriddle@google.com>
Tue, 14 Jan 2020 21:47:21 +0000 (13:47 -0800)
committerRiver Riddle <riverriddle@google.com>
Tue, 14 Jan 2020 21:56:22 +0000 (13:56 -0800)
commit1bd14ce39293df61888042916a7e43b9e502a4de
treea08169d5dd33e810e811415d78482a11155afc69
parenta3490e3e3d38d502179329f76138d96c5b2bab88
[mlir] Use double format when parsing bfloat16 hexadecimal values

Summary: bfloat16 doesn't have a valid APFloat format, so we have to use double semantics when storing it. This change makes sure that hexadecimal values can be round-tripped properly given this fact.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D72667
mlir/lib/Parser/Parser.cpp
mlir/test/IR/invalid.mlir
mlir/test/IR/parser.mlir