[llvm] [SPIRV] Addition of matrix multiply accumulate operands (PR #138665)

Dmitry Sidorov via llvm-commits llvm-commits at lists.llvm.org
Thu May 15 09:43:04 PDT 2025


================
@@ -242,6 +242,37 @@ void SPIRVInstPrinter::printInst(const MCInst *MI, uint64_t Address,
           }
           break;
         }
+        case SPIRV::OpSubgroupMatrixMultiplyAccumulateINTEL: {
+          const unsigned NumOps = MI->getNumOperands();
+          if (NumFixedOps == NumOps)
+            break; // No extra operands, so no flags to process
+          OS << ' ';
+          // Extract the last operand only if it exists
+          if (NumOps > NumFixedOps) {
+            const unsigned Flags = MI->getOperand(NumOps - 1).getImm();
+            if (Flags == 0) {
+              printSymbolicOperand<
+                  OperandCategory::MatrixMultiplyAccumulateOperandsOperand>(
+                  MI, NumOps - 1, OS);
+            } else {
+              std::string Buffer;
+              for (unsigned Mask = 0x1;
+                   Mask != SPIRV::MatrixMultiplyAccumulate::
----------------
MrSidims wrote:

It seems like we never enter the loop body, when Mask == MatrixBPackedBFloat16INTEL.

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


More information about the llvm-commits mailing list