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: unassignedb...@nondot.org Reporter: petr.pa...@arm.com CC: llvm-bugs@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.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs