[llvm] [AArch64][GlobalISel] Prefer to use Vector Truncate (PR #105692)

Dhruv Chawla via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 22 21:29:35 PDT 2024


================
@@ -1599,6 +1599,13 @@ def insert_vector_elt_oob : GICombineRule<
          [{ return Helper.matchInsertVectorElementOOB(*${root}, ${matchinfo}); }]),
   (apply [{ Helper.applyBuildFn(*${root}, ${matchinfo}); }])>;
 
+// Combine v8i8 (buildvector i8 (trunc(unmerge)), i8 (trunc), i8 (trunc), i8 (trunc), undef, undef, undef, undef)
+def combine_use_vector_truncate : GICombineRule<
+  (defs root:$root, register_matchinfo:$matchinfo),
+  (match (wip_match_opcode G_BUILD_VECTOR):$root,
----------------
dc03-work wrote:

Don't use `wip_match_opcode` anymore. See https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/Target/GlobalISel/Combine.td#L1863 for an example using `G_BUILD_VECTOR` and `GIVariadic`.

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


More information about the llvm-commits mailing list