[llvm] [AMDGPU][MC] Improve error message for missing dim operand (PR #96588)
Jun Wang via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 9 01:46:10 PDT 2024
================
@@ -4006,6 +4007,52 @@ bool AMDGPUAsmParser::validateMIMGGatherDMask(const MCInst &Inst) {
return DMask == 0x1 || DMask == 0x2 || DMask == 0x4 || DMask == 0x8;
}
+bool AMDGPUAsmParser::validateMIMGDim(const MCInst &Inst,
+ const OperandVector &Operands) {
+ const unsigned Opc = Inst.getOpcode();
+ const MCInstrDesc &Desc = MII.get(Opc);
+
+ if ((Desc.TSFlags & MIMGFlags) == 0)
+ return true;
+
+ if (!isGFX10Plus())
+ return true;
+
+ switch (Opc) {
+ case IMAGE_BVH64_INTERSECT_RAY_a16_gfx12:
----------------
jwanggit86 wrote:
It seems this can be done by checking the boolean `AMDGPU::getMIMGBaseOpcode(Opc)->BVH`. See latest commit.
https://github.com/llvm/llvm-project/pull/96588
More information about the llvm-commits
mailing list