[llvm] [RISCV][MC] Prioritize features in MultiMismatchFallback (PR #215737)

via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 16 23:19:12 PDT 2026


================
@@ -17,13 +17,13 @@ sfence.w.inval 0x10 # CHECK: :[[@LINE]]:1: error: invalid instruction
 
 sfence.inval.ir 0x10 # CHECK: :[[@LINE]]:1: error: invalid instruction
 
-hfence.vvma zero, a1, a2 # CHECK: :[[@LINE]]:13: error: unexpected extra operand for instruction
+hfence.vvma zero, a1, a2 # CHECK: :[[@LINE]]:1: error: instruction requires the following: 'H' (Hypervisor)
----------------
saloni-shinde-Q wrote:

Thanks for the suggestion. If I add -mattr=+h to the RUN line in priv-invalid.s, I get the following diagnostic:
**error: unexpected extra operand for instruction**
My understanding is that enabling H causes this test to exercise operand validation and report the unexpected extra operand instead of the missing-feature diagnostic. Is this the behavior you had in mind?

If so, I think updating this test and its expected diagnostic would be better handled in a separate PR, since it changes the purpose of the existing test from checking the missing-feature diagnostic to checking the operand diagnostic. Would that be reasonable?

https://github.com/llvm/llvm-project/pull/215737


More information about the llvm-commits mailing list