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
6 name: build_vector_v2s16_s32_ss
11 liveins: $sgpr0, $sgpr1
12 ; CHECK-LABEL: name: build_vector_v2s16_s32_ss
13 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
14 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
15 ; CHECK: [[TRUNC:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY]](s32)
16 ; CHECK: [[TRUNC1:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY1]](s32)
17 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:sgpr(<2 x s16>) = G_BUILD_VECTOR [[TRUNC]](s16), [[TRUNC1]](s16)
18 %0:_(s32) = COPY $sgpr0
19 %1:_(s32) = COPY $sgpr1
20 %2:_(s16) = G_TRUNC %0
21 %3:_(s16) = G_TRUNC %1
22 %4:_(<2 x s16>) = G_BUILD_VECTOR %2, %3
26 name: build_vector_v2s16_s32_sv
31 liveins: $sgpr0, $vgpr0
33 ; CHECK-LABEL: name: build_vector_v2s16_s32_sv
34 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
35 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
36 ; CHECK: [[TRUNC:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY]](s32)
37 ; CHECK: [[TRUNC1:%[0-9]+]]:vgpr(s16) = G_TRUNC [[COPY1]](s32)
38 ; CHECK: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s16)
39 ; CHECK: [[ZEXT1:%[0-9]+]]:vgpr(s32) = G_ZEXT [[TRUNC1]](s16)
40 ; CHECK: [[C:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 16
41 ; CHECK: [[SHL:%[0-9]+]]:vgpr(s32) = G_SHL [[ZEXT1]], [[C]](s32)
42 ; CHECK: [[OR:%[0-9]+]]:vgpr(s32) = G_OR [[ZEXT]], [[SHL]]
43 ; CHECK: [[BITCAST:%[0-9]+]]:vgpr(<2 x s16>) = G_BITCAST [[OR]](s32)
44 %0:_(s32) = COPY $sgpr0
45 %1:_(s32) = COPY $vgpr0
46 %2:_(s16) = G_TRUNC %0
47 %3:_(s16) = G_TRUNC %1
48 %4:_(<2 x s16>) = G_BUILD_VECTOR %2, %3
52 name: build_vector_v2s16_s32_vs
57 liveins: $vgpr0, $sgpr0
58 ; CHECK-LABEL: name: build_vector_v2s16_s32_vs
59 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
60 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
61 ; CHECK: [[TRUNC:%[0-9]+]]:vgpr(s16) = G_TRUNC [[COPY]](s32)
62 ; CHECK: [[TRUNC1:%[0-9]+]]:sgpr(s16) = G_TRUNC [[COPY1]](s32)
63 ; CHECK: [[ZEXT:%[0-9]+]]:vgpr(s32) = G_ZEXT [[TRUNC]](s16)
64 ; CHECK: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s16)
65 ; CHECK: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 16
66 ; CHECK: [[SHL:%[0-9]+]]:sgpr(s32) = G_SHL [[ZEXT1]], [[C]](s32)
67 ; CHECK: [[OR:%[0-9]+]]:vgpr(s32) = G_OR [[ZEXT]], [[SHL]]
68 ; CHECK: [[BITCAST:%[0-9]+]]:vgpr(<2 x s16>) = G_BITCAST [[OR]](s32)
69 %0:_(s32) = COPY $vgpr0
70 %1:_(s32) = COPY $sgpr0
71 %2:_(s16) = G_TRUNC %0
72 %3:_(s16) = G_TRUNC %1
73 %4:_(<2 x s16>) = G_BUILD_VECTOR %2, %3
77 name: build_vector_v2s16_s32_vv
82 liveins: $vgpr0, $vgpr1
83 ; CHECK-LABEL: name: build_vector_v2s16_s32_vv
84 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
85 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
86 ; CHECK: [[TRUNC:%[0-9]+]]:vgpr(s16) = G_TRUNC [[COPY]](s32)
87 ; CHECK: [[TRUNC1:%[0-9]+]]:vgpr(s16) = G_TRUNC [[COPY1]](s32)
88 ; CHECK: [[ZEXT:%[0-9]+]]:vgpr(s32) = G_ZEXT [[TRUNC]](s16)
89 ; CHECK: [[ZEXT1:%[0-9]+]]:vgpr(s32) = G_ZEXT [[TRUNC1]](s16)
90 ; CHECK: [[C:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 16
91 ; CHECK: [[SHL:%[0-9]+]]:vgpr(s32) = G_SHL [[ZEXT1]], [[C]](s32)
92 ; CHECK: [[OR:%[0-9]+]]:vgpr(s32) = G_OR [[ZEXT]], [[SHL]]
93 ; CHECK: [[BITCAST:%[0-9]+]]:vgpr(<2 x s16>) = G_BITCAST [[OR]](s32)
94 %0:_(s32) = COPY $vgpr0
95 %1:_(s32) = COPY $vgpr1
96 %2:_(s16) = G_TRUNC %0
97 %3:_(s16) = G_TRUNC %1
98 %4:_(<2 x s16>) = G_BUILD_VECTOR %2, %3