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

Shilei Tian via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 13 19:13:39 PST 2024


================
@@ -0,0 +1,8 @@
+# RUN: llvm-mc -triple=amdgcn -mcpu=gfx1100 -disassemble -show-encoding < %s | FileCheck %s
+# RUN: llvm-mc -triple=amdgcn -mcpu=gfx1200 -disassemble -show-encoding < %s | FileCheck %s
+
+# CHECK: v_dot2_bf16_bf16 v5, v1, v2, 0x42c8
+0x05,0x00,0x67,0xd6,0x01,0x05,0xfe,0x03,0xc8,0x42,0x00,0x00
+
+# CHECK: v_dot2_bf16_bf16 v5, v1, v2, 0x3c00
----------------
shiltian wrote:

The disassembler doesn't work properly because when it sees `242` with bitwidth 16, it doesn't know whether it is bf16 or fp16.

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


More information about the cfe-commits mailing list