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 -pass-remarks-missed='gisel*' -global-isel-abort=2 -o - %s 2> %t | FileCheck -check-prefix=GFX8 %s 3# RUN: FileCheck -check-prefixes=ERR,GFX8-ERR %s < %t 4 5# RUN: llc -march=amdgcn -mcpu=tahiti -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=2 -pass-remarks-missed='gisel*' -o - %s 2> %t | FileCheck -check-prefix=GFX6 %s 6# RUN: FileCheck -check-prefixes=ERR,GFX6-ERR %s < %t 7 8 9# ERR-NOT: remark 10 11# GFX6-ERR: remark: <unknown>:0:0: cannot select: %2:sgpr(s32) = G_ICMP intpred(eq), %0:sgpr(s64), %1:sgpr (in function: icmp_eq_s64_ss) 12# GFX6-ERR-NEXT: remark: <unknown>:0:0: cannot select: %2:sgpr(s32) = G_ICMP intpred(ne), %0:sgpr(s64), %1:sgpr (in function: icmp_ne_s64_ss) 13# GFX6-ERR-NEXT: remark: <unknown>:0:0: cannot select: %2:sgpr(s32) = G_ICMP intpred(slt), %0:sgpr(s64), %1:sgpr (in function: icmp_slt_s64_ss) 14# GFX6-ERR-NEXT: remark: <unknown>:0:0: cannot select: %2:sgpr(s32) = G_ICMP intpred(eq), %0:sgpr(p0), %1:sgpr (in function: icmp_eq_p0_ss) 15# GFX6-ERR-NEXT: remark: <unknown>:0:0: cannot select: %2:sgpr(s32) = G_ICMP intpred(eq), %0:sgpr(p1), %1:sgpr (in function: icmp_eq_p1_ss) 16# GFX6-ERR-NEXT: remark: <unknown>:0:0: cannot select: %2:sgpr(s32) = G_ICMP intpred(eq), %0:sgpr(p999), %1:sgpr (in function: icmp_eq_p999_ss) 17 18# GFX8-ERR: remark: <unknown>:0:0: cannot select: %2:sgpr(s32) = G_ICMP intpred(slt), %0:sgpr(s64), %1:sgpr (in function: icmp_slt_s64_ss) 19 20# ERR-NOT: remark 21 22--- 23name: icmp_eq_s64_ss 24legalized: true 25regBankSelected: true 26 27body: | 28 bb.0: 29 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3 30 31 ; GFX8-LABEL: name: icmp_eq_s64_ss 32 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 33 ; GFX8: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3 34 ; GFX8: S_CMP_EQ_U64 [[COPY]], [[COPY1]], implicit-def $scc 35 ; GFX8: [[COPY2:%[0-9]+]]:sreg_32 = COPY $scc 36 ; GFX8: S_ENDPGM 0, implicit [[COPY2]] 37 ; GFX6-LABEL: name: icmp_eq_s64_ss 38 ; GFX6: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1 39 ; GFX6: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3 40 ; GFX6: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s64), [[COPY1]] 41 ; GFX6: S_ENDPGM 0, implicit [[ICMP]](s32) 42 %0:sgpr(s64) = COPY $sgpr0_sgpr1 43 %1:sgpr(s64) = COPY $sgpr2_sgpr3 44 %2:sgpr(s32) = G_ICMP intpred(eq), %0, %1 45 S_ENDPGM 0, implicit %2 46 47... 48 49--- 50name: icmp_ne_s64_ss 51legalized: true 52regBankSelected: true 53 54body: | 55 bb.0: 56 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3 57 58 ; GFX8-LABEL: name: icmp_ne_s64_ss 59 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 60 ; GFX8: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3 61 ; GFX8: S_CMP_LG_U64 [[COPY]], [[COPY1]], implicit-def $scc 62 ; GFX8: [[COPY2:%[0-9]+]]:sreg_32 = COPY $scc 63 ; GFX8: S_ENDPGM 0, implicit [[COPY2]] 64 ; GFX6-LABEL: name: icmp_ne_s64_ss 65 ; GFX6: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1 66 ; GFX6: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3 67 ; GFX6: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(ne), [[COPY]](s64), [[COPY1]] 68 ; GFX6: S_ENDPGM 0, implicit [[ICMP]](s32) 69 %0:sgpr(s64) = COPY $sgpr0_sgpr1 70 %1:sgpr(s64) = COPY $sgpr2_sgpr3 71 %2:sgpr(s32) = G_ICMP intpred(ne), %0, %1 72 S_ENDPGM 0, implicit %2 73 74... 75 76--- 77name: icmp_slt_s64_ss 78legalized: true 79regBankSelected: true 80 81body: | 82 bb.0: 83 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3 84 85 ; GFX8-LABEL: name: icmp_slt_s64_ss 86 ; GFX8: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1 87 ; GFX8: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3 88 ; GFX8: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(slt), [[COPY]](s64), [[COPY1]] 89 ; GFX8: S_ENDPGM 0, implicit [[ICMP]](s32) 90 ; GFX6-LABEL: name: icmp_slt_s64_ss 91 ; GFX6: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1 92 ; GFX6: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3 93 ; GFX6: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(slt), [[COPY]](s64), [[COPY1]] 94 ; GFX6: S_ENDPGM 0, implicit [[ICMP]](s32) 95 %0:sgpr(s64) = COPY $sgpr0_sgpr1 96 %1:sgpr(s64) = COPY $sgpr2_sgpr3 97 %2:sgpr(s32) = G_ICMP intpred(slt), %0, %1 98 S_ENDPGM 0, implicit %2 99 100... 101 102--- 103name: icmp_eq_s64_vv 104legalized: true 105regBankSelected: true 106 107body: | 108 bb.0: 109 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3 110 111 ; GFX8-LABEL: name: icmp_eq_s64_vv 112 ; GFX8: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 113 ; GFX8: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 114 ; GFX8: [[V_CMP_EQ_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U64_e64 [[COPY]], [[COPY1]], implicit $exec 115 ; GFX8: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_EQ_U64_e64_]] 116 ; GFX8: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec 117 ; GFX8: S_ENDPGM 0, implicit [[V_AND_B32_e32_]] 118 ; GFX6-LABEL: name: icmp_eq_s64_vv 119 ; GFX6: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 120 ; GFX6: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 121 ; GFX6: [[V_CMP_EQ_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U64_e64 [[COPY]], [[COPY1]], implicit $exec 122 ; GFX6: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_EQ_U64_e64_]] 123 ; GFX6: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec 124 ; GFX6: S_ENDPGM 0, implicit [[V_AND_B32_e32_]] 125 %0:vgpr(s64) = COPY $vgpr0_vgpr1 126 %1:vgpr(s64) = COPY $vgpr2_vgpr3 127 %2:vcc(s1) = G_ICMP intpred(eq), %0, %1 128 %3:vgpr(s1) = COPY %2 129 %4:vgpr(s32) = G_ZEXT %3 130 S_ENDPGM 0, implicit %4 131 132... 133 134--- 135name: icmp_ne_s64_vv 136legalized: true 137regBankSelected: true 138 139body: | 140 bb.0: 141 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3 142 143 ; GFX8-LABEL: name: icmp_ne_s64_vv 144 ; GFX8: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 145 ; GFX8: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 146 ; GFX8: [[V_CMP_NE_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_NE_U64_e64 [[COPY]], [[COPY1]], implicit $exec 147 ; GFX8: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_NE_U64_e64_]] 148 ; GFX8: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec 149 ; GFX8: S_ENDPGM 0, implicit [[V_AND_B32_e32_]] 150 ; GFX6-LABEL: name: icmp_ne_s64_vv 151 ; GFX6: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 152 ; GFX6: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 153 ; GFX6: [[V_CMP_NE_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_NE_U64_e64 [[COPY]], [[COPY1]], implicit $exec 154 ; GFX6: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_NE_U64_e64_]] 155 ; GFX6: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec 156 ; GFX6: S_ENDPGM 0, implicit [[V_AND_B32_e32_]] 157 %0:vgpr(s64) = COPY $vgpr0_vgpr1 158 %1:vgpr(s64) = COPY $vgpr2_vgpr3 159 %2:vcc(s1) = G_ICMP intpred(ne), %0, %1 160 %3:vgpr(s1) = COPY %2 161 %4:vgpr(s32) = G_ZEXT %3 162 S_ENDPGM 0, implicit %4 163 164... 165 166--- 167name: icmp_sgt_s64_vv 168legalized: true 169regBankSelected: true 170 171body: | 172 bb.0: 173 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3 174 175 ; GFX8-LABEL: name: icmp_sgt_s64_vv 176 ; GFX8: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 177 ; GFX8: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 178 ; GFX8: [[V_CMP_GT_I64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_GT_I64_e64 [[COPY]], [[COPY1]], implicit $exec 179 ; GFX8: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_GT_I64_e64_]] 180 ; GFX8: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec 181 ; GFX8: S_ENDPGM 0, implicit [[V_AND_B32_e32_]] 182 ; GFX6-LABEL: name: icmp_sgt_s64_vv 183 ; GFX6: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 184 ; GFX6: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 185 ; GFX6: [[V_CMP_GT_I64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_GT_I64_e64 [[COPY]], [[COPY1]], implicit $exec 186 ; GFX6: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_GT_I64_e64_]] 187 ; GFX6: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec 188 ; GFX6: S_ENDPGM 0, implicit [[V_AND_B32_e32_]] 189 %0:vgpr(s64) = COPY $vgpr0_vgpr1 190 %1:vgpr(s64) = COPY $vgpr2_vgpr3 191 %2:vcc(s1) = G_ICMP intpred(sgt), %0, %1 192 %3:vgpr(s1) = COPY %2 193 %4:vgpr(s32) = G_ZEXT %3 194 S_ENDPGM 0, implicit %4 195 196... 197 198--- 199name: icmp_sge_s64_vv 200legalized: true 201regBankSelected: true 202 203body: | 204 bb.0: 205 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3 206 207 ; GFX8-LABEL: name: icmp_sge_s64_vv 208 ; GFX8: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 209 ; GFX8: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 210 ; GFX8: [[V_CMP_GE_I64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_GE_I64_e64 [[COPY]], [[COPY1]], implicit $exec 211 ; GFX8: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_GE_I64_e64_]] 212 ; GFX8: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec 213 ; GFX8: S_ENDPGM 0, implicit [[V_AND_B32_e32_]] 214 ; GFX6-LABEL: name: icmp_sge_s64_vv 215 ; GFX6: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 216 ; GFX6: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 217 ; GFX6: [[V_CMP_GE_I64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_GE_I64_e64 [[COPY]], [[COPY1]], implicit $exec 218 ; GFX6: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_GE_I64_e64_]] 219 ; GFX6: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec 220 ; GFX6: S_ENDPGM 0, implicit [[V_AND_B32_e32_]] 221 %0:vgpr(s64) = COPY $vgpr0_vgpr1 222 %1:vgpr(s64) = COPY $vgpr2_vgpr3 223 %2:vcc(s1) = G_ICMP intpred(sge), %0, %1 224 %3:vgpr(s1) = COPY %2 225 %4:vgpr(s32) = G_ZEXT %3 226 S_ENDPGM 0, implicit %4 227 228... 229 230--- 231name: icmp_slt_s64_vv 232legalized: true 233regBankSelected: true 234 235body: | 236 bb.0: 237 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3 238 239 ; GFX8-LABEL: name: icmp_slt_s64_vv 240 ; GFX8: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 241 ; GFX8: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 242 ; GFX8: [[V_CMP_LT_I64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_LT_I64_e64 [[COPY]], [[COPY1]], implicit $exec 243 ; GFX8: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_LT_I64_e64_]] 244 ; GFX8: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec 245 ; GFX8: S_ENDPGM 0, implicit [[V_AND_B32_e32_]] 246 ; GFX6-LABEL: name: icmp_slt_s64_vv 247 ; GFX6: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 248 ; GFX6: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 249 ; GFX6: [[V_CMP_LT_I64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_LT_I64_e64 [[COPY]], [[COPY1]], implicit $exec 250 ; GFX6: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_LT_I64_e64_]] 251 ; GFX6: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec 252 ; GFX6: S_ENDPGM 0, implicit [[V_AND_B32_e32_]] 253 %0:vgpr(s64) = COPY $vgpr0_vgpr1 254 %1:vgpr(s64) = COPY $vgpr2_vgpr3 255 %2:vcc(s1) = G_ICMP intpred(slt), %0, %1 256 %3:vgpr(s1) = COPY %2 257 %4:vgpr(s32) = G_ZEXT %3 258 S_ENDPGM 0, implicit %4 259 260... 261 262--- 263name: icmp_sle_s64_vv 264legalized: true 265regBankSelected: true 266 267body: | 268 bb.0: 269 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3 270 271 ; GFX8-LABEL: name: icmp_sle_s64_vv 272 ; GFX8: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 273 ; GFX8: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 274 ; GFX8: [[V_CMP_LE_I64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_LE_I64_e64 [[COPY]], [[COPY1]], implicit $exec 275 ; GFX8: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_LE_I64_e64_]] 276 ; GFX8: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec 277 ; GFX8: S_ENDPGM 0, implicit [[V_AND_B32_e32_]] 278 ; GFX6-LABEL: name: icmp_sle_s64_vv 279 ; GFX6: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 280 ; GFX6: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 281 ; GFX6: [[V_CMP_LE_I64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_LE_I64_e64 [[COPY]], [[COPY1]], implicit $exec 282 ; GFX6: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_LE_I64_e64_]] 283 ; GFX6: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec 284 ; GFX6: S_ENDPGM 0, implicit [[V_AND_B32_e32_]] 285 %0:vgpr(s64) = COPY $vgpr0_vgpr1 286 %1:vgpr(s64) = COPY $vgpr2_vgpr3 287 %2:vcc(s1) = G_ICMP intpred(sle), %0, %1 288 %3:vgpr(s1) = COPY %2 289 %4:vgpr(s32) = G_ZEXT %3 290 S_ENDPGM 0, implicit %4 291 292... 293 294--- 295name: icmp_ugt_s64_vv 296legalized: true 297regBankSelected: true 298 299body: | 300 bb.0: 301 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3 302 303 ; GFX8-LABEL: name: icmp_ugt_s64_vv 304 ; GFX8: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 305 ; GFX8: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 306 ; GFX8: [[V_CMP_GT_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_GT_U64_e64 [[COPY]], [[COPY1]], implicit $exec 307 ; GFX8: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_GT_U64_e64_]] 308 ; GFX8: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec 309 ; GFX8: S_ENDPGM 0, implicit [[V_AND_B32_e32_]] 310 ; GFX6-LABEL: name: icmp_ugt_s64_vv 311 ; GFX6: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 312 ; GFX6: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 313 ; GFX6: [[V_CMP_GT_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_GT_U64_e64 [[COPY]], [[COPY1]], implicit $exec 314 ; GFX6: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_GT_U64_e64_]] 315 ; GFX6: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec 316 ; GFX6: S_ENDPGM 0, implicit [[V_AND_B32_e32_]] 317 %0:vgpr(s64) = COPY $vgpr0_vgpr1 318 %1:vgpr(s64) = COPY $vgpr2_vgpr3 319 %2:vcc(s1) = G_ICMP intpred(ugt), %0, %1 320 %3:vgpr(s1) = COPY %2 321 %4:vgpr(s32) = G_ZEXT %3 322 S_ENDPGM 0, implicit %4 323 324... 325 326--- 327name: icmp_uge_s64_vv 328legalized: true 329regBankSelected: true 330 331body: | 332 bb.0: 333 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3 334 335 ; GFX8-LABEL: name: icmp_uge_s64_vv 336 ; GFX8: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 337 ; GFX8: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 338 ; GFX8: [[V_CMP_GE_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_GE_U64_e64 [[COPY]], [[COPY1]], implicit $exec 339 ; GFX8: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_GE_U64_e64_]] 340 ; GFX8: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec 341 ; GFX8: S_ENDPGM 0, implicit [[V_AND_B32_e32_]] 342 ; GFX6-LABEL: name: icmp_uge_s64_vv 343 ; GFX6: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 344 ; GFX6: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 345 ; GFX6: [[V_CMP_GE_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_GE_U64_e64 [[COPY]], [[COPY1]], implicit $exec 346 ; GFX6: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_GE_U64_e64_]] 347 ; GFX6: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec 348 ; GFX6: S_ENDPGM 0, implicit [[V_AND_B32_e32_]] 349 %0:vgpr(s64) = COPY $vgpr0_vgpr1 350 %1:vgpr(s64) = COPY $vgpr2_vgpr3 351 %2:vcc(s1) = G_ICMP intpred(uge), %0, %1 352 %3:vgpr(s1) = COPY %2 353 %4:vgpr(s32) = G_ZEXT %3 354 S_ENDPGM 0, implicit %4 355 356... 357 358--- 359name: icmp_ult_s64_vv 360legalized: true 361regBankSelected: true 362 363body: | 364 bb.0: 365 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3 366 367 ; GFX8-LABEL: name: icmp_ult_s64_vv 368 ; GFX8: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 369 ; GFX8: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 370 ; GFX8: [[V_CMP_LT_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_LT_U64_e64 [[COPY]], [[COPY1]], implicit $exec 371 ; GFX8: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_LT_U64_e64_]] 372 ; GFX8: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec 373 ; GFX8: S_ENDPGM 0, implicit [[V_AND_B32_e32_]] 374 ; GFX6-LABEL: name: icmp_ult_s64_vv 375 ; GFX6: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 376 ; GFX6: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 377 ; GFX6: [[V_CMP_LT_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_LT_U64_e64 [[COPY]], [[COPY1]], implicit $exec 378 ; GFX6: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_LT_U64_e64_]] 379 ; GFX6: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec 380 ; GFX6: S_ENDPGM 0, implicit [[V_AND_B32_e32_]] 381 %0:vgpr(s64) = COPY $vgpr0_vgpr1 382 %1:vgpr(s64) = COPY $vgpr2_vgpr3 383 %2:vcc(s1) = G_ICMP intpred(ult), %0, %1 384 %3:vgpr(s1) = COPY %2 385 %4:vgpr(s32) = G_ZEXT %3 386 S_ENDPGM 0, implicit %4 387 388... 389 390--- 391name: icmp_ule_s64_vv 392legalized: true 393regBankSelected: true 394 395body: | 396 bb.0: 397 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3 398 399 ; GFX8-LABEL: name: icmp_ule_s64_vv 400 ; GFX8: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 401 ; GFX8: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 402 ; GFX8: [[V_CMP_LE_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_LE_U64_e64 [[COPY]], [[COPY1]], implicit $exec 403 ; GFX8: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_LE_U64_e64_]] 404 ; GFX8: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec 405 ; GFX8: S_ENDPGM 0, implicit [[V_AND_B32_e32_]] 406 ; GFX6-LABEL: name: icmp_ule_s64_vv 407 ; GFX6: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 408 ; GFX6: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 409 ; GFX6: [[V_CMP_LE_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_LE_U64_e64 [[COPY]], [[COPY1]], implicit $exec 410 ; GFX6: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_LE_U64_e64_]] 411 ; GFX6: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec 412 ; GFX6: S_ENDPGM 0, implicit [[V_AND_B32_e32_]] 413 %0:vgpr(s64) = COPY $vgpr0_vgpr1 414 %1:vgpr(s64) = COPY $vgpr2_vgpr3 415 %2:vcc(s1) = G_ICMP intpred(ule), %0, %1 416 %3:vgpr(s1) = COPY %2 417 %4:vgpr(s32) = G_ZEXT %3 418 S_ENDPGM 0, implicit %4 419 420... 421 422--- 423name: icmp_eq_p0_ss 424legalized: true 425regBankSelected: true 426 427body: | 428 bb.0: 429 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3 430 431 ; GFX8-LABEL: name: icmp_eq_p0_ss 432 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 433 ; GFX8: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3 434 ; GFX8: S_CMP_EQ_U64 [[COPY]], [[COPY1]], implicit-def $scc 435 ; GFX8: [[COPY2:%[0-9]+]]:sreg_32 = COPY $scc 436 ; GFX8: S_ENDPGM 0, implicit [[COPY2]] 437 ; GFX6-LABEL: name: icmp_eq_p0_ss 438 ; GFX6: [[COPY:%[0-9]+]]:sgpr(p0) = COPY $sgpr0_sgpr1 439 ; GFX6: [[COPY1:%[0-9]+]]:sgpr(p0) = COPY $sgpr2_sgpr3 440 ; GFX6: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](p0), [[COPY1]] 441 ; GFX6: S_ENDPGM 0, implicit [[ICMP]](s32) 442 %0:sgpr(p0) = COPY $sgpr0_sgpr1 443 %1:sgpr(p0) = COPY $sgpr2_sgpr3 444 %2:sgpr(s32) = G_ICMP intpred(eq), %0, %1 445 S_ENDPGM 0, implicit %2 446... 447 448--- 449name: icmp_eq_p1_ss 450legalized: true 451regBankSelected: true 452 453body: | 454 bb.0: 455 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3 456 457 ; GFX8-LABEL: name: icmp_eq_p1_ss 458 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 459 ; GFX8: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3 460 ; GFX8: S_CMP_EQ_U64 [[COPY]], [[COPY1]], implicit-def $scc 461 ; GFX8: [[COPY2:%[0-9]+]]:sreg_32 = COPY $scc 462 ; GFX8: S_ENDPGM 0, implicit [[COPY2]] 463 ; GFX6-LABEL: name: icmp_eq_p1_ss 464 ; GFX6: [[COPY:%[0-9]+]]:sgpr(p1) = COPY $sgpr0_sgpr1 465 ; GFX6: [[COPY1:%[0-9]+]]:sgpr(p1) = COPY $sgpr2_sgpr3 466 ; GFX6: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](p1), [[COPY1]] 467 ; GFX6: S_ENDPGM 0, implicit [[ICMP]](s32) 468 %0:sgpr(p1) = COPY $sgpr0_sgpr1 469 %1:sgpr(p1) = COPY $sgpr2_sgpr3 470 %2:sgpr(s32) = G_ICMP intpred(eq), %0, %1 471 S_ENDPGM 0, implicit %2 472 473... 474 475--- 476name: icmp_eq_p999_ss 477legalized: true 478regBankSelected: true 479 480body: | 481 bb.0: 482 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3 483 484 ; GFX8-LABEL: name: icmp_eq_p999_ss 485 ; GFX8: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1 486 ; GFX8: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3 487 ; GFX8: S_CMP_EQ_U64 [[COPY]], [[COPY1]], implicit-def $scc 488 ; GFX8: [[COPY2:%[0-9]+]]:sreg_32 = COPY $scc 489 ; GFX8: S_ENDPGM 0, implicit [[COPY2]] 490 ; GFX6-LABEL: name: icmp_eq_p999_ss 491 ; GFX6: [[COPY:%[0-9]+]]:sgpr(p999) = COPY $sgpr0_sgpr1 492 ; GFX6: [[COPY1:%[0-9]+]]:sgpr(p999) = COPY $sgpr2_sgpr3 493 ; GFX6: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](p999), [[COPY1]] 494 ; GFX6: S_ENDPGM 0, implicit [[ICMP]](s32) 495 %0:sgpr(p999) = COPY $sgpr0_sgpr1 496 %1:sgpr(p999) = COPY $sgpr2_sgpr3 497 %2:sgpr(s32) = G_ICMP intpred(eq), %0, %1 498 S_ENDPGM 0, implicit %2 499 500... 501 502--- 503name: icmp_eq_p0_vv 504legalized: true 505regBankSelected: true 506 507body: | 508 bb.0: 509 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3 510 511 ; GFX8-LABEL: name: icmp_eq_p0_vv 512 ; GFX8: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 513 ; GFX8: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 514 ; GFX8: [[V_CMP_EQ_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U64_e64 [[COPY]], [[COPY1]], implicit $exec 515 ; GFX8: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_EQ_U64_e64_]] 516 ; GFX8: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec 517 ; GFX8: S_ENDPGM 0, implicit [[V_AND_B32_e32_]] 518 ; GFX6-LABEL: name: icmp_eq_p0_vv 519 ; GFX6: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 520 ; GFX6: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 521 ; GFX6: [[V_CMP_EQ_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U64_e64 [[COPY]], [[COPY1]], implicit $exec 522 ; GFX6: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_EQ_U64_e64_]] 523 ; GFX6: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec 524 ; GFX6: S_ENDPGM 0, implicit [[V_AND_B32_e32_]] 525 %0:vgpr(p0) = COPY $vgpr0_vgpr1 526 %1:vgpr(p0) = COPY $vgpr2_vgpr3 527 %2:vcc(s1) = G_ICMP intpred(eq), %0, %1 528 %3:vgpr(s1) = COPY %2 529 %4:vgpr(s32) = G_ZEXT %3 530 S_ENDPGM 0, implicit %4 531 532... 533 534--- 535name: icmp_eq_p1_vv 536legalized: true 537regBankSelected: true 538 539body: | 540 bb.0: 541 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3 542 543 ; GFX8-LABEL: name: icmp_eq_p1_vv 544 ; GFX8: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 545 ; GFX8: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 546 ; GFX8: [[V_CMP_EQ_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U64_e64 [[COPY]], [[COPY1]], implicit $exec 547 ; GFX8: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_EQ_U64_e64_]] 548 ; GFX8: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec 549 ; GFX8: S_ENDPGM 0, implicit [[V_AND_B32_e32_]] 550 ; GFX6-LABEL: name: icmp_eq_p1_vv 551 ; GFX6: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 552 ; GFX6: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 553 ; GFX6: [[V_CMP_EQ_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U64_e64 [[COPY]], [[COPY1]], implicit $exec 554 ; GFX6: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_EQ_U64_e64_]] 555 ; GFX6: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec 556 ; GFX6: S_ENDPGM 0, implicit [[V_AND_B32_e32_]] 557 %0:vgpr(p1) = COPY $vgpr0_vgpr1 558 %1:vgpr(p1) = COPY $vgpr2_vgpr3 559 %2:vcc(s1) = G_ICMP intpred(eq), %0, %1 560 %3:vgpr(s1) = COPY %2 561 %4:vgpr(s32) = G_ZEXT %3 562 S_ENDPGM 0, implicit %4 563 564... 565 566--- 567name: icmp_eq_p999_vv 568legalized: true 569regBankSelected: true 570 571body: | 572 bb.0: 573 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3 574 575 ; GFX8-LABEL: name: icmp_eq_p999_vv 576 ; GFX8: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 577 ; GFX8: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 578 ; GFX8: [[V_CMP_EQ_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U64_e64 [[COPY]], [[COPY1]], implicit $exec 579 ; GFX8: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_EQ_U64_e64_]] 580 ; GFX8: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec 581 ; GFX8: S_ENDPGM 0, implicit [[V_AND_B32_e32_]] 582 ; GFX6-LABEL: name: icmp_eq_p999_vv 583 ; GFX6: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1 584 ; GFX6: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3 585 ; GFX6: [[V_CMP_EQ_U64_e64_:%[0-9]+]]:sreg_64_xexec = V_CMP_EQ_U64_e64 [[COPY]], [[COPY1]], implicit $exec 586 ; GFX6: [[COPY2:%[0-9]+]]:vgpr_32 = COPY [[V_CMP_EQ_U64_e64_]] 587 ; GFX6: [[V_AND_B32_e32_:%[0-9]+]]:vgpr_32 = V_AND_B32_e32 1, [[COPY2]], implicit $exec 588 ; GFX6: S_ENDPGM 0, implicit [[V_AND_B32_e32_]] 589 %0:vgpr(p999) = COPY $vgpr0_vgpr1 590 %1:vgpr(p999) = COPY $vgpr2_vgpr3 591 %2:vcc(s1) = G_ICMP intpred(eq), %0, %1 592 %3:vgpr(s1) = COPY %2 593 %4:vgpr(s32) = G_ZEXT %3 594 S_ENDPGM 0, implicit %4 595 596... 597