[llvm] [AArch64][SME] Create separate FORM_TRANSPOSE pseudos for ZPR & ZPRMul classes (PR #123755)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 07:36:14 PST 2025


================
@@ -45,20 +45,26 @@ def am_sme_indexed_b4 : ComplexPattern<iPTR, 2, "SelectAddrModeIndexedSVE<0, 15>
 // If the operands do not match this pattern, the pseudos are expanded
 // to a REG_SEQUENCE using the post-isel hook.
 
-def FORM_TRANSPOSED_REG_TUPLE_X2_PSEUDO :
-  Pseudo<(outs ZPR2Mul2:$tup),
----------------
sdesmalen-arm wrote:

It seems simpler to just change the regclass of the exisitng pseudo to use the more generic `ZPR2` (and `ZPR4` for the `_X4` pseudo). For instructions that require a `ZPR2Mul2`, a COPY will be introduced to move the `ZPR2` to a `ZPR2Mul2`. Later on, the register allocator will coalesce this COPY, such that the resulting pseudo will have a `ZPR2Mul2` regclass for the destination register.

This avoids the need to add new pseudos.

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


More information about the llvm-commits mailing list