[llvm] [AArch64][SME] Introduce CHECK_MATCHING_VL pseudo for streaming transitions (PR #157510)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 11 04:12:30 PDT 2025
================
@@ -2940,6 +2940,52 @@ AArch64TargetLowering::EmitDynamicProbedAlloc(MachineInstr &MI,
return NextInst->getParent();
}
+MachineBasicBlock *
+AArch64TargetLowering::EmitCheckMatchingVL(MachineInstr &MI,
+ MachineBasicBlock *MBB) const {
+ MachineFunction *MF = MBB->getParent();
+ const TargetInstrInfo *TII = Subtarget->getInstrInfo();
+ const BasicBlock *LLVM_BB = MBB->getBasicBlock();
+ DebugLoc DL = MI.getDebugLoc();
+ MachineFunction::iterator It = ++MBB->getIterator();
+
+ const TargetRegisterClass *RC = &AArch64::GPR64RegClass;
+ MachineRegisterInfo &MRI = MF->getRegInfo();
+
+ Register RegVL = MRI.createVirtualRegister(RC);
+ Register RegSVL = MRI.createVirtualRegister(RC);
+ Register RegCheck = MRI.createVirtualRegister(RC);
+
+ BuildMI(*MBB, MI, DL, TII->get(AArch64::RDVLI_XI), RegVL).addImm(1);
----------------
MacDue wrote:
nit: It may be worth adding a few comments explaining the expansion.
https://github.com/llvm/llvm-project/pull/157510
More information about the llvm-commits
mailing list