[llvm] [AArch64] Lower fixed find_last_active to LASTP with SVE2.2 (PR #222534)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 22 04:06:21 PDT 2026
================
@@ -8283,6 +8293,36 @@ SDValue AArch64TargetLowering::LowerVECTOR_COMPRESS(SDValue Op,
Passthru);
}
+SDValue
+AArch64TargetLowering::LowerVECTOR_FIND_LAST_ACTIVE(SDValue Op,
+ SelectionDAG &DAG) const {
+ assert((Subtarget->hasSVE2p2() || Subtarget->hasSME2p2()) &&
+ "custom lowering requires LASTP");
+ SDVTList VTs = DAG.getVTList(Op.getValueType(), MVT::i32);
+ return DAG.getNode(AArch64ISD::FIND_LAST_ACTIVE, SDLoc(Op), VTs,
+ Op.getOperand(0));
+}
+
+SDValue AArch64TargetLowering::expandFindLastActive(SDValue Op,
----------------
CarolineConcatto wrote:
I was looking how this was done for CTTZ_ELT, can this implementation be similar to that?
https://github.com/llvm/llvm-project/pull/222534
More information about the llvm-commits
mailing list