[llvm] [AMDGPU] Bugfix for scaled MFMA parsing FP literals (PR #142493)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 2 15:52:18 PDT 2025


================
@@ -8835,6 +8835,13 @@ void AMDGPUAsmParser::cvtScaledMFMA(MCInst &Inst,
   for (unsigned E = Operands.size(); I != E; ++I) {
     AMDGPUOperand &Op = static_cast<AMDGPUOperand &>(*Operands[I]);
 
+    // the order of operands in MCInst and parsed operands are different.
+    // Adding dummy blgp and cbsz operands at corresponding MCInst operand
+    // indeces for parsing scale values correctly.
+    if (I == 5) {
----------------
bcahoon wrote:

Could you use getNamedOperandIdx() instead of using a hardcoded value?

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


More information about the llvm-commits mailing list