[PATCH] D92960: [AMDGPU][MC] Restore old error position for "too few operands"
Scott Linder via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 9 13:10:27 PST 2020
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf5f4b8b60fc0: [AMDGPU][MC] Restore old error position for "too few operands" (authored by scott.linder).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92960/new/
https://reviews.llvm.org/D92960
Files:
llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
llvm/test/MC/AMDGPU/exp-err.s
llvm/test/MC/AMDGPU/gfx10_err_pos.s
Index: llvm/test/MC/AMDGPU/gfx10_err_pos.s
===================================================================
--- llvm/test/MC/AMDGPU/gfx10_err_pos.s
+++ llvm/test/MC/AMDGPU/gfx10_err_pos.s
@@ -992,12 +992,12 @@
tbuffer_store_format_xyzw v[1:4], off, ttmp[4:7]
// CHECK: error: too few operands for instruction
// CHECK-NEXT:{{^}}tbuffer_store_format_xyzw v[1:4], off, ttmp[4:7]
-// CHECK-NEXT:{{^}} ^
+// CHECK-NEXT:{{^}}^
v_add_f32_e64 v0, v1
// CHECK: error: too few operands for instruction
// CHECK-NEXT:{{^}}v_add_f32_e64 v0, v1
-// CHECK-NEXT:{{^}} ^
+// CHECK-NEXT:{{^}}^
//==============================================================================
// too large value for expcnt
Index: llvm/test/MC/AMDGPU/exp-err.s
===================================================================
--- llvm/test/MC/AMDGPU/exp-err.s
+++ llvm/test/MC/AMDGPU/exp-err.s
@@ -53,7 +53,7 @@
// GCN: :5: error: unknown token in expression
exp
-// GCN: :4: error: too few operands for instruction
+// GCN: :1: error: too few operands for instruction
exp mrt0 s0, v0, v0, v0
// GCN: 10: error: invalid operand for instruction
Index: llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
+++ llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
@@ -4040,7 +4040,7 @@
SMLoc ErrorLoc = IDLoc;
if (ErrorInfo != ~0ULL) {
if (ErrorInfo >= Operands.size()) {
- return Error(getLoc(), "too few operands for instruction");
+ return Error(IDLoc, "too few operands for instruction");
}
ErrorLoc = ((AMDGPUOperand &)*Operands[ErrorInfo]).getStartLoc();
if (ErrorLoc == SMLoc())
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92960.310629.patch
Type: text/x-patch
Size: 1817 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201209/16caf569/attachment.bin>
More information about the llvm-commits
mailing list