diff options
| author | Jeffrey Byrnes <jeffrey.byrnes@amd.com> | 2025-10-27 18:39:59 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-27 18:39:59 -0700 |
| commit | 66b481556e01e6e2508d7c9146849167b9e0323f (patch) | |
| tree | 95cff6ae2809efa5d18c8fc32e192b2f0a440df2 /clang/lib/AST/ByteCode/Compiler.cpp | |
| parent | 0ece134031c5e442103db25985c4a36b338127bb (diff) | |
| download | llvm-66b481556e01e6e2508d7c9146849167b9e0323f.zip llvm-66b481556e01e6e2508d7c9146849167b9e0323f.tar.gz llvm-66b481556e01e6e2508d7c9146849167b9e0323f.tar.bz2 | |
[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
Diffstat (limited to 'clang/lib/AST/ByteCode/Compiler.cpp')
0 files changed, 0 insertions, 0 deletions
