[llvm] [AArch64] Lower fixed find_last_active to LASTP with SVE2.2 (PR #222534)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 30 03:32:14 PDT 2026


================
@@ -2289,6 +2289,16 @@ AArch64TargetLowering::AArch64TargetLowering(const TargetMachine &TM,
       for (auto VT : {MVT::v8i8, MVT::v16i8, MVT::v4i16, MVT::v8i16, MVT::v4f16,
                       MVT::v8f16, MVT::v4bf16, MVT::v8bf16})
         setOperationAction(ISD::VECTOR_COMPRESS, VT, Custom);
+
+      // Mark the scalable predicate and fixed-length vector container types
+      // for custom lowering.
+      // Extracts can still combine to lastb/clastb, otherwise the target node
+      // lowers to lastp.
+      for (auto VT : {MVT::nxv16i1, MVT::nxv8i1, MVT::nxv4i1, MVT::nxv2i1,
+                      MVT::v8i8, MVT::v16i8, MVT::v4i16, MVT::v8i16, MVT::v2i32,
----------------
Lukacma wrote:

Why are we considering all these types when FIND_LAST_ACTIVE is only working on mask types (so i1). Am I missing smth ?

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


More information about the llvm-commits mailing list