--- /dev/null
+#name: Illegal optional operand pair use
+#as: -mno-verbose-error
+#source: illegal-sysp-tlbip-optional.s
+#error_output: illegal-sysp-tlbip-optional.l
--- /dev/null
+[^:]*: Assembler messages:
+[^:]*:5: Error: missing register at operand 2 -- `tlbip vale3nxs'
+[^:]*:9: Error: extraneous register at operand 2 -- `tlbip paall,x0'
+[^:]*:10: Error: extraneous register at operand 2 -- `tlbip paall,x0,x1'
--- /dev/null
+ .arch armv9.4-a+d128
+
+ /* TLBIP operands marked with the F_HASXT don not allow xzr to be used
+ as GPR arguments and so require at least one register to be specified. */
+ tlbip vale3nxs
+
+ /* Conversely, those without the flag do not allow us to specify registers,
+ so the only accepted alternative is the complete omission of optional ops. */
+ tlbip paall, x0
+ tlbip paall, x0, x1
--- /dev/null
+#objdump: -dr
+
+.*
+
+Disassembly of section \.text:
+
+0+ <\.text>:
+[^:]*: d54e97a0 sysp #6, C9, C7, #5, x0, x1
+[^:]*: d54e97a0 sysp #6, C9, C7, #5, x0, x1
+[^:]*: d54e97a2 sysp #6, C9, C7, #5, x2, x3
+[^:]*: d54e97a2 sysp #6, C9, C7, #5, x2, x3
+[^:]*: d54e879f sysp #6, C8, C7, #4
+[^:]*: d54e97bf sysp #6, C9, C7, #5
+[^:]*: d54e97a0 sysp #6, C9, C7, #5, x0, x1
+[^:]*: d54e97a0 sysp #6, C9, C7, #5, x0, x1
+[^:]*: d54e97a2 sysp #6, C9, C7, #5, x2, x3
+[^:]*: d54e97a2 sysp #6, C9, C7, #5, x2, x3
--- /dev/null
+ .arch armv9.4-a+d128
+
+ /* TLBIP operands marked with the F_HASXT don not allow xzr to be used
+ as GPR arguments and so require at least one register to be specified. */
+ tlbip vale3nxs, x0
+ tlbip vale3nxs, x0, x1
+ tlbip vale3nxs, x2
+ tlbip vale3nxs, x2, x3
+
+
+ /* Conversely, those without the flag do not allow us to specify registers,
+ so the only accepted alternative is the complete omission of optional ops. */
+ tlbip paall
+
+ /* No such checking is carried out when the same instruction is issued
+ directly via the sysp implementation defined maintenance instruction,
+ such that both GRPs are optional. */
+ sysp #6, C9, C7, #5
+ sysp #6, C9, C7, #5, x0
+ sysp #6, C9, C7, #5, x0, x1
+ sysp #6, c9, c7, #5, x2
+ sysp #6, c9, c7, #5, x2, x3