1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-fast | FileCheck %s 3# RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-greedy | FileCheck %s 4 5--- 6name: merge_s32_s32_s64_s 7legalized: true 8 9body: | 10 bb.0: 11 liveins: $sgpr0, $sgpr1 12 ; CHECK-LABEL: name: merge_s32_s32_s64_s 13 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1 14 ; CHECK: [[EXTRACT:%[0-9]+]]:sgpr(s32) = G_EXTRACT [[COPY]](s64), 0 15 ; CHECK: [[EXTRACT1:%[0-9]+]]:sgpr(s32) = G_EXTRACT [[COPY]](s64), 32 16 ; CHECK: [[MV:%[0-9]+]]:sgpr(s64) = G_MERGE_VALUES [[EXTRACT]](s32), [[EXTRACT1]](s32) 17 ; CHECK: S_ENDPGM implicit [[MV]](s64) 18 %0:_(s64) = COPY $sgpr0_sgpr1 19 %1:_(s32) = G_EXTRACT %0, 0 20 %2:_(s32) = G_EXTRACT %0, 32 21 %3:_(s64) = G_MERGE_VALUES %1, %2 22 S_ENDPGM implicit %3 23... 24 25--- 26name: merge_s32_s32_s64_v 27legalized: true 28 29body: | 30 bb.0: 31 liveins: $vgpr0, $vgpr1 32 ; CHECK-LABEL: name: merge_s32_s32_s64_v 33 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1 34 ; CHECK: [[EXTRACT:%[0-9]+]]:vgpr(s32) = G_EXTRACT [[COPY]](s64), 0 35 ; CHECK: [[EXTRACT1:%[0-9]+]]:vgpr(s32) = G_EXTRACT [[COPY]](s64), 32 36 ; CHECK: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[EXTRACT]](s32), [[EXTRACT1]](s32) 37 ; CHECK: S_ENDPGM implicit [[MV]](s64) 38 %0:_(s64) = COPY $vgpr0_vgpr1 39 %1:_(s32) = G_EXTRACT %0, 0 40 %2:_(s32) = G_EXTRACT %0, 32 41 %3:_(s64) = G_MERGE_VALUES %1, %2 42 S_ENDPGM implicit %3 43... 44 45