[llvm] [RISCV] Report all near-miss reasons in the AsmParser (PR #205721)
Mark Zhuang via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 28 09:19:41 PDT 2026
================
@@ -8,10 +8,10 @@ cv.extract t0, t1, 0
# CHECK-ERROR: too few operands for instruction
cv.extract t0, t1, t2
-# CHECK-ERROR: immediate must be an integer in the range [0, 31]
+# CHECK-ERROR: invalid instruction
----------------
zqb-all wrote:
This looks like a multiple-mismatch issue. t2 fails UImm5 at operand 3 (recording the "immediate must be in [0, 31]" near-miss), then operand 4 is missing — two problems, so the candidate is dropped and leaving the bare invalid instruction.
Keeping the first near-miss instead of discarding it on the second mismatch seemed to recover most of these. It'd be in AsmMatcherEmitter so it affects ARM too — does that direction seem reasonable to you?
https://github.com/llvm/llvm-project/pull/205721
More information about the llvm-commits
mailing list