1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -march=amdgcn -mcpu=gfx908 -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-fast | FileCheck %s 3# RUN: llc -march=amdgcn -mcpu=gfx908 -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-greedy | FileCheck %s 4 5--- 6name: insert_lo32_i64_ss 7legalized: true 8 9body: | 10 bb.0: 11 liveins: $sgpr0_sgpr1, $sgpr2 12 ; CHECK-LABEL: name: insert_lo32_i64_ss 13 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1 14 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 15 ; CHECK: [[INSERT:%[0-9]+]]:sgpr(s64) = G_INSERT [[COPY]], [[COPY1]](s32), 0 16 %0:_(s64) = COPY $sgpr0_sgpr1 17 %1:_(s32) = COPY $sgpr2 18 %2:_(s64) = G_INSERT %0, %1, 0 19... 20 21--- 22name: insert_lo32_i64_sv 23legalized: true 24 25body: | 26 bb.0: 27 liveins: $sgpr0_sgpr1, $vgpr2 28 ; CHECK-LABEL: name: insert_lo32_i64_sv 29 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1 30 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr2 31 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64) 32 ; CHECK: [[INSERT:%[0-9]+]]:vgpr(s64) = G_INSERT [[COPY2]], [[COPY1]](s32), 0 33 %0:_(s64) = COPY $sgpr0_sgpr1 34 %1:_(s32) = COPY $vgpr2 35 %2:_(s64) = G_INSERT %0, %1, 0 36... 37--- 38name: insert_lo32_i64_vs 39legalized: true 40 41body: | 42 bb.0: 43 liveins: $vgpr0_vgpr1, $sgpr2 44 ; CHECK-LABEL: name: insert_lo32_i64_vs 45 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1 46 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 47 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32) 48 ; CHECK: [[INSERT:%[0-9]+]]:vgpr(s64) = G_INSERT [[COPY]], [[COPY2]](s32), 0 49 %0:_(s64) = COPY $vgpr0_vgpr1 50 %1:_(s32) = COPY $sgpr2 51 %2:_(s64) = G_INSERT %0, %1, 0 52... 53--- 54name: insert_lo32_i64_vv 55legalized: true 56 57body: | 58 bb.0: 59 liveins: $vgpr0_vgpr1, $vgpr2 60 ; CHECK-LABEL: name: insert_lo32_i64_vv 61 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1 62 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 63 ; CHECK: [[INSERT:%[0-9]+]]:sgpr(s64) = G_INSERT [[COPY]], [[COPY1]](s32), 0 64 %0:_(s64) = COPY $sgpr0_sgpr1 65 %1:_(s32) = COPY $sgpr2 66 %2:_(s64) = G_INSERT %0, %1, 0 67... 68 69--- 70name: insert_lo32_i96_v 71legalized: true 72 73body: | 74 bb.0: 75 liveins: $vgpr0_vgpr1_vgpr2, $vgpr3 76 ; CHECK-LABEL: name: insert_lo32_i96_v 77 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s96) = COPY $vgpr0_vgpr1_vgpr2 78 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr3 79 ; CHECK: [[INSERT:%[0-9]+]]:vgpr(s96) = G_INSERT [[COPY]], [[COPY1]](s32), 0 80 %0:_(s96) = COPY $vgpr0_vgpr1_vgpr2 81 %1:_(s32) = COPY $vgpr3 82 %2:_(s96) = G_INSERT %0, %1, 0 83... 84 85--- 86name: insert_lo32_i64_aa 87legalized: true 88 89body: | 90 bb.0: 91 liveins: $agpr0_agpr1, $agpr2 92 ; CHECK-LABEL: name: insert_lo32_i64_aa 93 ; CHECK: [[COPY:%[0-9]+]]:agpr(s64) = COPY $agpr0_agpr1 94 ; CHECK: [[COPY1:%[0-9]+]]:agpr(s32) = COPY $agpr2 95 ; CHECK: [[INSERT:%[0-9]+]]:agpr(s64) = G_INSERT [[COPY]], [[COPY1]](s32), 0 96 %0:_(s64) = COPY $agpr0_agpr1 97 %1:_(s32) = COPY $agpr2 98 %2:_(s64) = G_INSERT %0, %1, 0 99... 100 101--- 102name: insert_lo32_i64_av 103legalized: true 104 105body: | 106 bb.0: 107 liveins: $agpr0_agpr1, $vgpr2 108 ; CHECK-LABEL: name: insert_lo32_i64_av 109 ; CHECK: [[COPY:%[0-9]+]]:agpr(s64) = COPY $agpr0_agpr1 110 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr2 111 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64) 112 ; CHECK: [[INSERT:%[0-9]+]]:vgpr(s64) = G_INSERT [[COPY2]], [[COPY1]](s32), 0 113 %0:_(s64) = COPY $agpr0_agpr1 114 %1:_(s32) = COPY $vgpr2 115 %2:_(s64) = G_INSERT %0, %1, 0 116... 117--- 118name: insert_lo32_i64_va 119legalized: true 120 121body: | 122 bb.0: 123 liveins: $vgpr0_vgpr1, $agpr2 124 ; CHECK-LABEL: name: insert_lo32_i64_va 125 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1 126 ; CHECK: [[COPY1:%[0-9]+]]:agpr(s32) = COPY $agpr2 127 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32) 128 ; CHECK: [[INSERT:%[0-9]+]]:vgpr(s64) = G_INSERT [[COPY]], [[COPY2]](s32), 0 129 %0:_(s64) = COPY $vgpr0_vgpr1 130 %1:_(s32) = COPY $agpr2 131 %2:_(s64) = G_INSERT %0, %1, 0 132... 133 134--- 135name: insert_lo32_i64_as 136legalized: true 137 138body: | 139 bb.0: 140 liveins: $agpr0_agpr1, $sgpr2 141 ; CHECK-LABEL: name: insert_lo32_i64_as 142 ; CHECK: [[COPY:%[0-9]+]]:agpr(s64) = COPY $agpr0_agpr1 143 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 144 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64) 145 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32) 146 ; CHECK: [[INSERT:%[0-9]+]]:vgpr(s64) = G_INSERT [[COPY2]], [[COPY3]](s32), 0 147 %0:_(s64) = COPY $agpr0_agpr1 148 %1:_(s32) = COPY $sgpr2 149 %2:_(s64) = G_INSERT %0, %1, 0 150... 151--- 152name: insert_lo32_i64_sa 153legalized: true 154 155body: | 156 bb.0: 157 liveins: $sgpr0_sgpr1, $agpr2 158 ; CHECK-LABEL: name: insert_lo32_i64_sa 159 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1 160 ; CHECK: [[COPY1:%[0-9]+]]:agpr(s32) = COPY $agpr2 161 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY [[COPY]](s64) 162 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32) 163 ; CHECK: [[INSERT:%[0-9]+]]:vgpr(s64) = G_INSERT [[COPY2]], [[COPY3]](s32), 0 164 %0:_(s64) = COPY $sgpr0_sgpr1 165 %1:_(s32) = COPY $agpr2 166 %2:_(s64) = G_INSERT %0, %1, 0 167... 168