[llvm-branch-commits] [llvm] [AArch64][ISel] Select constructive SVE2 ext instruction (PR #151730)

Gaëtan Bossu via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Aug 4 01:02:52 PDT 2025


================
@@ -4069,6 +4069,22 @@ let Predicates = [HasSVE2_or_SME] in {
   let AddedComplexity = 2 in {
     def : Pat<(nxv16i8 (AArch64ext nxv16i8:$zn1, nxv16i8:$zn2, (i32 imm0_255:$imm))),
               (EXT_ZZI_B (REG_SEQUENCE ZPR2, $zn1, zsub0, $zn2, zsub1), imm0_255:$imm)>;
+
+    foreach VT = [nxv16i8] in
+      def : Pat<(VT (vector_splice VT:$Z1, VT:$Z2, (i64 (sve_ext_imm_0_255 i32:$index)))),
+                (EXT_ZZI_B  (REG_SEQUENCE ZPR2, $Z1, zsub0, $Z2, zsub1), imm0_255:$index)>;
----------------
gbossu wrote:

I'll check about removing the EXT intrinsic then. 👍  I needed the new pattern because SDAG lowers the `vector_extract` nodes to `vector_splice`, not AArch64's `EXT`.

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


More information about the llvm-branch-commits mailing list