[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

Shilei Tian via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 12 10:51:08 PST 2024


================
@@ -2730,6 +2749,12 @@ std::optional<unsigned> getInlineEncodingV2I16(uint32_t Literal) {
   return getInlineEncodingV216(false, Literal);
 }
 
+// Encoding of the literal as an inline constant for a V_PK_*_BF16 instruction
+// or nullopt.
+std::optional<unsigned> getInlineEncodingV2BF16(uint32_t Literal) {
+  return getInlineEncodingV216(true, Literal);
----------------
shiltian wrote:

This part is still WIP along with https://github.com/llvm/llvm-project/pull/81345.

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


More information about the cfe-commits mailing list