[llvm] [NVPTX] Support BFloat Store Parameter (PR #137074)

Steffi Stumpos via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 24 09:56:47 PDT 2025


================
@@ -1852,7 +1852,8 @@ bool NVPTXDAGToDAGISel::tryStoreParam(SDNode *N) {
     case 1: {
       MVT::SimpleValueType MemTy = Mem->getMemoryVT().getSimpleVT().SimpleTy;
       SDValue Imm = Ops[0];
-      if (MemTy != MVT::f16 && MemTy != MVT::v2f16 &&
+      if (MemTy != MVT::f16 && MemTy != MVT::v2f16 && MemTy != MVT::bf16 &&
----------------
stumpOS wrote:

The conditional also requires that the node type is either ConstantInt or ConstantFloat but when the vector type is used the node type is neither; I was unable to create a test that generates a constant node with vector type. In the test I added and then removed this code path was not hit because the node type was MemIntrinsicSDNode. This is why the test I added for vector types passed before my change (see Justin's comment above)

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


More information about the llvm-commits mailing list