1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -march=amdgcn -mcpu=fiji -run-pass=instruction-select -verify-machineinstrs -o - %s | FileCheck -check-prefix=WAVE64 %s 3# RUN: llc -march=amdgcn -mcpu=gfx1010 -run-pass=instruction-select -verify-machineinstrs -o - %s | FileCheck -check-prefix=WAVE32 %s 4 5--- 6 7name: icmp_eq_s16_sv 8legalized: true 9regBankSelected: true 10 11body: | 12 bb.0: 13 liveins: $sgpr0, $vgpr0 14 15 ; WAVE64-LABEL: name: icmp_eq_s16_sv 16 ; WAVE64: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0 17 ; WAVE64: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0 18 ; WAVE64: [[V_CMP_EQ_U16_e64_:%[0-9]+]]:sreg_64 = V_CMP_EQ_U16_e64 [[COPY]], [[COPY1]], implicit $exec 19 ; WAVE64: S_ENDPGM 0, implicit [[V_CMP_EQ_U16_e64_]] 20 ; WAVE32-LABEL: name: icmp_eq_s16_sv 21 ; WAVE32: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0 22 ; WAVE32: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0 23 ; WAVE32: [[V_CMP_EQ_U16_e64_:%[0-9]+]]:sreg_32 = V_CMP_EQ_U16_e64 [[COPY]], [[COPY1]], implicit $exec 24 ; WAVE32: S_ENDPGM 0, implicit [[V_CMP_EQ_U16_e64_]] 25 %0:sgpr(s32) = COPY $sgpr0 26 %1:vgpr(s32) = COPY $vgpr0 27 %2:sgpr(s16) = G_TRUNC %0 28 %3:vgpr(s16) = G_TRUNC %1 29 %4:vcc(s1) = G_ICMP intpred(eq), %2, %3 30 S_ENDPGM 0, implicit %4 31... 32 33--- 34 35name: icmp_eq_s16_vs 36legalized: true 37regBankSelected: true 38 39body: | 40 bb.0: 41 liveins: $sgpr0, $vgpr0 42 43 ; WAVE64-LABEL: name: icmp_eq_s16_vs 44 ; WAVE64: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 45 ; WAVE64: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr0 46 ; WAVE64: [[V_CMP_EQ_U16_e64_:%[0-9]+]]:sreg_64 = V_CMP_EQ_U16_e64 [[COPY]], [[COPY1]], implicit $exec 47 ; WAVE64: S_ENDPGM 0, implicit [[V_CMP_EQ_U16_e64_]] 48 ; WAVE32-LABEL: name: icmp_eq_s16_vs 49 ; WAVE32: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 50 ; WAVE32: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr0 51 ; WAVE32: [[V_CMP_EQ_U16_e64_:%[0-9]+]]:sreg_32 = V_CMP_EQ_U16_e64 [[COPY]], [[COPY1]], implicit $exec 52 ; WAVE32: S_ENDPGM 0, implicit [[V_CMP_EQ_U16_e64_]] 53 %0:vgpr(s32) = COPY $vgpr0 54 %1:sgpr(s32) = COPY $sgpr0 55 %2:vgpr(s16) = G_TRUNC %0 56 %3:sgpr(s16) = G_TRUNC %1 57 %4:vcc(s1) = G_ICMP intpred(eq), %2, %3 58 S_ENDPGM 0, implicit %4 59... 60 61--- 62 63name: icmp_eq_s16_vv 64legalized: true 65regBankSelected: true 66 67body: | 68 bb.0: 69 liveins: $vgpr0, $vgpr1 70 71 ; WAVE64-LABEL: name: icmp_eq_s16_vv 72 ; WAVE64: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 73 ; WAVE64: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 74 ; WAVE64: [[V_CMP_EQ_U16_e64_:%[0-9]+]]:sreg_64 = V_CMP_EQ_U16_e64 [[COPY]], [[COPY1]], implicit $exec 75 ; WAVE64: S_ENDPGM 0, implicit [[V_CMP_EQ_U16_e64_]] 76 ; WAVE32-LABEL: name: icmp_eq_s16_vv 77 ; WAVE32: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 78 ; WAVE32: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 79 ; WAVE32: [[V_CMP_EQ_U16_e64_:%[0-9]+]]:sreg_32 = V_CMP_EQ_U16_e64 [[COPY]], [[COPY1]], implicit $exec 80 ; WAVE32: S_ENDPGM 0, implicit [[V_CMP_EQ_U16_e64_]] 81 %0:vgpr(s32) = COPY $vgpr0 82 %1:vgpr(s32) = COPY $vgpr1 83 %2:vgpr(s16) = G_TRUNC %0 84 %3:vgpr(s16) = G_TRUNC %1 85 %4:vcc(s1) = G_ICMP intpred(eq), %2, %3 86 S_ENDPGM 0, implicit %4 87... 88 89--- 90 91name: icmp_ne_s16_vv 92legalized: true 93regBankSelected: true 94 95body: | 96 bb.0: 97 liveins: $vgpr0, $vgpr1 98 99 ; WAVE64-LABEL: name: icmp_ne_s16_vv 100 ; WAVE64: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 101 ; WAVE64: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 102 ; WAVE64: [[V_CMP_NE_U16_e64_:%[0-9]+]]:sreg_64 = V_CMP_NE_U16_e64 [[COPY]], [[COPY1]], implicit $exec 103 ; WAVE64: S_ENDPGM 0, implicit [[V_CMP_NE_U16_e64_]] 104 ; WAVE32-LABEL: name: icmp_ne_s16_vv 105 ; WAVE32: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 106 ; WAVE32: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 107 ; WAVE32: [[V_CMP_NE_U16_e64_:%[0-9]+]]:sreg_32 = V_CMP_NE_U16_e64 [[COPY]], [[COPY1]], implicit $exec 108 ; WAVE32: S_ENDPGM 0, implicit [[V_CMP_NE_U16_e64_]] 109 %0:vgpr(s32) = COPY $vgpr0 110 %1:vgpr(s32) = COPY $vgpr1 111 %2:vgpr(s16) = G_TRUNC %0 112 %3:vgpr(s16) = G_TRUNC %1 113 %4:vcc(s1) = G_ICMP intpred(ne), %2, %3 114 S_ENDPGM 0, implicit %4 115... 116 117--- 118 119name: icmp_slt_s16_vv 120legalized: true 121regBankSelected: true 122 123body: | 124 bb.0: 125 liveins: $vgpr0, $vgpr1 126 127 ; WAVE64-LABEL: name: icmp_slt_s16_vv 128 ; WAVE64: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 129 ; WAVE64: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 130 ; WAVE64: [[V_CMP_LT_I16_e64_:%[0-9]+]]:sreg_64 = V_CMP_LT_I16_e64 [[COPY]], [[COPY1]], implicit $exec 131 ; WAVE64: S_ENDPGM 0, implicit [[V_CMP_LT_I16_e64_]] 132 ; WAVE32-LABEL: name: icmp_slt_s16_vv 133 ; WAVE32: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 134 ; WAVE32: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 135 ; WAVE32: [[V_CMP_LT_I16_e64_:%[0-9]+]]:sreg_32 = V_CMP_LT_I16_e64 [[COPY]], [[COPY1]], implicit $exec 136 ; WAVE32: S_ENDPGM 0, implicit [[V_CMP_LT_I16_e64_]] 137 %0:vgpr(s32) = COPY $vgpr0 138 %1:vgpr(s32) = COPY $vgpr1 139 %2:vgpr(s16) = G_TRUNC %0 140 %3:vgpr(s16) = G_TRUNC %1 141 %4:vcc(s1) = G_ICMP intpred(slt), %2, %3 142 S_ENDPGM 0, implicit %4 143... 144 145--- 146 147name: icmp_sle_s16_vv 148legalized: true 149regBankSelected: true 150 151body: | 152 bb.0: 153 liveins: $vgpr0, $vgpr1 154 155 ; WAVE64-LABEL: name: icmp_sle_s16_vv 156 ; WAVE64: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 157 ; WAVE64: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 158 ; WAVE64: [[V_CMP_LE_I16_e64_:%[0-9]+]]:sreg_64 = V_CMP_LE_I16_e64 [[COPY]], [[COPY1]], implicit $exec 159 ; WAVE64: S_ENDPGM 0, implicit [[V_CMP_LE_I16_e64_]] 160 ; WAVE32-LABEL: name: icmp_sle_s16_vv 161 ; WAVE32: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 162 ; WAVE32: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 163 ; WAVE32: [[V_CMP_LE_I16_e64_:%[0-9]+]]:sreg_32 = V_CMP_LE_I16_e64 [[COPY]], [[COPY1]], implicit $exec 164 ; WAVE32: S_ENDPGM 0, implicit [[V_CMP_LE_I16_e64_]] 165 %0:vgpr(s32) = COPY $vgpr0 166 %1:vgpr(s32) = COPY $vgpr1 167 %2:vgpr(s16) = G_TRUNC %0 168 %3:vgpr(s16) = G_TRUNC %1 169 %4:vcc(s1) = G_ICMP intpred(sle), %2, %3 170 S_ENDPGM 0, implicit %4 171... 172 173--- 174 175name: icmp_ult_s16_vv 176legalized: true 177regBankSelected: true 178 179body: | 180 bb.0: 181 liveins: $vgpr0, $vgpr1 182 183 ; WAVE64-LABEL: name: icmp_ult_s16_vv 184 ; WAVE64: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 185 ; WAVE64: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 186 ; WAVE64: [[V_CMP_LT_U16_e64_:%[0-9]+]]:sreg_64 = V_CMP_LT_U16_e64 [[COPY]], [[COPY1]], implicit $exec 187 ; WAVE64: S_ENDPGM 0, implicit [[V_CMP_LT_U16_e64_]] 188 ; WAVE32-LABEL: name: icmp_ult_s16_vv 189 ; WAVE32: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 190 ; WAVE32: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 191 ; WAVE32: [[V_CMP_LT_U16_e64_:%[0-9]+]]:sreg_32 = V_CMP_LT_U16_e64 [[COPY]], [[COPY1]], implicit $exec 192 ; WAVE32: S_ENDPGM 0, implicit [[V_CMP_LT_U16_e64_]] 193 %0:vgpr(s32) = COPY $vgpr0 194 %1:vgpr(s32) = COPY $vgpr1 195 %2:vgpr(s16) = G_TRUNC %0 196 %3:vgpr(s16) = G_TRUNC %1 197 %4:vcc(s1) = G_ICMP intpred(ult), %2, %3 198 S_ENDPGM 0, implicit %4 199... 200 201--- 202 203name: icmp_ule_s16_vv 204legalized: true 205regBankSelected: true 206 207body: | 208 bb.0: 209 liveins: $vgpr0, $vgpr1 210 211 ; WAVE64-LABEL: name: icmp_ule_s16_vv 212 ; WAVE64: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 213 ; WAVE64: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 214 ; WAVE64: [[V_CMP_LE_U16_e64_:%[0-9]+]]:sreg_64 = V_CMP_LE_U16_e64 [[COPY]], [[COPY1]], implicit $exec 215 ; WAVE64: S_ENDPGM 0, implicit [[V_CMP_LE_U16_e64_]] 216 ; WAVE32-LABEL: name: icmp_ule_s16_vv 217 ; WAVE32: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0 218 ; WAVE32: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1 219 ; WAVE32: [[V_CMP_LE_U16_e64_:%[0-9]+]]:sreg_32 = V_CMP_LE_U16_e64 [[COPY]], [[COPY1]], implicit $exec 220 ; WAVE32: S_ENDPGM 0, implicit [[V_CMP_LE_U16_e64_]] 221 %0:vgpr(s32) = COPY $vgpr0 222 %1:vgpr(s32) = COPY $vgpr1 223 %2:vgpr(s16) = G_TRUNC %0 224 %3:vgpr(s16) = G_TRUNC %1 225 %4:vcc(s1) = G_ICMP intpred(ule), %2, %3 226 S_ENDPGM 0, implicit %4 227... 228 229