[llvm] [AArch64] Add custom lowering of nxv32i1 get.active.lane.mask nodes (PR #141969)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 4 03:18:38 PDT 2025


================
@@ -27328,6 +27330,36 @@ void AArch64TargetLowering::ReplaceExtractSubVectorResults(
   Results.push_back(DAG.getNode(ISD::TRUNCATE, DL, VT, Half));
 }
 
+void AArch64TargetLowering::ReplaceGetActiveLaneMaskResults(
+    SDNode *N, SmallVectorImpl<SDValue> &Results, SelectionDAG &DAG) const {
+  if (!Subtarget->hasSVE2p1())
----------------
paulwalker-arm wrote:

This should protect the `setOperationAction()` call and then be an assert here, that way the function is only called when the necessary instructions are available.

Do you mind also extending the PR to cover `Subtarget.hasSME2() && Subtarget.isStreaming()`?

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


More information about the llvm-commits mailing list