Skip to content
Commit 73eecc9c authored by Krzysztof Drewniak's avatar Krzysztof Drewniak
Browse files

[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
parent d49caf4a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment