[PATCH] D49026: [AMDGPU] New tbuffer intrinsics

Tim Renouf via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 17 02:43:39 PDT 2018


tpr added inline comments.


================
Comment at: lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp:4800
   {"inst_offset", AMDGPUOperand::ImmTyInstOffset, false, nullptr},
-  {"dfmt",    AMDGPUOperand::ImmTyDFMT, false, nullptr},
-  {"nfmt",    AMDGPUOperand::ImmTyNFMT, false, nullptr},
+  {"dfmt",    AMDGPUOperand::ImmTyFORMAT, false, nullptr},
   {"glc",     AMDGPUOperand::ImmTyGLC, true, nullptr},
----------------
nhaehnle wrote:
> Don't we still need the "nfmt" line here as well, in case the order is reversed? I see you've added a test for that, but I don't actually understand how that test is passing...
The name field in AMDGPUOptionalOperandTable is only used if it's one of a bunch of optional operands parsed by the same function, e.g. parseIntWithPrefix. Because AMDGPUOperand::ImmTyFORMAT is parsed by its own function parseDfmtNfmt, it is up to that function to determine whether we do in fact have a dfmt+nfmt operand (starting with either "dfmt" or "nfmt"), and say "no match" if we don't.


Repository:
  rL LLVM

https://reviews.llvm.org/D49026





More information about the llvm-commits mailing list