[llvm] [AArch64][SME2] Add FORM_STRIDED_TUPLE pseudo nodes (PR #116399)
Sam Tebbs via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 19 05:55:31 PST 2024
================
@@ -1142,6 +1146,30 @@ bool AArch64ExpandPseudo::expandMultiVecPseudo(
return true;
}
+bool AArch64ExpandPseudo::expandFormTuplePseudo(
+ MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
+ MachineBasicBlock::iterator &NextMBBI, unsigned Size) {
+ assert(Size == 2 || Size == 4 && "Invalid Tuple Size");
+ MachineInstr &MI = *MBBI;
+ Register ReturnTuple = MI.getOperand(0).getReg();
+
+ const TargetRegisterInfo *TRI =
+ MBB.getParent()->getSubtarget().getRegisterInfo();
+ for (unsigned i = 0; i < Size; i++) {
+ Register FormTupleOpReg = MI.getOperand(i + 1).getReg();
+ Register ReturnTupleSubReg =
+ TRI->getSubReg(ReturnTuple, AArch64::zsub0 + i);
+ if (FormTupleOpReg != ReturnTupleSubReg)
----------------
SamTebbs33 wrote:
I think a comment about why this check is necessary would be good.
https://github.com/llvm/llvm-project/pull/116399
More information about the llvm-commits
mailing list