Jeffrey Byrnes 66b481556e
[AMDGPU][AsmParser]: Use dummy operand for parsing buffer_ SWZ operand. (#165305)
`MCInstrDesc` counts the SWZ operand for `NumOperands` -- thus, since we
do not parse this into the `MCInst` operands, there will be a mismatch
between `MCInst.getNumOperands` and `MCInstrDesc.getNumOperands` .

`llvm-mca` assumes that each operand counted by
`MCInstrDesc.getNumOperands` will be present in `MCInst.operands`
263377a175/llvm/lib/MCA/InstrBuilder.cpp (L324)

This parses a dummy operand for the buffer_loads as a placeholder for
the implicit SWZ operand. This is similar to the parsing of `tbuffer_`
variants which automatically parse the dummy operand
263377a175/llvm/utils/TableGen/AsmMatcherEmitter.cpp (L1853)
2025-10-27 18:39:59 -07:00
..