[llvm] [AArch64][GlobalISel] Combine G_EXTRACT_VECTOR_ELT and G_BUILD_VECTOR sequences into G_SHUFFLE_VECTOR (PR #110545)

Amara Emerson via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 10 15:50:52 PDT 2024


aemerson wrote:

> FWIW the DAG does try to do this: https://github.com/llvm/llvm-project/blob/f0ed31ce4b63a5530fd1de875c0d1467d4d2c6ea/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp#L24096
> 
> I can see this pattern appearing if some operations require some degree of vector splitting, and others do not

Yeah but I don't think it's a good transformation to do if we can express the shuffle in a simpler & equally compact way. I can see that being helpful for long, complex sequences of extracts/inserts but if we know the idiom (e.g. concat) we should go directly.

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


More information about the llvm-commits mailing list