[llvm] [AArch64][GlobalISel] Combine Shuffles of G_CONCAT_VECTORS (PR #87489)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 6 13:31:41 PDT 2024


================
@@ -303,6 +303,79 @@ void CombinerHelper::applyCombineConcatVectors(MachineInstr &MI,
   replaceRegWith(MRI, DstReg, NewDstReg);
 }
 
+bool CombinerHelper::matchCombineShuffleConcat(MachineInstr &MI,
+                                               SmallVector<Register> &Ops) {
+  ArrayRef<int> Mask = MI.getOperand(3).getShuffleMask();
+  auto ConcatMI1 = dyn_cast<GConcatVectors>(
+      getDefIgnoringCopies(MI.getOperand(1).getReg(), MRI));
----------------
arsenm wrote:

Do we really need the IgnoringCopies? We have a copy elision combine that should make it unnecessary to handle ~anywhere 

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


More information about the llvm-commits mailing list