[llvm] [GlobalISel][AArch64] Combine unmerge(G_EXT v, undef) to unmerge(v). (PR #65263)

Amara Emerson via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 5 04:00:09 PDT 2023


================
@@ -1067,6 +1067,53 @@ void applyVectorSextInReg(MachineInstr &MI, MachineRegisterInfo &MRI,
   Helper.lower(MI, 0, /* Unused hint type */ LLT());
 }
 
+/// Combine <N x t>, unused = unmerge(G_EXT <2*N x t> v, undef, N)
+///           => unused, <N x t> = unmerge v
+bool matchUnmergeExtToUnmerge(MachineInstr &MI, MachineRegisterInfo &MRI,
+                              Register &MatchInfo) {
+  assert(MI.getOpcode() == TargetOpcode::G_UNMERGE_VALUES);
----------------
aemerson wrote:

We have 'GUnmerge'.

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


More information about the llvm-commits mailing list