[llvm] [AArch64][GlobalISel] Combine G_EXTRACT_VECTOR_ELT and G_BUILD_VECTOR sequences into G_SHUFFLE_VECTOR (PR #110545)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 11 06:31:51 PDT 2024
================
@@ -4205,6 +4218,76 @@ void CombinerHelper::applyExtractVecEltBuildVec(MachineInstr &MI,
replaceSingleDefInstWithReg(MI, Reg);
}
+bool CombinerHelper::matchCombineExtractToShuffle(
----------------
arsenm wrote:
I suggest to follow along with the DAG version; you'll want something similar to buildLegalVectorShuffle, which will avoid creating shuffles which will just be broken up again https://github.com/llvm/llvm-project/blob/33c14f19656c751bbbc083e4a168ab898e583bfd/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp#L23501
https://github.com/llvm/llvm-project/pull/110545
More information about the llvm-commits
mailing list