[mlir] Convert 8-bit float types to i8
Whereas LLVM currently doesn't have any types for 8-bit floats, and whereas existing 8-bit float APIs (for instance, the AMDGCN intrinsics) take such floats as (packed) bytes, translate the MLIR 8-bit float types to i8 during LLVM lowering. In order to not special-case arith.constant for bitcasting constants to their integer form, amend the MLIR to LLVM translator to turn 8-bit float constants into i8 constants with the same value (by use of APFloat's bitcast method). This change can be reverted once LLVM has 8-bit float types. Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D153160
Loading
Please sign in to comment