[llvm] [AArch64][SME] Introduce CHECK_MATCHING_VL pseudo for streaming transitions (PR #157510)

Gaƫtan Bossu via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 9 03:17:44 PDT 2025


================
@@ -9147,7 +9197,40 @@ SDValue AArch64TargetLowering::changeStreamingMode(SelectionDAG &DAG, SDLoc DL,
   if (InGlue)
     Ops.push_back(InGlue);
 
-  return DAG.getNode(Opcode, DL, DAG.getVTList(MVT::Other, MVT::Glue), Ops);
+  if (!HasSVECC)
+    return DAG.getNode(Opcode, DL, DAG.getVTList(MVT::Other, MVT::Glue), Ops);
+
+  auto GetCheckVL = [&](SDValue Chain, SDValue InGlue = SDValue()) -> SDValue {
+    SmallVector<SDValue, 2> Ops = {Chain};
+    if (InGlue)
+      Ops.push_back(InGlue);
+    return SDValue(DAG.getMachineNode(AArch64::CHECK_MATCHING_VL, DL,
+                                      DAG.getVTList(MVT::Other, MVT::Glue),
+                                      Ops),
+                   0);
+  };
+
+  // NS -> S
----------------
gbossu wrote:

Nit: Spell out `Non-streaming -> streaming`. Same for `S -> NS`. Otherwise, I'll forget what these letters mean in 2 weeks :)

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


More information about the llvm-commits mailing list