llvm-project
66b48155 - [AMDGPU][AsmParser]: Use dummy operand for parsing buffer_ SWZ operand. (#165305)

Commit
182 days ago
[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` https://github.com/llvm/llvm-project/blob/263377a17570e1cbe6eeae9ffa5ce02f240839ef/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 https://github.com/llvm/llvm-project/blob/263377a17570e1cbe6eeae9ffa5ce02f240839ef/llvm/utils/TableGen/AsmMatcherEmitter.cpp#L1853
Author
Parents
Loading