[mlir] Use getDenseElementBitwidth instead of Type::getElementTypeBitWidth.
authorRiver Riddle <riverriddle@google.com>
Thu, 9 Jan 2020 22:41:49 +0000 (14:41 -0800)
committerRiver Riddle <riverriddle@google.com>
Thu, 9 Jan 2020 22:51:44 +0000 (14:51 -0800)
commit68c8b6c4cd117cc962155298f0e1d45056ecc001
tree52eed3e8545894ac3e087798316da1eb47389f44
parent58b3dec6c108eb9ae4af2cde5c831743d5605c79
[mlir] Use getDenseElementBitwidth instead of Type::getElementTypeBitWidth.

Summary: Some data values have a different storage width than the corresponding MLIR type, e.g. bfloat is currently stored as a double.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D72478
mlir/lib/IR/Attributes.cpp
mlir/unittests/IR/AttributeTest.cpp