1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-fast | FileCheck %s 3# RUN: llc -march=amdgcn -mcpu=gfx900 -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-greedy | FileCheck %s 4 5--- 6name: add_v2s16_ss 7legalized: true 8 9body: | 10 bb.0: 11 liveins: $sgpr0, $sgpr1 12 ; CHECK-LABEL: name: add_v2s16_ss 13 ; CHECK: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0 14 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr1 15 ; CHECK: [[BITCAST:%[0-9]+]]:sgpr(s32) = G_BITCAST [[COPY]](<2 x s16>) 16 ; CHECK: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 16 17 ; CHECK: [[LSHR:%[0-9]+]]:sgpr(s32) = G_LSHR [[BITCAST]], [[C]](s32) 18 ; CHECK: [[BITCAST1:%[0-9]+]]:sgpr(s32) = G_BITCAST [[COPY1]](<2 x s16>) 19 ; CHECK: [[C1:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 16 20 ; CHECK: [[LSHR1:%[0-9]+]]:sgpr(s32) = G_LSHR [[BITCAST1]], [[C1]](s32) 21 ; CHECK: [[ADD:%[0-9]+]]:sgpr(s32) = G_ADD [[BITCAST]], [[BITCAST1]] 22 ; CHECK: [[ADD1:%[0-9]+]]:sgpr(s32) = G_ADD [[LSHR]], [[LSHR1]] 23 ; CHECK: [[BUILD_VECTOR_TRUNC:%[0-9]+]]:sgpr(<2 x s16>) = G_BUILD_VECTOR_TRUNC [[ADD]](s32), [[ADD1]](s32) 24 ; CHECK: S_ENDPGM 0, implicit [[BUILD_VECTOR_TRUNC]](<2 x s16>) 25 %0:_(<2 x s16>) = COPY $sgpr0 26 %1:_(<2 x s16>) = COPY $sgpr1 27 %2:_(<2 x s16>) = G_ADD %0, %1 28 S_ENDPGM 0, implicit %2 29... 30 31--- 32name: add_v2s16_sv 33legalized: true 34 35body: | 36 bb.0: 37 liveins: $sgpr0, $vgpr0 38 ; CHECK-LABEL: name: add_v2s16_sv 39 ; CHECK: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0 40 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0 41 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(<2 x s16>) = COPY [[COPY]](<2 x s16>) 42 ; CHECK: [[ADD:%[0-9]+]]:vgpr(<2 x s16>) = G_ADD [[COPY2]], [[COPY1]] 43 ; CHECK: S_ENDPGM 0, implicit [[ADD]](<2 x s16>) 44 %0:_(<2 x s16>) = COPY $sgpr0 45 %1:_(<2 x s16>) = COPY $vgpr0 46 %2:_(<2 x s16>) = G_ADD %0, %1 47 S_ENDPGM 0, implicit %2 48... 49 50--- 51name: add_v2s16_vs 52legalized: true 53 54body: | 55 bb.0: 56 liveins: $sgpr0, $vgpr0 57 ; CHECK-LABEL: name: add_v2s16_vs 58 ; CHECK: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0 59 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0 60 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(<2 x s16>) = COPY [[COPY1]](<2 x s16>) 61 ; CHECK: [[ADD:%[0-9]+]]:vgpr(<2 x s16>) = G_ADD [[COPY]], [[COPY2]] 62 %0:_(<2 x s16>) = COPY $vgpr0 63 %1:_(<2 x s16>) = COPY $sgpr0 64 %2:_(<2 x s16>) = G_ADD %0, %1 65... 66 67--- 68name: add_v2s16_vv 69legalized: true 70 71body: | 72 bb.0: 73 liveins: $vgpr0, $vgpr1 74 ; CHECK-LABEL: name: add_v2s16_vv 75 ; CHECK: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0 76 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr1 77 ; CHECK: [[ADD:%[0-9]+]]:vgpr(<2 x s16>) = G_ADD [[COPY]], [[COPY1]] 78 ; CHECK: S_ENDPGM 0, implicit [[ADD]](<2 x s16>) 79 %0:_(<2 x s16>) = COPY $vgpr0 80 %1:_(<2 x s16>) = COPY $vgpr1 81 %2:_(<2 x s16>) = G_ADD %0, %1 82 S_ENDPGM 0, implicit %2 83... 84