[llvm-bugs] [Bug 46907] New: [AMDGPU][MC] Assembler produces multiple error messages for a single error

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jul 30 04:48:18 PDT 2020


            Bug ID: 46907
           Summary: [AMDGPU][MC] Assembler produces multiple error
                    messages for a single error
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: AMDGPU
          Assignee: unassignedbugs at nondot.org
          Reporter: dpreobrazhensky at luxoft.com
                CC: llvm-bugs at lists.llvm.org

There are many cases when assembler produces 2 or even 3 error messages when an
error occurs. For example, the code shown below

    s_waitcnt vmcnt(0) & expcnt(0) x(0)

result in the following plethora of messages:

    _test.s:1:32: error: invalid counter name x
    s_waitcnt vmcnt(0) & expcnt(0) x(0)
    _test.s:1:35: error: unknown token in expression
    s_waitcnt vmcnt(0) & expcnt(0) x(0)
    _test.s:1:35: error: failed parsing operand.
    s_waitcnt vmcnt(0) & expcnt(0) x(0)

The first message is the most specific while second and third messages are
rather generic and do not help in understanding of error reason.

Moreover, having several error messages per instruction may lead to subtle
issues in lit tests where errors generated for one instruction interfere with
testing of subsequent instructions and may result in some failures being

In summary, cases with multiple error messages should be analyzed and corrected
to produce just one most specific message.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200730/876946ec/attachment-0001.html>

More information about the llvm-bugs mailing list