[llvm] [AArch64][SME] Introduce CHECK_MATCHING_VL pseudo for streaming transitions (PR #157510)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 10 09:15:59 PDT 2025
================
@@ -1367,6 +1367,17 @@ def PROBED_STACKALLOC_DYN : Pseudo<(outs),
} // Defs = [SP, NZCV], Uses = [SP] in
} // hasSideEffects = 1, isCodeGenOnly = 1
+// Pseudo-instruction that compares the current SVE vector length (VL) with the
+// streaming vector length (SVL). If the two lengths do not match, the check
+// lowers to a `brk`, causing a trap.
+let hasSideEffects = 1, isCodeGenOnly = 1, usesCustomInserter = 1 in
+def CHECK_MATCHING_VL_PSEUDO : Pseudo<(outs), (ins), []>, Sched<[]>;
+
+def AArch64_check_matching_vl
+ : SDNode<"AArch64ISD::CHECK_MATCHING_VL", SDTypeProfile<0, 0,[]>,
+ [SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>;
+def : Pat<(AArch64_check_matching_vl), (CHECK_MATCHING_VL_PSEUDO)>;
+
----------------
MacDue wrote:
Can you move this to `AArch64SMEInstrInfo.td`? I think just after "ENTRY_PSTATE_SM" would be a good spot:
https://github.com/llvm/llvm-project/blob/00483379fbe018e51840e4783cecf6b76de8d3f9/llvm/lib/Target/AArch64/AArch64SMEInstrInfo.td#L42-L50
https://github.com/llvm/llvm-project/pull/157510
More information about the llvm-commits
mailing list