[GlobalISel] Restrict G_MERGE_VALUES capability and replace with new opcodes.
This patch restricts the capability of G_MERGE_VALUES, and uses the new G_BUILD_VECTOR and G_CONCAT_VECTOR opcodes instead in the appropriate places.
The MIRBuilder is modified to generate G_CONCAT when trying to create MERGE_VALUES of vectors.
This patch also includes AArch64 support for selecting G_BUILD_VECTOR of 4xs32 and 2xs64 vectors.
Could you handle G_BUILD_VECTOR as well? We are unable to legalize the test below because of the missing combine.
--- name: test_unmerge body: | bb.1: liveins: $w0 %0:_(s32) = COPY $w0 %1:_(<2 x s32>) = G_BUILD_VECTOR %0(s32), %0(s32) %2:_(s32), %3:_(s32) = G_UNMERGE_VALUES %1(<2 x s32>) $w0 = COPY %2(s32) ...