[llvm] [AMDGPU][MC] Disallow nogds in ds_gws_* instructions (PR #166873)

Jun Wang via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 7 10:22:15 PST 2025


================
@@ -7043,6 +7043,12 @@ ParseStatus AMDGPUAsmParser::parseNamedBit(StringRef Name,
   if (Name == "a16" && !hasA16())
     return Error(S, "a16 modifier is not supported on this GPU");
 
+  if (Bit == 0 && Name == "gds") {
+    StringRef Mnemo = ((AMDGPUOperand &)*Operands[0]).getToken();
+    if (Mnemo.starts_with("ds_gws"))
----------------
jwanggit86 wrote:

If do the check after parsing, then it can only be done during validation, as in [PR 166438](https://github.com/llvm/llvm-project/pull/166438).

https://github.com/llvm/llvm-project/pull/166873


More information about the llvm-commits mailing list