[PATCH] D137832: [AMDGPU][AsmParser] Forbid TFE modifiers for MBUF stores.

Dmitry Preobrazhensky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 11 13:24:50 PST 2022


dp added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp:4604
+      (Desc.TSFlags & (SIInstrFlags::MUBUF | SIInstrFlags::MTBUF))) {
+    for (const auto &Op : Operands) {
+      if (static_cast<const AMDGPUOperand &>(*Op).isTFE()) {
----------------
With `getImmLoc` this loop may be reduced to the following code:

    auto Loc = getImmLoc(AMDGPUOperand::ImmTyTFE, Operands);
    if (Loc != getInstLoc(Operands)) {
      Error(Loc, "...");
      return false;
    }



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137832/new/

https://reviews.llvm.org/D137832



More information about the llvm-commits mailing list