[llvm] [RISCV] Support Inline ASM for the bf16 type. (PR #80118)

Chuan-Yue Yuan via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 31 22:58:08 PST 2024


================
@@ -9105,7 +9105,7 @@ getRegistersForValue(SelectionDAG &DAG, const SDLoc &DL,
   // Get the actual register value type.  This is important, because the user
   // may have asked for (e.g.) the AX register in i32 type.  We need to
   // remember that AX is actually i16 to get the right extension.
-  const MVT RegVT = *TRI.legalclasstypes_begin(*RC);
+  MVT RegVT = *TRI.legalclasstypes_begin(*RC);
----------------
circYuan wrote:

Did you mean that we should keep the RegVT constant, but choose not just the first legal value type for creating the SelectionDAG? Such fix is like using a lambda function with `for loop` for choosing the reasonable value type, in this case, not fp16 but bf16.

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


More information about the llvm-commits mailing list