[clang] [Clang] Add elementwise conversions from encoded FP8 values (PR #212647)

Chinmay Deshpande via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 3 15:48:53 PST 2026


chinmaydd wrote:

Thanks Matt.

Added tests:

 - `strictfp`: There is no constrained form of `llvm.convert.from.arbitrary.fp` yet. As a result, the builtin emits the unconstrained intrinsic. There is a FIXME in [strictfp-elementwise-builtins.cpp](https://github.com/llvm/llvm-project/blob/main/clang/test/CodeGen/strictfp-elementwise-builtins.cpp#L4) which mentions the same. Nonetheless, I've added a test that shows that there is no compiler crash.

 - `_BitInt(8)` vectors accepted, `_BitInt(16)` vectors rejected.

 - SVE (sizeless, fixed-length) and fixed-length RVV rejected, `__mfp8` scalar CodeGen.

 - `f8e5m3fnu_bf16`, f16/bf16 vector results, generic bf16 vector, `ext_vector_type(3)/(1)`.

 - `std::byte` was already covered in `SemaCXX/builtins-elementwise-convert-from-arbitrary-fp.cpp`.

https://github.com/llvm/llvm-project/pull/212647


More information about the cfe-commits mailing list