[llvm] [AArch64][GlobalISel] Combine Shuffles of G_CONCAT_VECTORS (PR #87489)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 10 12:12:55 PDT 2024
chuongg3 wrote:
> [varargs](https://github.com/llvm/llvm-project/issues/87459) are unfortunately not here yet, but there are now several combines registered on G_SHUFFLE_VECTOR that will always fail because the input is bad.
>
> ```
> def shuffle_vector_of_concats2 : GICombineRule<
> (defs root:$root, build_fn_matchinfo:$matchinfo),
> (match (G_CONCAT_VECTORS $src1, $a, $b),
> (G_CONCAT_VECTORS $src2, $c, $d),
> (G_SHUFFLE_VECTOR $root, $src1, $src2, $mask),
> ```
>
> ```
> def shuffle_vector_of_concats3 : GICombineRule<
> (defs root:$root, build_fn_matchinfo:$matchinfo),
> (match (G_CONCAT_VECTORS $src1, $a, $b, $c),
> (G_CONCAT_VECTORS $src2, $d, $e, $f),
> (G_SHUFFLE_VECTOR $root, $src1, $src2, $mask),
> ```
I believe using one pattern to match all the different G_CONCAT_VECTORS sizes would allow for more generalization of arbitrary G_CONCAT_VECTORS sizes until variable length arguments are supported in tablegen.
https://github.com/llvm/llvm-project/pull/87489
More information about the llvm-commits
mailing list