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