[llvm-bugs] [Bug 24498] New: Worse diagnostics for NEON instructions

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 19 08:03:42 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=24498

            Bug ID: 24498
           Summary: Worse diagnostics for NEON instructions
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: AArch64
          Assignee: unassignedbugs at nondot.org
          Reporter: petr.pavlu at arm.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Commit r244955 [1] introduced worse error reporting in some cases.

New behaviour (using r245428):
$ echo "fabs.4s v0, v0" | llvm-mc -triple=aarch64 -mattr=-neon -show-encoding
        .text
<stdin>:1:1: error: too few operands for instruction
fabs.4s v0, v0
^

Previous behaviour (using r245428 but reverting r244955):
$ echo "fabs.4s v0, v0" | llvm-mc -triple=aarch64 -mattr=-neon -show-encoding
        .text
<stdin>:1:6: error: invalid type suffix for instruction
fabs.4s v0, v0
     ^

What happens is that the short-form NEON matching gives
`MatchResult = Match_MissingFeature' and `ErrorInfo = 0x8' (identifier of the
missing NEON feature). Then the long-form NEON matching gives
`MatchResult = Match_InvalidOperand' and `ErrorInfo = 1' (number of an invalid
operand). However, the new code in r244955 incorrectly mixes these two together
and creates `Match_InvalidOperand' and `ErrorInfo = 0x8'.

I think LLVM should report the 'instruction requires: ...' error for this
example. This could be achieved by moving the newly introduced rewrite code
before the `switch (MatchResult) {...}' code and fixing the rewrite so it also
uses `MatchResult' from the short-form matching.

[1]
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20150810/293460.html

-- 
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/20150819/fa2907c4/attachment.html>


More information about the llvm-bugs mailing list