[PATCH] D94756: [AMDGPU][MC][GFX10] Improved dpp8 errors handling

Dmitry Preobrazhensky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 15 11:26:55 PST 2021


dp marked an inline comment as done.
dp added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp:7274
+    if (0 > Sels[i] || 7 < Sels[i]) {
+      Error(Loc, "expected a 3-bit value");
       return MatchOperand_ParseFail;
----------------
rampitec wrote:
> Just use getLoc() here? Loc does not seem to be used otherwise.
The intention was to save the location before calling parseAbsoluteExpression. If the expression value is out of bounds, and we call getLoc() later, we will refer an incorrect error position (the next token after the expression).


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

https://reviews.llvm.org/D94756



More information about the llvm-commits mailing list