[llvm] [AMDGPU][MC] Improve error message for missing dim operand (PR #96588)
Jun Wang via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 22 10:13:07 PDT 2024
================
@@ -4006,6 +4007,29 @@ bool AMDGPUAsmParser::validateMIMGGatherDMask(const MCInst &Inst) {
return DMask == 0x1 || DMask == 0x2 || DMask == 0x4 || DMask == 0x8;
}
+bool AMDGPUAsmParser::validateMIMGDim(const MCInst &Inst,
+ const OperandVector &Operands) {
+ if (!isGFX10Plus())
----------------
jwanggit86 wrote:
I was not able to find a named feature for "dim". Note that `isGFX10Plus()` etc are defined as member functions of the class `AMDGPUAsmParser` and are used throughout the file. For example, the first few lines of `parseDim()` include a call of `isGFX10Plus()`:
```c++
ParseStatus AMDGPUAsmParser::parseDim(OperandVector &Operands) {
if (!isGFX10Plus())
return ParseStatus::NoMatch;
...
```
https://github.com/llvm/llvm-project/pull/96588
More information about the llvm-commits
mailing list