[llvm] [PowerPC] Fix tlbie one-operand InstAlias for ISA 3.0+ (PR #213816)
Chris Copeland via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 1 17:58:17 PDT 2026
chrisnc wrote:
> Can you please add some information as to why this fix is needed? From what I can tell ISA30+ does not have an extended mnemonic for tlbie of this form. Line 5006 is coded to not break the tlbie alias set for pre-IS30 on line 5004.
@lei137 thanks for taking a look.
For assembling, the pre-ISA3_0 version is always chosen for the one-argument form, and this is fine as the encoding is equivalent to what ISA3_0 expects. The problem is that when using the 5-operand form, the assembly printer can match against the backwards ISA3_0 alias and print the one-argument form when it shouldn't.
See this for an example, as well as gcc's behavior:
https://godbolt.org/z/qrbTseMxz
The instruction:
```asm
tlbie 0, 4, 0, 0, 0
```
Would be printed as:
```asm
tlbie 4
```
instead of
```asm
tlbie 0, 4, 0, 0, 0
```
I've updated the test to also capture this behavior. The other cases are checking that the one- and two-operand alias prints are accurate when given the 5-operand version of the instruction.
https://github.com/llvm/llvm-project/pull/213816
More information about the llvm-commits
mailing list