Log:
[Tablegen] Fix alias instruction printer mangling opcodes with optional suffixes.
The generic printer will now properly print AsmString formats such as
"opcode${a}${b} operands".
This introduces a slight change in behaviour: a tab is printed for the first
whitespace after the opcode and suffixes part. Previously, a tab would always be
printed after the opcode.
Summary:
An instruction alias defined with InstAlias and an optional operand immediately
after the opcode, "<opcode>${a} <operands>", would get the optional operand
emitted as unprintable characters in the instrution disassembly. This wouldn't
happen if the optional operand appeared as the last item in the AsmString which
is how the current backends avoided the problem.
There don't appear to be any tests for this part of Tablegen but it passes the
pre-commit tests. Manually tested the change by enabling the generic alias
printer in the ARM backend and checking the output.
So the general idea here is that we always eat the first ' ' or '\t' and replace it with a '\t'. All other whitespace (including that in between operands) passes through as provided. Is that right?