1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -march=amdgcn -mcpu=gfx908 -run-pass=regbankselect -regbankselect-fast -verify-machineinstrs -o - %s | FileCheck -check-prefix=FAST %s 3# RUN: llc -march=amdgcn -mcpu=gfx908 -run-pass=regbankselect -regbankselect-greedy -verify-machineinstrs -o - %s | FileCheck -check-prefix=GREEDY %s 4 5--- 6name: phi_s32_ss_sbranch 7legalized: true 8tracksRegLiveness: true 9 10body: | 11 ; FAST-LABEL: name: phi_s32_ss_sbranch 12 ; FAST: bb.0: 13 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 14 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2 15 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 16 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 17 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 18 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 19 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 20 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 21 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 22 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 23 ; FAST: G_BR %bb.2 24 ; FAST: bb.1: 25 ; FAST: successors: %bb.2(0x80000000) 26 ; FAST: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32) 27 ; FAST: G_BR %bb.2 28 ; FAST: bb.2: 29 ; FAST: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1 30 ; FAST: $sgpr0 = COPY [[PHI]](s32) 31 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31 32 ; GREEDY-LABEL: name: phi_s32_ss_sbranch 33 ; GREEDY: bb.0: 34 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 35 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2 36 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 37 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 38 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 39 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 40 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 41 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 42 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 43 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 44 ; GREEDY: G_BR %bb.2 45 ; GREEDY: bb.1: 46 ; GREEDY: successors: %bb.2(0x80000000) 47 ; GREEDY: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32) 48 ; GREEDY: G_BR %bb.2 49 ; GREEDY: bb.2: 50 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1 51 ; GREEDY: $sgpr0 = COPY [[PHI]](s32) 52 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31 53 bb.0: 54 successors: %bb.1, %bb.2 55 liveins: $sgpr0, $sgpr1, $sgpr2 56 57 %0:_(s32) = COPY $sgpr0 58 %1:_(s32) = COPY $sgpr1 59 %2:_(s32) = COPY $sgpr2 60 %3:_(s32) = G_CONSTANT i32 0 61 %4:_(s1) = G_ICMP intpred(eq), %2, %3 62 G_BRCOND %4, %bb.1 63 G_BR %bb.2 64 65 bb.1: 66 successors: %bb.2 67 68 %5:_(s32) = COPY %1 69 G_BR %bb.2 70 71 bb.2: 72 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1 73 $sgpr0 = COPY %6 74 S_SETPC_B64 undef $sgpr30_sgpr31 75 76... 77 78--- 79name: phi_s32_sv_sbranch 80legalized: true 81tracksRegLiveness: true 82 83body: | 84 ; FAST-LABEL: name: phi_s32_sv_sbranch 85 ; FAST: bb.0: 86 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 87 ; FAST: liveins: $sgpr0, $vgpr0, $sgpr1 88 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 89 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 90 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 91 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 92 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 93 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 94 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 95 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 96 ; FAST: G_BR %bb.2 97 ; FAST: bb.1: 98 ; FAST: successors: %bb.2(0x80000000) 99 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32) 100 ; FAST: G_BR %bb.2 101 ; FAST: bb.2: 102 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1 103 ; FAST: $vgpr0 = COPY [[PHI]](s32) 104 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31 105 ; GREEDY-LABEL: name: phi_s32_sv_sbranch 106 ; GREEDY: bb.0: 107 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 108 ; GREEDY: liveins: $sgpr0, $vgpr0, $sgpr1 109 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 110 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 111 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 112 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 113 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 114 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 115 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 116 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 117 ; GREEDY: G_BR %bb.2 118 ; GREEDY: bb.1: 119 ; GREEDY: successors: %bb.2(0x80000000) 120 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32) 121 ; GREEDY: G_BR %bb.2 122 ; GREEDY: bb.2: 123 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1 124 ; GREEDY: $vgpr0 = COPY [[PHI]](s32) 125 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31 126 bb.0: 127 successors: %bb.1, %bb.2 128 liveins: $sgpr0, $vgpr0, $sgpr1 129 130 %0:_(s32) = COPY $sgpr0 131 %1:_(s32) = COPY $vgpr0 132 %2:_(s32) = COPY $sgpr1 133 %3:_(s32) = G_CONSTANT i32 0 134 %4:_(s1) = G_ICMP intpred(eq), %2, %3 135 G_BRCOND %4, %bb.1 136 G_BR %bb.2 137 138 bb.1: 139 successors: %bb.2 140 141 %5:_(s32) = COPY %1 142 G_BR %bb.2 143 144 bb.2: 145 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1 146 $vgpr0 = COPY %6 147 S_SETPC_B64 undef $sgpr30_sgpr31 148 149... 150 151--- 152name: phi_s32_vs_sbranch 153legalized: true 154tracksRegLiveness: true 155 156body: | 157 ; FAST-LABEL: name: phi_s32_vs_sbranch 158 ; FAST: bb.0: 159 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 160 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1 161 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 162 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 163 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 164 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 165 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 166 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 167 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 168 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 169 ; FAST: G_BR %bb.2 170 ; FAST: bb.1: 171 ; FAST: successors: %bb.2(0x80000000) 172 ; FAST: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32) 173 ; FAST: G_BR %bb.2 174 ; FAST: bb.2: 175 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1 176 ; FAST: $vgpr0 = COPY [[PHI]](s32) 177 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31 178 ; GREEDY-LABEL: name: phi_s32_vs_sbranch 179 ; GREEDY: bb.0: 180 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 181 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1 182 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 183 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 184 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 185 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 186 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 187 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 188 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 189 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 190 ; GREEDY: G_BR %bb.2 191 ; GREEDY: bb.1: 192 ; GREEDY: successors: %bb.2(0x80000000) 193 ; GREEDY: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32) 194 ; GREEDY: G_BR %bb.2 195 ; GREEDY: bb.2: 196 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1 197 ; GREEDY: $vgpr0 = COPY [[PHI]](s32) 198 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31 199 bb.0: 200 successors: %bb.1, %bb.2 201 liveins: $vgpr0, $sgpr0, $sgpr1 202 203 %0:_(s32) = COPY $vgpr0 204 %1:_(s32) = COPY $sgpr0 205 %2:_(s32) = COPY $sgpr1 206 %3:_(s32) = G_CONSTANT i32 0 207 %4:_(s1) = G_ICMP intpred(eq), %2, %3 208 G_BRCOND %4, %bb.1 209 G_BR %bb.2 210 211 bb.1: 212 successors: %bb.2 213 214 %5:_(s32) = COPY %1 215 G_BR %bb.2 216 217 bb.2: 218 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1 219 $vgpr0 = COPY %6 220 S_SETPC_B64 undef $sgpr30_sgpr31 221 222... 223 224--- 225name: phi_s32_vv_sbranch 226legalized: true 227tracksRegLiveness: true 228 229body: | 230 ; FAST-LABEL: name: phi_s32_vv_sbranch 231 ; FAST: bb.0: 232 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 233 ; FAST: liveins: $vgpr0, $vgpr1, $sgpr0 234 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 235 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1 236 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 237 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 238 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 239 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 240 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 241 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 242 ; FAST: G_BR %bb.2 243 ; FAST: bb.1: 244 ; FAST: successors: %bb.2(0x80000000) 245 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32) 246 ; FAST: G_BR %bb.2 247 ; FAST: bb.2: 248 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1 249 ; FAST: $vgpr0 = COPY [[PHI]](s32) 250 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31 251 ; GREEDY-LABEL: name: phi_s32_vv_sbranch 252 ; GREEDY: bb.0: 253 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 254 ; GREEDY: liveins: $vgpr0, $vgpr1, $sgpr0 255 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 256 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1 257 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 258 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 259 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 260 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 261 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 262 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 263 ; GREEDY: G_BR %bb.2 264 ; GREEDY: bb.1: 265 ; GREEDY: successors: %bb.2(0x80000000) 266 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32) 267 ; GREEDY: G_BR %bb.2 268 ; GREEDY: bb.2: 269 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1 270 ; GREEDY: $vgpr0 = COPY [[PHI]](s32) 271 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31 272 bb.0: 273 successors: %bb.1, %bb.2 274 liveins: $vgpr0, $vgpr1, $sgpr0 275 276 %0:_(s32) = COPY $vgpr0 277 %1:_(s32) = COPY $vgpr1 278 %2:_(s32) = COPY $sgpr0 279 %3:_(s32) = G_CONSTANT i32 0 280 %4:_(s1) = G_ICMP intpred(eq), %2, %3 281 G_BRCOND %4, %bb.1 282 G_BR %bb.2 283 284 bb.1: 285 successors: %bb.2 286 287 %5:_(s32) = COPY %1 288 G_BR %bb.2 289 290 bb.2: 291 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1 292 $vgpr0 = COPY %6 293 S_SETPC_B64 undef $sgpr30_sgpr31 294 295... 296--- 297name: phi_s32_ss_vcc_sbranch 298legalized: true 299tracksRegLiveness: true 300 301body: | 302 ; FAST-LABEL: name: phi_s32_ss_vcc_sbranch 303 ; FAST: bb.0: 304 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 305 ; FAST: liveins: $sgpr0, $sgpr1, $vgpr0 306 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 307 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 308 ; FAST: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 309 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 310 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 311 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]] 312 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1 313 ; FAST: G_BR %bb.2 314 ; FAST: bb.1: 315 ; FAST: successors: %bb.2(0x80000000) 316 ; FAST: [[COPY4:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32) 317 ; FAST: G_BR %bb.2 318 ; FAST: bb.2: 319 ; FAST: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY4]](s32), %bb.1 320 ; FAST: $sgpr0 = COPY [[PHI]](s32) 321 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31 322 ; GREEDY-LABEL: name: phi_s32_ss_vcc_sbranch 323 ; GREEDY: bb.0: 324 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 325 ; GREEDY: liveins: $sgpr0, $sgpr1, $vgpr0 326 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 327 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 328 ; GREEDY: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 329 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 330 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 331 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]] 332 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1 333 ; GREEDY: G_BR %bb.2 334 ; GREEDY: bb.1: 335 ; GREEDY: successors: %bb.2(0x80000000) 336 ; GREEDY: [[COPY4:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32) 337 ; GREEDY: G_BR %bb.2 338 ; GREEDY: bb.2: 339 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY4]](s32), %bb.1 340 ; GREEDY: $sgpr0 = COPY [[PHI]](s32) 341 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31 342 bb.0: 343 successors: %bb.1, %bb.2 344 liveins: $sgpr0, $sgpr1, $vgpr0 345 346 %0:_(s32) = COPY $sgpr0 347 %1:_(s32) = COPY $sgpr1 348 %2:_(s32) = COPY $vgpr0 349 %3:_(s32) = G_CONSTANT i32 0 350 %4:_(s1) = G_ICMP intpred(eq), %2, %3 351 G_BRCOND %4, %bb.1 352 G_BR %bb.2 353 354 bb.1: 355 successors: %bb.2 356 357 %5:_(s32) = COPY %1 358 G_BR %bb.2 359 360 bb.2: 361 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1 362 $sgpr0 = COPY %6 363 S_SETPC_B64 undef $sgpr30_sgpr31 364 365... 366 367--- 368name: phi_s32_sv_vcc_sbranch 369legalized: true 370tracksRegLiveness: true 371 372body: | 373 ; FAST-LABEL: name: phi_s32_sv_vcc_sbranch 374 ; FAST: bb.0: 375 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 376 ; FAST: liveins: $sgpr0, $vgpr0, $vgpr1 377 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 378 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 379 ; FAST: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr1 380 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 381 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 382 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]] 383 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1 384 ; FAST: G_BR %bb.2 385 ; FAST: bb.1: 386 ; FAST: successors: %bb.2(0x80000000) 387 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32) 388 ; FAST: G_BR %bb.2 389 ; FAST: bb.2: 390 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY4]](s32), %bb.1 391 ; FAST: $vgpr0 = COPY [[PHI]](s32) 392 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31 393 ; GREEDY-LABEL: name: phi_s32_sv_vcc_sbranch 394 ; GREEDY: bb.0: 395 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 396 ; GREEDY: liveins: $sgpr0, $vgpr0, $vgpr1 397 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 398 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 399 ; GREEDY: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr1 400 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 401 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 402 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]] 403 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1 404 ; GREEDY: G_BR %bb.2 405 ; GREEDY: bb.1: 406 ; GREEDY: successors: %bb.2(0x80000000) 407 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32) 408 ; GREEDY: G_BR %bb.2 409 ; GREEDY: bb.2: 410 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY4]](s32), %bb.1 411 ; GREEDY: $vgpr0 = COPY [[PHI]](s32) 412 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31 413 bb.0: 414 successors: %bb.1, %bb.2 415 liveins: $sgpr0, $vgpr0, $vgpr1 416 417 %0:_(s32) = COPY $sgpr0 418 %1:_(s32) = COPY $vgpr0 419 %2:_(s32) = COPY $vgpr1 420 %3:_(s32) = G_CONSTANT i32 0 421 %4:_(s1) = G_ICMP intpred(eq), %2, %3 422 G_BRCOND %4, %bb.1 423 G_BR %bb.2 424 425 bb.1: 426 successors: %bb.2 427 428 %5:_(s32) = COPY %1 429 G_BR %bb.2 430 431 bb.2: 432 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1 433 $vgpr0 = COPY %6 434 S_SETPC_B64 undef $sgpr30_sgpr31 435 436... 437 438--- 439name: phi_s32_vs_vcc_sbranch 440legalized: true 441tracksRegLiveness: true 442 443body: | 444 ; FAST-LABEL: name: phi_s32_vs_vcc_sbranch 445 ; FAST: bb.0: 446 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 447 ; FAST: liveins: $vgpr0, $sgpr0, $vgpr1 448 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 449 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 450 ; FAST: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr1 451 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 452 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 453 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]] 454 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1 455 ; FAST: G_BR %bb.2 456 ; FAST: bb.1: 457 ; FAST: successors: %bb.2(0x80000000) 458 ; FAST: [[COPY4:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32) 459 ; FAST: G_BR %bb.2 460 ; FAST: bb.2: 461 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY4]](s32), %bb.1 462 ; FAST: $vgpr0 = COPY [[PHI]](s32) 463 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31 464 ; GREEDY-LABEL: name: phi_s32_vs_vcc_sbranch 465 ; GREEDY: bb.0: 466 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 467 ; GREEDY: liveins: $vgpr0, $sgpr0, $vgpr1 468 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 469 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 470 ; GREEDY: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr1 471 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 472 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 473 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]] 474 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1 475 ; GREEDY: G_BR %bb.2 476 ; GREEDY: bb.1: 477 ; GREEDY: successors: %bb.2(0x80000000) 478 ; GREEDY: [[COPY4:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32) 479 ; GREEDY: G_BR %bb.2 480 ; GREEDY: bb.2: 481 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY4]](s32), %bb.1 482 ; GREEDY: $vgpr0 = COPY [[PHI]](s32) 483 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31 484 bb.0: 485 successors: %bb.1, %bb.2 486 liveins: $vgpr0, $sgpr0, $vgpr1 487 488 %0:_(s32) = COPY $vgpr0 489 %1:_(s32) = COPY $sgpr0 490 %2:_(s32) = COPY $vgpr1 491 %3:_(s32) = G_CONSTANT i32 0 492 %4:_(s1) = G_ICMP intpred(eq), %2, %3 493 G_BRCOND %4, %bb.1 494 G_BR %bb.2 495 496 bb.1: 497 successors: %bb.2 498 499 %5:_(s32) = COPY %1 500 G_BR %bb.2 501 502 bb.2: 503 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1 504 $vgpr0 = COPY %6 505 S_SETPC_B64 undef $sgpr30_sgpr31 506 507... 508 509--- 510name: phi_s32_vv_vcc_sbranch 511legalized: true 512tracksRegLiveness: true 513 514body: | 515 ; FAST-LABEL: name: phi_s32_vv_vcc_sbranch 516 ; FAST: bb.0: 517 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 518 ; FAST: liveins: $vgpr0, $vgpr1, $vgpr2 519 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 520 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1 521 ; FAST: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr2 522 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 523 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 524 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]] 525 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1 526 ; FAST: G_BR %bb.2 527 ; FAST: bb.1: 528 ; FAST: successors: %bb.2(0x80000000) 529 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32) 530 ; FAST: G_BR %bb.2 531 ; FAST: bb.2: 532 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY4]](s32), %bb.1 533 ; FAST: $vgpr0 = COPY [[PHI]](s32) 534 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31 535 ; GREEDY-LABEL: name: phi_s32_vv_vcc_sbranch 536 ; GREEDY: bb.0: 537 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 538 ; GREEDY: liveins: $vgpr0, $vgpr1, $vgpr2 539 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 540 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1 541 ; GREEDY: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr2 542 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 543 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 544 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]] 545 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1 546 ; GREEDY: G_BR %bb.2 547 ; GREEDY: bb.1: 548 ; GREEDY: successors: %bb.2(0x80000000) 549 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32) 550 ; GREEDY: G_BR %bb.2 551 ; GREEDY: bb.2: 552 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY4]](s32), %bb.1 553 ; GREEDY: $vgpr0 = COPY [[PHI]](s32) 554 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31 555 bb.0: 556 successors: %bb.1, %bb.2 557 liveins: $vgpr0, $vgpr1, $vgpr2 558 559 %0:_(s32) = COPY $vgpr0 560 %1:_(s32) = COPY $vgpr1 561 %2:_(s32) = COPY $vgpr2 562 %3:_(s32) = G_CONSTANT i32 0 563 %4:_(s1) = G_ICMP intpred(eq), %2, %3 564 G_BRCOND %4, %bb.1 565 G_BR %bb.2 566 567 bb.1: 568 successors: %bb.2 569 570 %5:_(s32) = COPY %1 571 G_BR %bb.2 572 573 bb.2: 574 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1 575 $vgpr0 = COPY %6 576 S_SETPC_B64 undef $sgpr30_sgpr31 577 578... 579 580--- 581name: phi_s1_scc_scc_sbranch 582legalized: true 583tracksRegLiveness: true 584 585body: | 586 ; FAST-LABEL: name: phi_s1_scc_scc_sbranch 587 ; FAST: bb.0: 588 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 589 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2 590 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 591 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 592 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 593 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 594 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[C]] 595 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 596 ; FAST: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 597 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32) 598 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1) 599 ; FAST: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1) 600 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 601 ; FAST: G_BR %bb.2 602 ; FAST: bb.1: 603 ; FAST: successors: %bb.2(0x80000000) 604 ; FAST: [[ICMP2:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]] 605 ; FAST: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP2]](s32) 606 ; FAST: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1) 607 ; FAST: G_BR %bb.2 608 ; FAST: bb.2: 609 ; FAST: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1 610 ; FAST: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32) 611 ; FAST: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1) 612 ; FAST: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT1]](s32), [[C]], [[COPY]] 613 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 614 ; GREEDY-LABEL: name: phi_s1_scc_scc_sbranch 615 ; GREEDY: bb.0: 616 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 617 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2 618 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 619 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 620 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 621 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 622 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[C]] 623 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 624 ; GREEDY: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 625 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32) 626 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1) 627 ; GREEDY: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1) 628 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 629 ; GREEDY: G_BR %bb.2 630 ; GREEDY: bb.1: 631 ; GREEDY: successors: %bb.2(0x80000000) 632 ; GREEDY: [[ICMP2:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]] 633 ; GREEDY: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP2]](s32) 634 ; GREEDY: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1) 635 ; GREEDY: G_BR %bb.2 636 ; GREEDY: bb.2: 637 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1 638 ; GREEDY: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32) 639 ; GREEDY: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1) 640 ; GREEDY: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT1]](s32), [[C]], [[COPY]] 641 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 642 bb.0: 643 successors: %bb.1, %bb.2 644 liveins: $sgpr0, $sgpr1, $sgpr2 645 646 %0:_(s32) = COPY $sgpr0 647 %1:_(s32) = COPY $sgpr1 648 %2:_(s32) = COPY $sgpr2 649 %3:_(s32) = G_CONSTANT i32 0 650 %4:_(s1) = G_ICMP intpred(eq), %0, %3 651 %5:_(s1) = G_ICMP intpred(eq), %2, %3 652 G_BRCOND %5, %bb.1 653 G_BR %bb.2 654 655 bb.1: 656 successors: %bb.2 657 658 %6:_(s1) = G_ICMP intpred(eq), %1, %3 659 G_BR %bb.2 660 661 bb.2: 662 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1 663 %8:_(s32) = G_SELECT %7, %3, %0 664 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8 665 666... 667 668--- 669name: phi_s1_scc_scc_scc_sbranch 670legalized: true 671tracksRegLiveness: true 672 673body: | 674 ; FAST-LABEL: name: phi_s1_scc_scc_scc_sbranch 675 ; FAST: bb.0: 676 ; FAST: successors: %bb.1(0x40000000), %bb.3(0x40000000) 677 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3 678 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 679 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 680 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 681 ; FAST: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY $sgpr3 682 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 683 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]] 684 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 685 ; FAST: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]] 686 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32) 687 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1) 688 ; FAST: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1) 689 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.3 690 ; FAST: G_BR %bb.1 691 ; FAST: bb.1: 692 ; FAST: successors: %bb.2(0x40000000), %bb.3(0x40000000) 693 ; FAST: [[C1:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 99 694 ; FAST: [[C2:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 888 695 ; FAST: [[ICMP2:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C1]] 696 ; FAST: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP2]](s32) 697 ; FAST: [[ICMP3:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C2]] 698 ; FAST: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP3]](s32) 699 ; FAST: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1) 700 ; FAST: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1) 701 ; FAST: G_BRCOND [[ZEXT1]](s32), %bb.3 702 ; FAST: G_BR %bb.2 703 ; FAST: bb.2: 704 ; FAST: successors: %bb.3(0x80000000) 705 ; FAST: [[C3:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 123 706 ; FAST: [[ICMP4:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C3]] 707 ; FAST: [[TRUNC4:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP4]](s32) 708 ; FAST: [[ANYEXT2:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC4]](s1) 709 ; FAST: G_BR %bb.3 710 ; FAST: bb.3: 711 ; FAST: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1, [[ANYEXT2]](s32), %bb.2 712 ; FAST: [[TRUNC5:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32) 713 ; FAST: [[ZEXT2:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC5]](s1) 714 ; FAST: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT2]](s32), [[COPY]], [[COPY1]] 715 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 716 ; GREEDY-LABEL: name: phi_s1_scc_scc_scc_sbranch 717 ; GREEDY: bb.0: 718 ; GREEDY: successors: %bb.1(0x40000000), %bb.3(0x40000000) 719 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3 720 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 721 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 722 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 723 ; GREEDY: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY $sgpr3 724 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 725 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]] 726 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 727 ; GREEDY: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]] 728 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32) 729 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1) 730 ; GREEDY: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1) 731 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.3 732 ; GREEDY: G_BR %bb.1 733 ; GREEDY: bb.1: 734 ; GREEDY: successors: %bb.2(0x40000000), %bb.3(0x40000000) 735 ; GREEDY: [[C1:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 99 736 ; GREEDY: [[C2:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 888 737 ; GREEDY: [[ICMP2:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C1]] 738 ; GREEDY: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP2]](s32) 739 ; GREEDY: [[ICMP3:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C2]] 740 ; GREEDY: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP3]](s32) 741 ; GREEDY: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1) 742 ; GREEDY: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1) 743 ; GREEDY: G_BRCOND [[ZEXT1]](s32), %bb.3 744 ; GREEDY: G_BR %bb.2 745 ; GREEDY: bb.2: 746 ; GREEDY: successors: %bb.3(0x80000000) 747 ; GREEDY: [[C3:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 123 748 ; GREEDY: [[ICMP4:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C3]] 749 ; GREEDY: [[TRUNC4:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP4]](s32) 750 ; GREEDY: [[ANYEXT2:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC4]](s1) 751 ; GREEDY: G_BR %bb.3 752 ; GREEDY: bb.3: 753 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1, [[ANYEXT2]](s32), %bb.2 754 ; GREEDY: [[TRUNC5:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32) 755 ; GREEDY: [[ZEXT2:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC5]](s1) 756 ; GREEDY: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT2]](s32), [[COPY]], [[COPY1]] 757 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 758 bb.0: 759 successors: %bb.1, %bb.3 760 liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3 761 762 %0:_(s32) = COPY $sgpr0 763 %1:_(s32) = COPY $sgpr1 764 %2:_(s32) = COPY $sgpr2 765 %3:_(s32) = COPY $sgpr3 766 %4:_(s32) = G_CONSTANT i32 0 767 %5:_(s1) = G_ICMP intpred(eq), %0, %3 768 %6:_(s1) = G_ICMP intpred(eq), %2, %3 769 G_BRCOND %6, %bb.3 770 G_BR %bb.1 771 772 bb.1: 773 successors: %bb.2, %bb.3 774 775 %7:_(s32) = G_CONSTANT i32 99 776 %8:_(s32) = G_CONSTANT i32 888 777 %9:_(s1) = G_ICMP intpred(eq), %1, %7 778 %10:_(s1) = G_ICMP intpred(eq), %1, %8 779 G_BRCOND %10, %bb.3 780 G_BR %bb.2 781 782 bb.2: 783 successors: %bb.3 784 785 %11:_(s32) = G_CONSTANT i32 123 786 %12:_(s1) = G_ICMP intpred(eq), %2, %11 787 G_BR %bb.3 788 789 bb.3: 790 %13:_(s1) = G_PHI %5, %bb.0, %9, %bb.1, %12, %bb.2 791 %14:_(s32) = G_SELECT %13, %0, %1 792 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %14 793 794... 795 796--- 797name: phi_s1_scc_vcc_sbranch 798legalized: true 799tracksRegLiveness: true 800 801body: | 802 ; FAST-LABEL: name: phi_s1_scc_vcc_sbranch 803 ; FAST: bb.0: 804 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 805 ; FAST: liveins: $sgpr0, $sgpr1, $vgpr0 806 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 807 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 808 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 809 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 810 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[C]] 811 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 812 ; FAST: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 813 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32) 814 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1) 815 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1) 816 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 817 ; FAST: G_BR %bb.2 818 ; FAST: bb.1: 819 ; FAST: successors: %bb.2(0x80000000) 820 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 821 ; FAST: [[ICMP2:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY4]] 822 ; FAST: G_BR %bb.2 823 ; FAST: bb.2: 824 ; FAST: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[COPY3]](s1), %bb.0, [[ICMP2]](s1), %bb.1 825 ; FAST: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 826 ; FAST: [[COPY6:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32) 827 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY6]] 828 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 829 ; GREEDY-LABEL: name: phi_s1_scc_vcc_sbranch 830 ; GREEDY: bb.0: 831 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 832 ; GREEDY: liveins: $sgpr0, $sgpr1, $vgpr0 833 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 834 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 835 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 836 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 837 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[C]] 838 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 839 ; GREEDY: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 840 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32) 841 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1) 842 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1) 843 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 844 ; GREEDY: G_BR %bb.2 845 ; GREEDY: bb.1: 846 ; GREEDY: successors: %bb.2(0x80000000) 847 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 848 ; GREEDY: [[ICMP2:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY4]] 849 ; GREEDY: G_BR %bb.2 850 ; GREEDY: bb.2: 851 ; GREEDY: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[COPY3]](s1), %bb.0, [[ICMP2]](s1), %bb.1 852 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 853 ; GREEDY: [[COPY6:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32) 854 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY6]] 855 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 856 bb.0: 857 successors: %bb.1, %bb.2 858 liveins: $sgpr0, $sgpr1, $vgpr0 859 860 %0:_(s32) = COPY $sgpr0 861 %1:_(s32) = COPY $vgpr0 862 %2:_(s32) = COPY $sgpr1 863 %3:_(s32) = G_CONSTANT i32 0 864 %4:_(s1) = G_ICMP intpred(eq), %0, %3 865 %5:_(s1) = G_ICMP intpred(eq), %2, %3 866 G_BRCOND %5, %bb.1 867 G_BR %bb.2 868 869 bb.1: 870 successors: %bb.2 871 872 %6:_(s1) = G_ICMP intpred(eq), %1, %3 873 G_BR %bb.2 874 875 bb.2: 876 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1 877 %8:_(s32) = G_SELECT %7, %3, %0 878 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8 879 880... 881 882--- 883name: phi_s1_vcc_scc_sbranch 884legalized: true 885tracksRegLiveness: true 886 887body: | 888 ; FAST-LABEL: name: phi_s1_vcc_scc_sbranch 889 ; FAST: bb.0: 890 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 891 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1 892 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 893 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 894 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 895 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 896 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 897 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]] 898 ; FAST: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 899 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32) 900 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 901 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 902 ; FAST: G_BR %bb.2 903 ; FAST: bb.1: 904 ; FAST: successors: %bb.2(0x80000000) 905 ; FAST: [[ICMP2:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]] 906 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP2]](s32) 907 ; FAST: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[TRUNC1]](s1) 908 ; FAST: G_BR %bb.2 909 ; FAST: bb.2: 910 ; FAST: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[ICMP]](s1), %bb.0, [[COPY4]](s1), %bb.1 911 ; FAST: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 912 ; FAST: [[COPY6:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32) 913 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY6]] 914 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 915 ; GREEDY-LABEL: name: phi_s1_vcc_scc_sbranch 916 ; GREEDY: bb.0: 917 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 918 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1 919 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 920 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 921 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 922 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 923 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 924 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]] 925 ; GREEDY: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 926 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32) 927 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 928 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 929 ; GREEDY: G_BR %bb.2 930 ; GREEDY: bb.1: 931 ; GREEDY: successors: %bb.2(0x80000000) 932 ; GREEDY: [[ICMP2:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]] 933 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP2]](s32) 934 ; GREEDY: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[TRUNC1]](s1) 935 ; GREEDY: G_BR %bb.2 936 ; GREEDY: bb.2: 937 ; GREEDY: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[ICMP]](s1), %bb.0, [[COPY4]](s1), %bb.1 938 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 939 ; GREEDY: [[COPY6:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32) 940 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY6]] 941 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 942 bb.0: 943 successors: %bb.1, %bb.2 944 liveins: $vgpr0, $sgpr0, $sgpr1 945 946 %0:_(s32) = COPY $vgpr0 947 %1:_(s32) = COPY $sgpr0 948 %2:_(s32) = COPY $sgpr1 949 %3:_(s32) = G_CONSTANT i32 0 950 %4:_(s1) = G_ICMP intpred(eq), %0, %3 951 %5:_(s1) = G_ICMP intpred(eq), %2, %3 952 G_BRCOND %5, %bb.1 953 G_BR %bb.2 954 955 bb.1: 956 successors: %bb.2 957 958 %6:_(s1) = G_ICMP intpred(eq), %1, %3 959 G_BR %bb.2 960 961 bb.2: 962 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1 963 %8:_(s32) = G_SELECT %7, %3, %1 964 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8 965 966... 967 968--- 969name: phi_s1_vcc_vcc_sbranch 970legalized: true 971tracksRegLiveness: true 972 973body: | 974 ; FAST-LABEL: name: phi_s1_vcc_vcc_sbranch 975 ; FAST: bb.0: 976 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 977 ; FAST: liveins: $vgpr0, $vgpr1, $sgpr0 978 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 979 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1 980 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 981 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 982 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 983 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]] 984 ; FAST: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 985 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32) 986 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 987 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 988 ; FAST: G_BR %bb.2 989 ; FAST: bb.1: 990 ; FAST: successors: %bb.2(0x80000000) 991 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 992 ; FAST: [[ICMP2:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY4]] 993 ; FAST: G_BR %bb.2 994 ; FAST: bb.2: 995 ; FAST: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP2]](s1), %bb.1 996 ; FAST: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 997 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY]] 998 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 999 ; GREEDY-LABEL: name: phi_s1_vcc_vcc_sbranch 1000 ; GREEDY: bb.0: 1001 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 1002 ; GREEDY: liveins: $vgpr0, $vgpr1, $sgpr0 1003 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 1004 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1 1005 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 1006 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 1007 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1008 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]] 1009 ; GREEDY: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 1010 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32) 1011 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 1012 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 1013 ; GREEDY: G_BR %bb.2 1014 ; GREEDY: bb.1: 1015 ; GREEDY: successors: %bb.2(0x80000000) 1016 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1017 ; GREEDY: [[ICMP2:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY4]] 1018 ; GREEDY: G_BR %bb.2 1019 ; GREEDY: bb.2: 1020 ; GREEDY: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP2]](s1), %bb.1 1021 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1022 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY]] 1023 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 1024 bb.0: 1025 successors: %bb.1, %bb.2 1026 liveins: $vgpr0, $vgpr1, $sgpr0 1027 1028 %0:_(s32) = COPY $vgpr0 1029 %1:_(s32) = COPY $vgpr1 1030 %2:_(s32) = COPY $sgpr0 1031 %3:_(s32) = G_CONSTANT i32 0 1032 %4:_(s1) = G_ICMP intpred(eq), %0, %3 1033 %5:_(s1) = G_ICMP intpred(eq), %2, %3 1034 G_BRCOND %5, %bb.1 1035 G_BR %bb.2 1036 1037 bb.1: 1038 successors: %bb.2 1039 1040 %6:_(s1) = G_ICMP intpred(eq), %1, %3 1041 G_BR %bb.2 1042 1043 bb.2: 1044 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1 1045 %8:_(s32) = G_SELECT %7, %3, %0 1046 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8 1047 1048... 1049 1050--- 1051name: phi_s1_s_scc_sbranch 1052legalized: true 1053tracksRegLiveness: true 1054 1055body: | 1056 ; FAST-LABEL: name: phi_s1_s_scc_sbranch 1057 ; FAST: bb.0: 1058 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 1059 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2 1060 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 1061 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 1062 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 1063 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 1064 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32) 1065 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 1066 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 1067 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1) 1068 ; FAST: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1) 1069 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 1070 ; FAST: G_BR %bb.2 1071 ; FAST: bb.1: 1072 ; FAST: successors: %bb.2(0x80000000) 1073 ; FAST: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]] 1074 ; FAST: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32) 1075 ; FAST: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1) 1076 ; FAST: G_BR %bb.2 1077 ; FAST: bb.2: 1078 ; FAST: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1 1079 ; FAST: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32) 1080 ; FAST: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1) 1081 ; FAST: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT1]](s32), [[C]], [[COPY]] 1082 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 1083 ; GREEDY-LABEL: name: phi_s1_s_scc_sbranch 1084 ; GREEDY: bb.0: 1085 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 1086 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2 1087 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 1088 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 1089 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 1090 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 1091 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32) 1092 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 1093 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 1094 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1) 1095 ; GREEDY: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1) 1096 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 1097 ; GREEDY: G_BR %bb.2 1098 ; GREEDY: bb.1: 1099 ; GREEDY: successors: %bb.2(0x80000000) 1100 ; GREEDY: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]] 1101 ; GREEDY: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32) 1102 ; GREEDY: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1) 1103 ; GREEDY: G_BR %bb.2 1104 ; GREEDY: bb.2: 1105 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1 1106 ; GREEDY: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32) 1107 ; GREEDY: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1) 1108 ; GREEDY: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT1]](s32), [[C]], [[COPY]] 1109 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 1110 bb.0: 1111 successors: %bb.1, %bb.2 1112 liveins: $sgpr0, $sgpr1, $sgpr2 1113 1114 %0:_(s32) = COPY $sgpr0 1115 %1:_(s32) = COPY $sgpr1 1116 %2:_(s32) = COPY $sgpr2 1117 %3:_(s32) = G_CONSTANT i32 0 1118 %4:_(s1) = G_TRUNC %0 1119 %5:_(s1) = G_ICMP intpred(eq), %2, %3 1120 G_BRCOND %5, %bb.1 1121 G_BR %bb.2 1122 1123 bb.1: 1124 successors: %bb.2 1125 1126 %6:_(s1) = G_ICMP intpred(eq), %1, %3 1127 G_BR %bb.2 1128 1129 bb.2: 1130 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1 1131 %8:_(s32) = G_SELECT %7, %3, %0 1132 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8 1133 1134... 1135 1136--- 1137name: phi_s1_scc_s_sbranch 1138legalized: true 1139tracksRegLiveness: true 1140 1141body: | 1142 ; FAST-LABEL: name: phi_s1_scc_s_sbranch 1143 ; FAST: bb.0: 1144 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 1145 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2 1146 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 1147 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 1148 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 1149 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 1150 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[C]] 1151 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 1152 ; FAST: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 1153 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32) 1154 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1) 1155 ; FAST: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1) 1156 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 1157 ; FAST: G_BR %bb.2 1158 ; FAST: bb.1: 1159 ; FAST: successors: %bb.2(0x80000000) 1160 ; FAST: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32) 1161 ; FAST: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1) 1162 ; FAST: G_BR %bb.2 1163 ; FAST: bb.2: 1164 ; FAST: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1 1165 ; FAST: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32) 1166 ; FAST: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1) 1167 ; FAST: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT1]](s32), [[C]], [[COPY]] 1168 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 1169 ; GREEDY-LABEL: name: phi_s1_scc_s_sbranch 1170 ; GREEDY: bb.0: 1171 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 1172 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2 1173 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 1174 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 1175 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 1176 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 1177 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[C]] 1178 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 1179 ; GREEDY: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 1180 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32) 1181 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1) 1182 ; GREEDY: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1) 1183 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 1184 ; GREEDY: G_BR %bb.2 1185 ; GREEDY: bb.1: 1186 ; GREEDY: successors: %bb.2(0x80000000) 1187 ; GREEDY: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32) 1188 ; GREEDY: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1) 1189 ; GREEDY: G_BR %bb.2 1190 ; GREEDY: bb.2: 1191 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1 1192 ; GREEDY: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32) 1193 ; GREEDY: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1) 1194 ; GREEDY: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT1]](s32), [[C]], [[COPY]] 1195 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 1196 bb.0: 1197 successors: %bb.1, %bb.2 1198 liveins: $sgpr0, $sgpr1, $sgpr2 1199 1200 %0:_(s32) = COPY $sgpr0 1201 %1:_(s32) = COPY $sgpr1 1202 %2:_(s32) = COPY $sgpr2 1203 %3:_(s32) = G_CONSTANT i32 0 1204 %4:_(s1) = G_ICMP intpred(eq), %0, %3 1205 %5:_(s1) = G_ICMP intpred(eq), %2, %3 1206 G_BRCOND %5, %bb.1 1207 G_BR %bb.2 1208 1209 bb.1: 1210 successors: %bb.2 1211 1212 %6:_(s1) = G_TRUNC %1 1213 G_BR %bb.2 1214 1215 bb.2: 1216 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1 1217 %8:_(s32) = G_SELECT %7, %3, %0 1218 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8 1219 1220... 1221 1222--- 1223name: phi_s1_scc_v_sbranch 1224legalized: true 1225tracksRegLiveness: true 1226 1227body: | 1228 ; FAST-LABEL: name: phi_s1_scc_v_sbranch 1229 ; FAST: bb.0: 1230 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 1231 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1, $sgpr2 1232 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 1233 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 1234 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 1235 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 1236 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[C]] 1237 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 1238 ; FAST: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 1239 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32) 1240 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1) 1241 ; FAST: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1) 1242 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 1243 ; FAST: G_BR %bb.2 1244 ; FAST: bb.1: 1245 ; FAST: successors: %bb.2(0x80000000) 1246 ; FAST: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32) 1247 ; FAST: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1) 1248 ; FAST: G_BR %bb.2 1249 ; FAST: bb.2: 1250 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1 1251 ; FAST: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32) 1252 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1) 1253 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1254 ; FAST: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32) 1255 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]] 1256 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 1257 ; GREEDY-LABEL: name: phi_s1_scc_v_sbranch 1258 ; GREEDY: bb.0: 1259 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 1260 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1, $sgpr2 1261 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 1262 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 1263 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 1264 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 1265 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[C]] 1266 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 1267 ; GREEDY: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 1268 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32) 1269 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1) 1270 ; GREEDY: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1) 1271 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 1272 ; GREEDY: G_BR %bb.2 1273 ; GREEDY: bb.1: 1274 ; GREEDY: successors: %bb.2(0x80000000) 1275 ; GREEDY: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32) 1276 ; GREEDY: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1) 1277 ; GREEDY: G_BR %bb.2 1278 ; GREEDY: bb.2: 1279 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1 1280 ; GREEDY: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32) 1281 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1) 1282 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1283 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32) 1284 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]] 1285 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 1286 bb.0: 1287 successors: %bb.1, %bb.2 1288 liveins: $vgpr0, $sgpr0, $sgpr1, $sgpr2 1289 1290 %0:_(s32) = COPY $sgpr0 1291 %1:_(s32) = COPY $vgpr0 1292 %2:_(s32) = COPY $sgpr2 1293 %3:_(s32) = G_CONSTANT i32 0 1294 %4:_(s1) = G_ICMP intpred(eq), %0, %3 1295 %5:_(s1) = G_ICMP intpred(eq), %2, %3 1296 G_BRCOND %5, %bb.1 1297 G_BR %bb.2 1298 1299 bb.1: 1300 successors: %bb.2 1301 1302 %6:_(s1) = G_TRUNC %1 1303 G_BR %bb.2 1304 1305 bb.2: 1306 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1 1307 %8:_(s32) = G_SELECT %7, %3, %0 1308 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8 1309 1310... 1311 1312--- 1313name: phi_s1_v_scc_sbranch 1314legalized: true 1315tracksRegLiveness: true 1316 1317body: | 1318 ; FAST-LABEL: name: phi_s1_v_scc_sbranch 1319 ; FAST: bb.0: 1320 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 1321 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1 1322 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 1323 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 1324 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 1325 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 1326 ; FAST: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32) 1327 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 1328 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 1329 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1) 1330 ; FAST: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1) 1331 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 1332 ; FAST: G_BR %bb.2 1333 ; FAST: bb.1: 1334 ; FAST: successors: %bb.2(0x80000000) 1335 ; FAST: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]] 1336 ; FAST: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32) 1337 ; FAST: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1) 1338 ; FAST: G_BR %bb.2 1339 ; FAST: bb.2: 1340 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1 1341 ; FAST: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32) 1342 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1) 1343 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1344 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]] 1345 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 1346 ; GREEDY-LABEL: name: phi_s1_v_scc_sbranch 1347 ; GREEDY: bb.0: 1348 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 1349 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1 1350 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 1351 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 1352 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 1353 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 1354 ; GREEDY: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32) 1355 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 1356 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 1357 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1) 1358 ; GREEDY: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1) 1359 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 1360 ; GREEDY: G_BR %bb.2 1361 ; GREEDY: bb.1: 1362 ; GREEDY: successors: %bb.2(0x80000000) 1363 ; GREEDY: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]] 1364 ; GREEDY: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32) 1365 ; GREEDY: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1) 1366 ; GREEDY: G_BR %bb.2 1367 ; GREEDY: bb.2: 1368 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1 1369 ; GREEDY: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32) 1370 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1) 1371 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1372 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]] 1373 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 1374 bb.0: 1375 successors: %bb.1, %bb.2 1376 liveins: $vgpr0, $sgpr0, $sgpr1 1377 1378 %0:_(s32) = COPY $vgpr0 1379 %1:_(s32) = COPY $sgpr0 1380 %2:_(s32) = COPY $sgpr1 1381 %3:_(s32) = G_CONSTANT i32 0 1382 %4:_(s1) = G_TRUNC %0 1383 %5:_(s1) = G_ICMP intpred(eq), %2, %3 1384 G_BRCOND %5, %bb.1 1385 G_BR %bb.2 1386 1387 bb.1: 1388 successors: %bb.2 1389 1390 %6:_(s1) = G_ICMP intpred(eq), %1, %3 1391 G_BR %bb.2 1392 1393 bb.2: 1394 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1 1395 %8:_(s32) = G_SELECT %7, %3, %0 1396 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8 1397 1398... 1399 1400--- 1401name: phi_s1_vcc_s_sbranch 1402legalized: true 1403tracksRegLiveness: true 1404 1405body: | 1406 ; FAST-LABEL: name: phi_s1_vcc_s_sbranch 1407 ; FAST: bb.0: 1408 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 1409 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1 1410 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 1411 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 1412 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 1413 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 1414 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1415 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]] 1416 ; FAST: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 1417 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32) 1418 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 1419 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 1420 ; FAST: G_BR %bb.2 1421 ; FAST: bb.1: 1422 ; FAST: successors: %bb.2(0x80000000) 1423 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32) 1424 ; FAST: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[TRUNC1]](s1) 1425 ; FAST: G_BR %bb.2 1426 ; FAST: bb.2: 1427 ; FAST: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[ICMP]](s1), %bb.0, [[COPY4]](s1), %bb.1 1428 ; FAST: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1429 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY]] 1430 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 1431 ; GREEDY-LABEL: name: phi_s1_vcc_s_sbranch 1432 ; GREEDY: bb.0: 1433 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 1434 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1 1435 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 1436 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 1437 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 1438 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 1439 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1440 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]] 1441 ; GREEDY: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 1442 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32) 1443 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 1444 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 1445 ; GREEDY: G_BR %bb.2 1446 ; GREEDY: bb.1: 1447 ; GREEDY: successors: %bb.2(0x80000000) 1448 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32) 1449 ; GREEDY: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[TRUNC1]](s1) 1450 ; GREEDY: G_BR %bb.2 1451 ; GREEDY: bb.2: 1452 ; GREEDY: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[ICMP]](s1), %bb.0, [[COPY4]](s1), %bb.1 1453 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1454 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY]] 1455 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 1456 bb.0: 1457 successors: %bb.1, %bb.2 1458 liveins: $vgpr0, $sgpr0, $sgpr1 1459 1460 %0:_(s32) = COPY $vgpr0 1461 %1:_(s32) = COPY $sgpr0 1462 %2:_(s32) = COPY $sgpr1 1463 %3:_(s32) = G_CONSTANT i32 0 1464 %4:_(s1) = G_ICMP intpred(eq), %0, %3 1465 %5:_(s1) = G_ICMP intpred(eq), %2, %3 1466 G_BRCOND %5, %bb.1 1467 G_BR %bb.2 1468 1469 bb.1: 1470 successors: %bb.2 1471 1472 %6:_(s1) = G_TRUNC %1 1473 G_BR %bb.2 1474 1475 bb.2: 1476 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1 1477 %8:_(s32) = G_SELECT %7, %3, %0 1478 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8 1479 1480... 1481 1482--- 1483name: phi_s1_s_vcc_sbranch 1484legalized: true 1485tracksRegLiveness: true 1486 1487body: | 1488 ; FAST-LABEL: name: phi_s1_s_vcc_sbranch 1489 ; FAST: bb.0: 1490 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 1491 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1 1492 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 1493 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 1494 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 1495 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 1496 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32) 1497 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 1498 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 1499 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1) 1500 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1) 1501 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 1502 ; FAST: G_BR %bb.2 1503 ; FAST: bb.1: 1504 ; FAST: successors: %bb.2(0x80000000) 1505 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1506 ; FAST: [[ICMP1:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY4]] 1507 ; FAST: G_BR %bb.2 1508 ; FAST: bb.2: 1509 ; FAST: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[COPY3]](s1), %bb.0, [[ICMP1]](s1), %bb.1 1510 ; FAST: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1511 ; FAST: [[COPY6:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32) 1512 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY6]] 1513 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 1514 ; GREEDY-LABEL: name: phi_s1_s_vcc_sbranch 1515 ; GREEDY: bb.0: 1516 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 1517 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1 1518 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 1519 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 1520 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 1521 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 1522 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32) 1523 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 1524 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 1525 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1) 1526 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1) 1527 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 1528 ; GREEDY: G_BR %bb.2 1529 ; GREEDY: bb.1: 1530 ; GREEDY: successors: %bb.2(0x80000000) 1531 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1532 ; GREEDY: [[ICMP1:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY4]] 1533 ; GREEDY: G_BR %bb.2 1534 ; GREEDY: bb.2: 1535 ; GREEDY: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[COPY3]](s1), %bb.0, [[ICMP1]](s1), %bb.1 1536 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1537 ; GREEDY: [[COPY6:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32) 1538 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY6]] 1539 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 1540 bb.0: 1541 successors: %bb.1, %bb.2 1542 liveins: $vgpr0, $sgpr0, $sgpr1 1543 1544 %0:_(s32) = COPY $sgpr0 1545 %1:_(s32) = COPY $vgpr0 1546 %2:_(s32) = COPY $sgpr1 1547 %3:_(s32) = G_CONSTANT i32 0 1548 %4:_(s1) = G_TRUNC %0 1549 %5:_(s1) = G_ICMP intpred(eq), %2, %3 1550 G_BRCOND %5, %bb.1 1551 G_BR %bb.2 1552 1553 bb.1: 1554 successors: %bb.2 1555 1556 %6:_(s1) = G_ICMP intpred(eq), %1, %3 1557 G_BR %bb.2 1558 1559 bb.2: 1560 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1 1561 %8:_(s32) = G_SELECT %7, %3, %0 1562 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8 1563 1564... 1565 1566--- 1567name: phi_s1_vcc_v_sbranch 1568legalized: true 1569tracksRegLiveness: true 1570 1571body: | 1572 ; FAST-LABEL: name: phi_s1_vcc_v_sbranch 1573 ; FAST: bb.0: 1574 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 1575 ; FAST: liveins: $vgpr0, $vgpr1, $sgpr0 1576 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 1577 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1 1578 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 1579 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 1580 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1581 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]] 1582 ; FAST: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 1583 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32) 1584 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 1585 ; FAST: [[C1:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 1 1586 ; FAST: [[C2:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 0 1587 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[ICMP]](s1), [[C1]], [[C2]] 1588 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 1589 ; FAST: G_BR %bb.2 1590 ; FAST: bb.1: 1591 ; FAST: successors: %bb.2(0x80000000) 1592 ; FAST: [[TRUNC1:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32) 1593 ; FAST: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC1]](s1) 1594 ; FAST: G_BR %bb.2 1595 ; FAST: bb.2: 1596 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[SELECT]](s32), %bb.0, [[ANYEXT]](s32), %bb.1 1597 ; FAST: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32) 1598 ; FAST: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[TRUNC2]](s1) 1599 ; FAST: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1600 ; FAST: [[SELECT1:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY4]](s1), [[COPY5]], [[COPY]] 1601 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT1]](s32) 1602 ; GREEDY-LABEL: name: phi_s1_vcc_v_sbranch 1603 ; GREEDY: bb.0: 1604 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 1605 ; GREEDY: liveins: $vgpr0, $vgpr1, $sgpr0 1606 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 1607 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1 1608 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 1609 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 1610 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1611 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]] 1612 ; GREEDY: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 1613 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32) 1614 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 1615 ; GREEDY: [[C1:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 1 1616 ; GREEDY: [[C2:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 0 1617 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[ICMP]](s1), [[C1]], [[C2]] 1618 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 1619 ; GREEDY: G_BR %bb.2 1620 ; GREEDY: bb.1: 1621 ; GREEDY: successors: %bb.2(0x80000000) 1622 ; GREEDY: [[TRUNC1:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32) 1623 ; GREEDY: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC1]](s1) 1624 ; GREEDY: G_BR %bb.2 1625 ; GREEDY: bb.2: 1626 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[SELECT]](s32), %bb.0, [[ANYEXT]](s32), %bb.1 1627 ; GREEDY: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32) 1628 ; GREEDY: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[TRUNC2]](s1) 1629 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1630 ; GREEDY: [[SELECT1:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY4]](s1), [[COPY5]], [[COPY]] 1631 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT1]](s32) 1632 bb.0: 1633 successors: %bb.1, %bb.2 1634 liveins: $vgpr0, $vgpr1, $sgpr0 1635 1636 %0:_(s32) = COPY $vgpr0 1637 %1:_(s32) = COPY $vgpr1 1638 %2:_(s32) = COPY $sgpr0 1639 %3:_(s32) = G_CONSTANT i32 0 1640 %4:_(s1) = G_ICMP intpred(eq), %0, %3 1641 %5:_(s1) = G_ICMP intpred(eq), %2, %3 1642 G_BRCOND %5, %bb.1 1643 G_BR %bb.2 1644 1645 bb.1: 1646 successors: %bb.2 1647 1648 %6:_(s1) = G_TRUNC %1 1649 G_BR %bb.2 1650 1651 bb.2: 1652 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1 1653 %8:_(s32) = G_SELECT %7, %3, %0 1654 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8 1655 1656... 1657 1658--- 1659name: phi_s1_v_vcc_sbranch 1660legalized: true 1661tracksRegLiveness: true 1662 1663body: | 1664 ; FAST-LABEL: name: phi_s1_v_vcc_sbranch 1665 ; FAST: bb.0: 1666 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 1667 ; FAST: liveins: $vgpr0, $vgpr1, $sgpr0 1668 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 1669 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1 1670 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 1671 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 1672 ; FAST: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32) 1673 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 1674 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 1675 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1) 1676 ; FAST: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1) 1677 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 1678 ; FAST: G_BR %bb.2 1679 ; FAST: bb.1: 1680 ; FAST: successors: %bb.2(0x80000000) 1681 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1682 ; FAST: [[ICMP1:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY3]] 1683 ; FAST: [[C1:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 1 1684 ; FAST: [[C2:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 0 1685 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[ICMP1]](s1), [[C1]], [[C2]] 1686 ; FAST: G_BR %bb.2 1687 ; FAST: bb.2: 1688 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[SELECT]](s32), %bb.1 1689 ; FAST: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32) 1690 ; FAST: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[TRUNC2]](s1) 1691 ; FAST: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1692 ; FAST: [[SELECT1:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY4]](s1), [[COPY5]], [[COPY]] 1693 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT1]](s32) 1694 ; GREEDY-LABEL: name: phi_s1_v_vcc_sbranch 1695 ; GREEDY: bb.0: 1696 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 1697 ; GREEDY: liveins: $vgpr0, $vgpr1, $sgpr0 1698 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 1699 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1 1700 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 1701 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 1702 ; GREEDY: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32) 1703 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 1704 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 1705 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1) 1706 ; GREEDY: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1) 1707 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 1708 ; GREEDY: G_BR %bb.2 1709 ; GREEDY: bb.1: 1710 ; GREEDY: successors: %bb.2(0x80000000) 1711 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1712 ; GREEDY: [[ICMP1:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY3]] 1713 ; GREEDY: [[C1:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 1 1714 ; GREEDY: [[C2:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 0 1715 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[ICMP1]](s1), [[C1]], [[C2]] 1716 ; GREEDY: G_BR %bb.2 1717 ; GREEDY: bb.2: 1718 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[SELECT]](s32), %bb.1 1719 ; GREEDY: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32) 1720 ; GREEDY: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[TRUNC2]](s1) 1721 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1722 ; GREEDY: [[SELECT1:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY4]](s1), [[COPY5]], [[COPY]] 1723 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT1]](s32) 1724 bb.0: 1725 successors: %bb.1, %bb.2 1726 liveins: $vgpr0, $vgpr1, $sgpr0 1727 1728 %0:_(s32) = COPY $vgpr0 1729 %1:_(s32) = COPY $vgpr1 1730 %2:_(s32) = COPY $sgpr0 1731 %3:_(s32) = G_CONSTANT i32 0 1732 %4:_(s1) = G_TRUNC %0 1733 %5:_(s1) = G_ICMP intpred(eq), %2, %3 1734 G_BRCOND %5, %bb.1 1735 G_BR %bb.2 1736 1737 bb.1: 1738 successors: %bb.2 1739 1740 %6:_(s1) = G_ICMP intpred(eq), %1, %3 1741 G_BR %bb.2 1742 1743 bb.2: 1744 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1 1745 %8:_(s32) = G_SELECT %7, %3, %0 1746 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8 1747 1748... 1749 1750--- 1751name: phi_s1_v_s_sbranch 1752legalized: true 1753tracksRegLiveness: true 1754 1755body: | 1756 ; FAST-LABEL: name: phi_s1_v_s_sbranch 1757 ; FAST: bb.0: 1758 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 1759 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1 1760 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 1761 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 1762 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 1763 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 1764 ; FAST: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32) 1765 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 1766 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 1767 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1) 1768 ; FAST: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1) 1769 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 1770 ; FAST: G_BR %bb.2 1771 ; FAST: bb.1: 1772 ; FAST: successors: %bb.2(0x80000000) 1773 ; FAST: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32) 1774 ; FAST: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1) 1775 ; FAST: G_BR %bb.2 1776 ; FAST: bb.2: 1777 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1 1778 ; FAST: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32) 1779 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1) 1780 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1781 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]] 1782 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 1783 ; GREEDY-LABEL: name: phi_s1_v_s_sbranch 1784 ; GREEDY: bb.0: 1785 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 1786 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1 1787 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 1788 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 1789 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 1790 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 1791 ; GREEDY: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32) 1792 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 1793 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 1794 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1) 1795 ; GREEDY: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1) 1796 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 1797 ; GREEDY: G_BR %bb.2 1798 ; GREEDY: bb.1: 1799 ; GREEDY: successors: %bb.2(0x80000000) 1800 ; GREEDY: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32) 1801 ; GREEDY: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1) 1802 ; GREEDY: G_BR %bb.2 1803 ; GREEDY: bb.2: 1804 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1 1805 ; GREEDY: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32) 1806 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1) 1807 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1808 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]] 1809 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 1810 bb.0: 1811 successors: %bb.1, %bb.2 1812 liveins: $vgpr0, $sgpr0, $sgpr1 1813 1814 %0:_(s32) = COPY $vgpr0 1815 %1:_(s32) = COPY $sgpr0 1816 %2:_(s32) = COPY $sgpr1 1817 %3:_(s32) = G_CONSTANT i32 0 1818 %4:_(s1) = G_TRUNC %0 1819 %5:_(s1) = G_ICMP intpred(eq), %2, %3 1820 G_BRCOND %5, %bb.1 1821 G_BR %bb.2 1822 1823 bb.1: 1824 successors: %bb.2 1825 1826 %6:_(s1) = G_TRUNC %1 1827 G_BR %bb.2 1828 1829 bb.2: 1830 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1 1831 %8:_(s32) = G_SELECT %7, %3, %0 1832 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8 1833 1834... 1835 1836--- 1837name: phi_s1_s_v_sbranch 1838legalized: true 1839tracksRegLiveness: true 1840 1841body: | 1842 ; FAST-LABEL: name: phi_s1_s_v_sbranch 1843 ; FAST: bb.0: 1844 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 1845 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1 1846 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 1847 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 1848 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 1849 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 1850 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32) 1851 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 1852 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 1853 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1) 1854 ; FAST: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1) 1855 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 1856 ; FAST: G_BR %bb.2 1857 ; FAST: bb.1: 1858 ; FAST: successors: %bb.2(0x80000000) 1859 ; FAST: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32) 1860 ; FAST: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1) 1861 ; FAST: G_BR %bb.2 1862 ; FAST: bb.2: 1863 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1 1864 ; FAST: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32) 1865 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1) 1866 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1867 ; FAST: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32) 1868 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]] 1869 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 1870 ; GREEDY-LABEL: name: phi_s1_s_v_sbranch 1871 ; GREEDY: bb.0: 1872 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 1873 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1 1874 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 1875 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 1876 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 1877 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 1878 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32) 1879 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 1880 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 1881 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1) 1882 ; GREEDY: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1) 1883 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 1884 ; GREEDY: G_BR %bb.2 1885 ; GREEDY: bb.1: 1886 ; GREEDY: successors: %bb.2(0x80000000) 1887 ; GREEDY: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32) 1888 ; GREEDY: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1) 1889 ; GREEDY: G_BR %bb.2 1890 ; GREEDY: bb.2: 1891 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1 1892 ; GREEDY: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32) 1893 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1) 1894 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1895 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32) 1896 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]] 1897 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 1898 bb.0: 1899 successors: %bb.1, %bb.2 1900 liveins: $vgpr0, $sgpr0, $sgpr1 1901 1902 %0:_(s32) = COPY $sgpr0 1903 %1:_(s32) = COPY $vgpr0 1904 %2:_(s32) = COPY $sgpr1 1905 %3:_(s32) = G_CONSTANT i32 0 1906 %4:_(s1) = G_TRUNC %0 1907 %5:_(s1) = G_ICMP intpred(eq), %2, %3 1908 G_BRCOND %5, %bb.1 1909 G_BR %bb.2 1910 1911 bb.1: 1912 successors: %bb.2 1913 1914 %6:_(s1) = G_TRUNC %1 1915 G_BR %bb.2 1916 1917 bb.2: 1918 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1 1919 %8:_(s32) = G_SELECT %7, %3, %0 1920 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8 1921 1922... 1923 1924--- 1925name: phi_s1_v_v_sbranch 1926legalized: true 1927tracksRegLiveness: true 1928 1929body: | 1930 ; FAST-LABEL: name: phi_s1_v_v_sbranch 1931 ; FAST: bb.0: 1932 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 1933 ; FAST: liveins: $vgpr0, $vgpr1, $sgpr0 1934 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 1935 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1 1936 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 1937 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 1938 ; FAST: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32) 1939 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 1940 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 1941 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1) 1942 ; FAST: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1) 1943 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 1944 ; FAST: G_BR %bb.2 1945 ; FAST: bb.1: 1946 ; FAST: successors: %bb.2(0x80000000) 1947 ; FAST: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32) 1948 ; FAST: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1) 1949 ; FAST: G_BR %bb.2 1950 ; FAST: bb.2: 1951 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1 1952 ; FAST: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32) 1953 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1) 1954 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1955 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]] 1956 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 1957 ; GREEDY-LABEL: name: phi_s1_v_v_sbranch 1958 ; GREEDY: bb.0: 1959 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 1960 ; GREEDY: liveins: $vgpr0, $vgpr1, $sgpr0 1961 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 1962 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1 1963 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 1964 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 1965 ; GREEDY: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32) 1966 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 1967 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 1968 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1) 1969 ; GREEDY: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1) 1970 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 1971 ; GREEDY: G_BR %bb.2 1972 ; GREEDY: bb.1: 1973 ; GREEDY: successors: %bb.2(0x80000000) 1974 ; GREEDY: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32) 1975 ; GREEDY: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1) 1976 ; GREEDY: G_BR %bb.2 1977 ; GREEDY: bb.2: 1978 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1 1979 ; GREEDY: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32) 1980 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1) 1981 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32) 1982 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]] 1983 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 1984 bb.0: 1985 successors: %bb.1, %bb.2 1986 liveins: $vgpr0, $vgpr1, $sgpr0 1987 1988 %0:_(s32) = COPY $vgpr0 1989 %1:_(s32) = COPY $vgpr1 1990 %2:_(s32) = COPY $sgpr0 1991 %3:_(s32) = G_CONSTANT i32 0 1992 %4:_(s1) = G_TRUNC %0 1993 %5:_(s1) = G_ICMP intpred(eq), %2, %3 1994 G_BRCOND %5, %bb.1 1995 G_BR %bb.2 1996 1997 bb.1: 1998 successors: %bb.2 1999 2000 %6:_(s1) = G_TRUNC %1 2001 G_BR %bb.2 2002 2003 bb.2: 2004 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1 2005 %8:_(s32) = G_SELECT %7, %3, %0 2006 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8 2007 2008... 2009 2010--- 2011name: phi_s1_s_s_sbranch 2012legalized: true 2013tracksRegLiveness: true 2014 2015body: | 2016 ; FAST-LABEL: name: phi_s1_s_s_sbranch 2017 ; FAST: bb.0: 2018 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 2019 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2 2020 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 2021 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 2022 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 2023 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 2024 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32) 2025 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 2026 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 2027 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1) 2028 ; FAST: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1) 2029 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 2030 ; FAST: G_BR %bb.2 2031 ; FAST: bb.1: 2032 ; FAST: successors: %bb.2(0x80000000) 2033 ; FAST: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32) 2034 ; FAST: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1) 2035 ; FAST: G_BR %bb.2 2036 ; FAST: bb.2: 2037 ; FAST: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1 2038 ; FAST: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32) 2039 ; FAST: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1) 2040 ; FAST: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT1]](s32), [[C]], [[COPY]] 2041 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 2042 ; GREEDY-LABEL: name: phi_s1_s_s_sbranch 2043 ; GREEDY: bb.0: 2044 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 2045 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2 2046 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 2047 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 2048 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 2049 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 2050 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32) 2051 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 2052 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 2053 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1) 2054 ; GREEDY: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1) 2055 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 2056 ; GREEDY: G_BR %bb.2 2057 ; GREEDY: bb.1: 2058 ; GREEDY: successors: %bb.2(0x80000000) 2059 ; GREEDY: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32) 2060 ; GREEDY: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1) 2061 ; GREEDY: G_BR %bb.2 2062 ; GREEDY: bb.2: 2063 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1 2064 ; GREEDY: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32) 2065 ; GREEDY: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1) 2066 ; GREEDY: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT1]](s32), [[C]], [[COPY]] 2067 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32) 2068 bb.0: 2069 successors: %bb.1, %bb.2 2070 liveins: $sgpr0, $sgpr1, $sgpr2 2071 2072 %0:_(s32) = COPY $sgpr0 2073 %1:_(s32) = COPY $sgpr1 2074 %2:_(s32) = COPY $sgpr2 2075 %3:_(s32) = G_CONSTANT i32 0 2076 %4:_(s1) = G_TRUNC %0 2077 %5:_(s1) = G_ICMP intpred(eq), %2, %3 2078 G_BRCOND %5, %bb.1 2079 G_BR %bb.2 2080 2081 bb.1: 2082 successors: %bb.2 2083 2084 %6:_(s1) = G_TRUNC %1 2085 G_BR %bb.2 2086 2087 bb.2: 2088 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1 2089 %8:_(s32) = G_SELECT %7, %3, %0 2090 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8 2091 2092... 2093 2094# Test a phi where the VGPR input is after the phi itself 2095--- 2096name: phi_s32_s_loop_v_sbranch 2097legalized: true 2098tracksRegLiveness: true 2099 2100body: | 2101 ; FAST-LABEL: name: phi_s32_s_loop_v_sbranch 2102 ; FAST: bb.0: 2103 ; FAST: successors: %bb.1(0x80000000) 2104 ; FAST: liveins: $sgpr0, $sgpr1, $vgpr0 2105 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 2106 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 2107 ; FAST: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 2108 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 2109 ; FAST: G_BR %bb.1 2110 ; FAST: bb.1: 2111 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 2112 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, %5(s32), %bb.1 2113 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY2]](s32) 2114 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]] 2115 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 2116 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 2117 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 2118 ; FAST: G_BR %bb.2 2119 ; FAST: bb.2: 2120 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[PHI]](s32) 2121 ; GREEDY-LABEL: name: phi_s32_s_loop_v_sbranch 2122 ; GREEDY: bb.0: 2123 ; GREEDY: successors: %bb.1(0x80000000) 2124 ; GREEDY: liveins: $sgpr0, $sgpr1, $vgpr0 2125 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 2126 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 2127 ; GREEDY: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 2128 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 2129 ; GREEDY: G_BR %bb.1 2130 ; GREEDY: bb.1: 2131 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 2132 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, %5(s32), %bb.1 2133 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY2]](s32) 2134 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]] 2135 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 2136 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 2137 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 2138 ; GREEDY: G_BR %bb.2 2139 ; GREEDY: bb.2: 2140 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[PHI]](s32) 2141 bb.0: 2142 successors: %bb.1 2143 liveins: $sgpr0, $sgpr1, $vgpr0 2144 2145 %0:_(s32) = COPY $sgpr0 2146 %1:_(s32) = COPY $sgpr1 2147 %2:_(s32) = COPY $vgpr0 2148 %3:_(s32) = G_CONSTANT i32 0 2149 G_BR %bb.1 2150 2151 bb.1: 2152 successors: %bb.1, %bb.2 2153 2154 %4:_(s32) = G_PHI %0, %bb.0, %5, %bb.1 2155 %5:_(s32) = COPY %2 2156 %6:_(s1) = G_ICMP intpred(eq), %1, %3 2157 G_BRCOND %6, %bb.1 2158 G_BR %bb.2 2159 2160 bb.2: 2161 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %4 2162 2163... 2164 2165# Test a phi where an SGPR input is after the phi itself 2166--- 2167name: phi_s32_s_loop_s_sbranch 2168legalized: true 2169tracksRegLiveness: true 2170 2171body: | 2172 ; FAST-LABEL: name: phi_s32_s_loop_s_sbranch 2173 ; FAST: bb.0: 2174 ; FAST: successors: %bb.1(0x80000000) 2175 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2 2176 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 2177 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 2178 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 2179 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 2180 ; FAST: G_BR %bb.1 2181 ; FAST: bb.1: 2182 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 2183 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, %5(s32), %bb.1 2184 ; FAST: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY [[COPY2]](s32) 2185 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]] 2186 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 2187 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 2188 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 2189 ; FAST: G_BR %bb.2 2190 ; FAST: bb.2: 2191 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[PHI]](s32) 2192 ; GREEDY-LABEL: name: phi_s32_s_loop_s_sbranch 2193 ; GREEDY: bb.0: 2194 ; GREEDY: successors: %bb.1(0x80000000) 2195 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2 2196 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 2197 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 2198 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 2199 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 2200 ; GREEDY: G_BR %bb.1 2201 ; GREEDY: bb.1: 2202 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 2203 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, %5(s32), %bb.1 2204 ; GREEDY: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY [[COPY2]](s32) 2205 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]] 2206 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 2207 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 2208 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 2209 ; GREEDY: G_BR %bb.2 2210 ; GREEDY: bb.2: 2211 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[PHI]](s32) 2212 bb.0: 2213 successors: %bb.1 2214 liveins: $sgpr0, $sgpr1, $sgpr2 2215 2216 %0:_(s32) = COPY $sgpr0 2217 %1:_(s32) = COPY $sgpr1 2218 %2:_(s32) = COPY $sgpr2 2219 %3:_(s32) = G_CONSTANT i32 0 2220 G_BR %bb.1 2221 2222 bb.1: 2223 successors: %bb.1, %bb.2 2224 2225 %4:_(s32) = G_PHI %0, %bb.0, %5, %bb.1 2226 %5:_(s32) = COPY %2 2227 %6:_(s1) = G_ICMP intpred(eq), %1, %3 2228 G_BRCOND %6, %bb.1 2229 G_BR %bb.2 2230 2231 bb.2: 2232 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %4 2233 2234... 2235 2236--- 2237name: phi_s32_ss_sbranch_cycle 2238legalized: true 2239tracksRegLiveness: true 2240 2241body: | 2242 ; FAST-LABEL: name: phi_s32_ss_sbranch_cycle 2243 ; FAST: bb.0: 2244 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 2245 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2 2246 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 2247 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 2248 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 2249 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 2250 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 2251 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 2252 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 2253 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 2254 ; FAST: G_BR %bb.2 2255 ; FAST: bb.1: 2256 ; FAST: successors: %bb.2(0x80000000) 2257 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, %6(s32), %bb.2 2258 ; FAST: G_BR %bb.2 2259 ; FAST: bb.2: 2260 ; FAST: successors: %bb.1(0x80000000) 2261 ; FAST: [[PHI1:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[PHI]](s32), %bb.1 2262 ; FAST: G_BR %bb.1 2263 ; GREEDY-LABEL: name: phi_s32_ss_sbranch_cycle 2264 ; GREEDY: bb.0: 2265 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 2266 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2 2267 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 2268 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 2269 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 2270 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 2271 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 2272 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 2273 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 2274 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 2275 ; GREEDY: G_BR %bb.2 2276 ; GREEDY: bb.1: 2277 ; GREEDY: successors: %bb.2(0x80000000) 2278 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, %6(s32), %bb.2 2279 ; GREEDY: G_BR %bb.2 2280 ; GREEDY: bb.2: 2281 ; GREEDY: successors: %bb.1(0x80000000) 2282 ; GREEDY: [[PHI1:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[PHI]](s32), %bb.1 2283 ; GREEDY: G_BR %bb.1 2284 bb.0: 2285 successors: %bb.1, %bb.2 2286 liveins: $sgpr0, $sgpr1, $sgpr2 2287 2288 %0:_(s32) = COPY $sgpr0 2289 %1:_(s32) = COPY $sgpr1 2290 %2:_(s32) = COPY $sgpr2 2291 %3:_(s32) = G_CONSTANT i32 0 2292 %4:_(s1) = G_ICMP intpred(eq), %2, %3 2293 G_BRCOND %4, %bb.1 2294 G_BR %bb.2 2295 2296 bb.1: 2297 successors: %bb.2 2298 %5:_(s32) = G_PHI %0, %bb.0, %6, %bb.2 2299 G_BR %bb.2 2300 2301 bb.2: 2302 successors: %bb.1 2303 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1 2304 G_BR %bb.1 2305... 2306 2307--- 2308name: phi_s32_vs_sbranch_cycle 2309legalized: true 2310tracksRegLiveness: true 2311 2312body: | 2313 ; FAST-LABEL: name: phi_s32_vs_sbranch_cycle 2314 ; FAST: bb.0: 2315 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 2316 ; FAST: liveins: $vgpr0, $sgpr1, $sgpr2 2317 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 2318 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 2319 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 2320 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 2321 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 2322 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 2323 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 2324 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 2325 ; FAST: G_BR %bb.2 2326 ; FAST: bb.1: 2327 ; FAST: successors: %bb.2(0x80000000) 2328 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, %6(s32), %bb.2 2329 ; FAST: G_BR %bb.2 2330 ; FAST: bb.2: 2331 ; FAST: successors: %bb.1(0x80000000) 2332 ; FAST: [[PHI1:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[PHI]](s32), %bb.1 2333 ; FAST: G_BR %bb.1 2334 ; GREEDY-LABEL: name: phi_s32_vs_sbranch_cycle 2335 ; GREEDY: bb.0: 2336 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 2337 ; GREEDY: liveins: $vgpr0, $sgpr1, $sgpr2 2338 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 2339 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1 2340 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 2341 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 2342 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 2343 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 2344 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 2345 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 2346 ; GREEDY: G_BR %bb.2 2347 ; GREEDY: bb.1: 2348 ; GREEDY: successors: %bb.2(0x80000000) 2349 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, %6(s32), %bb.2 2350 ; GREEDY: G_BR %bb.2 2351 ; GREEDY: bb.2: 2352 ; GREEDY: successors: %bb.1(0x80000000) 2353 ; GREEDY: [[PHI1:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[PHI]](s32), %bb.1 2354 ; GREEDY: G_BR %bb.1 2355 bb.0: 2356 successors: %bb.1, %bb.2 2357 liveins: $vgpr0, $sgpr1, $sgpr2 2358 2359 %0:_(s32) = COPY $vgpr0 2360 %1:_(s32) = COPY $sgpr1 2361 %2:_(s32) = COPY $sgpr2 2362 %3:_(s32) = G_CONSTANT i32 0 2363 %4:_(s1) = G_ICMP intpred(eq), %2, %3 2364 G_BRCOND %4, %bb.1 2365 G_BR %bb.2 2366 2367 bb.1: 2368 successors: %bb.2 2369 %5:_(s32) = G_PHI %0, %bb.0, %6, %bb.2 2370 G_BR %bb.2 2371 2372 bb.2: 2373 successors: %bb.1 2374 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1 2375 G_BR %bb.1 2376... 2377 2378--- 2379name: phi_s32_aa_sbranch 2380legalized: true 2381tracksRegLiveness: true 2382 2383body: | 2384 ; FAST-LABEL: name: phi_s32_aa_sbranch 2385 ; FAST: bb.0: 2386 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 2387 ; FAST: liveins: $agpr0, $agpr1, $sgpr2 2388 ; FAST: [[COPY:%[0-9]+]]:agpr(s32) = COPY $agpr0 2389 ; FAST: [[COPY1:%[0-9]+]]:agpr(s32) = COPY $agpr1 2390 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 2391 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 2392 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 2393 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 2394 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 2395 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 2396 ; FAST: G_BR %bb.2 2397 ; FAST: bb.1: 2398 ; FAST: successors: %bb.2(0x80000000) 2399 ; FAST: [[COPY3:%[0-9]+]]:agpr(s32) = COPY [[COPY1]](s32) 2400 ; FAST: G_BR %bb.2 2401 ; FAST: bb.2: 2402 ; FAST: [[PHI:%[0-9]+]]:agpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1 2403 ; FAST: $agpr0 = COPY [[PHI]](s32) 2404 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31 2405 ; GREEDY-LABEL: name: phi_s32_aa_sbranch 2406 ; GREEDY: bb.0: 2407 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 2408 ; GREEDY: liveins: $agpr0, $agpr1, $sgpr2 2409 ; GREEDY: [[COPY:%[0-9]+]]:agpr(s32) = COPY $agpr0 2410 ; GREEDY: [[COPY1:%[0-9]+]]:agpr(s32) = COPY $agpr1 2411 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 2412 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 2413 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 2414 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 2415 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 2416 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 2417 ; GREEDY: G_BR %bb.2 2418 ; GREEDY: bb.1: 2419 ; GREEDY: successors: %bb.2(0x80000000) 2420 ; GREEDY: [[COPY3:%[0-9]+]]:agpr(s32) = COPY [[COPY1]](s32) 2421 ; GREEDY: G_BR %bb.2 2422 ; GREEDY: bb.2: 2423 ; GREEDY: [[PHI:%[0-9]+]]:agpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1 2424 ; GREEDY: $agpr0 = COPY [[PHI]](s32) 2425 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31 2426 bb.0: 2427 successors: %bb.1, %bb.2 2428 liveins: $agpr0, $agpr1, $sgpr2 2429 2430 %0:_(s32) = COPY $agpr0 2431 %1:_(s32) = COPY $agpr1 2432 %2:_(s32) = COPY $sgpr2 2433 %3:_(s32) = G_CONSTANT i32 0 2434 %4:_(s1) = G_ICMP intpred(eq), %2, %3 2435 G_BRCOND %4, %bb.1 2436 G_BR %bb.2 2437 2438 bb.1: 2439 successors: %bb.2 2440 2441 %5:_(s32) = COPY %1 2442 G_BR %bb.2 2443 2444 bb.2: 2445 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1 2446 $agpr0 = COPY %6 2447 S_SETPC_B64 undef $sgpr30_sgpr31 2448 2449... 2450 2451--- 2452name: phi_s32_av_sbranch 2453legalized: true 2454tracksRegLiveness: true 2455 2456body: | 2457 ; FAST-LABEL: name: phi_s32_av_sbranch 2458 ; FAST: bb.0: 2459 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 2460 ; FAST: liveins: $agpr0, $vgpr0, $sgpr2 2461 ; FAST: [[COPY:%[0-9]+]]:agpr(s32) = COPY $agpr0 2462 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 2463 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 2464 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 2465 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 2466 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 2467 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 2468 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 2469 ; FAST: G_BR %bb.2 2470 ; FAST: bb.1: 2471 ; FAST: successors: %bb.2(0x80000000) 2472 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32) 2473 ; FAST: G_BR %bb.2 2474 ; FAST: bb.2: 2475 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1 2476 ; FAST: $agpr0 = COPY [[PHI]](s32) 2477 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31 2478 ; GREEDY-LABEL: name: phi_s32_av_sbranch 2479 ; GREEDY: bb.0: 2480 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 2481 ; GREEDY: liveins: $agpr0, $vgpr0, $sgpr2 2482 ; GREEDY: [[COPY:%[0-9]+]]:agpr(s32) = COPY $agpr0 2483 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 2484 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 2485 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 2486 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 2487 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 2488 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 2489 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 2490 ; GREEDY: G_BR %bb.2 2491 ; GREEDY: bb.1: 2492 ; GREEDY: successors: %bb.2(0x80000000) 2493 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32) 2494 ; GREEDY: G_BR %bb.2 2495 ; GREEDY: bb.2: 2496 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1 2497 ; GREEDY: $agpr0 = COPY [[PHI]](s32) 2498 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31 2499 bb.0: 2500 successors: %bb.1, %bb.2 2501 liveins: $agpr0, $vgpr0, $sgpr2 2502 2503 %0:_(s32) = COPY $agpr0 2504 %1:_(s32) = COPY $vgpr0 2505 %2:_(s32) = COPY $sgpr2 2506 %3:_(s32) = G_CONSTANT i32 0 2507 %4:_(s1) = G_ICMP intpred(eq), %2, %3 2508 G_BRCOND %4, %bb.1 2509 G_BR %bb.2 2510 2511 bb.1: 2512 successors: %bb.2 2513 2514 %5:_(s32) = COPY %1 2515 G_BR %bb.2 2516 2517 bb.2: 2518 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1 2519 $agpr0 = COPY %6 2520 S_SETPC_B64 undef $sgpr30_sgpr31 2521 2522... 2523--- 2524name: phi_s32_va_sbranch 2525legalized: true 2526tracksRegLiveness: true 2527 2528body: | 2529 ; FAST-LABEL: name: phi_s32_va_sbranch 2530 ; FAST: bb.0: 2531 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 2532 ; FAST: liveins: $agpr0, $vgpr0, $sgpr2 2533 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 2534 ; FAST: [[COPY1:%[0-9]+]]:agpr(s32) = COPY $agpr0 2535 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 2536 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 2537 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 2538 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 2539 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 2540 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 2541 ; FAST: G_BR %bb.2 2542 ; FAST: bb.1: 2543 ; FAST: successors: %bb.2(0x80000000) 2544 ; FAST: [[COPY3:%[0-9]+]]:agpr(s32) = COPY [[COPY1]](s32) 2545 ; FAST: G_BR %bb.2 2546 ; FAST: bb.2: 2547 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1 2548 ; FAST: $agpr0 = COPY [[PHI]](s32) 2549 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31 2550 ; GREEDY-LABEL: name: phi_s32_va_sbranch 2551 ; GREEDY: bb.0: 2552 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 2553 ; GREEDY: liveins: $agpr0, $vgpr0, $sgpr2 2554 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0 2555 ; GREEDY: [[COPY1:%[0-9]+]]:agpr(s32) = COPY $agpr0 2556 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 2557 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 2558 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 2559 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 2560 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 2561 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 2562 ; GREEDY: G_BR %bb.2 2563 ; GREEDY: bb.1: 2564 ; GREEDY: successors: %bb.2(0x80000000) 2565 ; GREEDY: [[COPY3:%[0-9]+]]:agpr(s32) = COPY [[COPY1]](s32) 2566 ; GREEDY: G_BR %bb.2 2567 ; GREEDY: bb.2: 2568 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1 2569 ; GREEDY: $agpr0 = COPY [[PHI]](s32) 2570 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31 2571 bb.0: 2572 successors: %bb.1, %bb.2 2573 liveins: $agpr0, $vgpr0, $sgpr2 2574 2575 %0:_(s32) = COPY $vgpr0 2576 %1:_(s32) = COPY $agpr0 2577 %2:_(s32) = COPY $sgpr2 2578 %3:_(s32) = G_CONSTANT i32 0 2579 %4:_(s1) = G_ICMP intpred(eq), %2, %3 2580 G_BRCOND %4, %bb.1 2581 G_BR %bb.2 2582 2583 bb.1: 2584 successors: %bb.2 2585 2586 %5:_(s32) = COPY %1 2587 G_BR %bb.2 2588 2589 bb.2: 2590 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1 2591 $agpr0 = COPY %6 2592 S_SETPC_B64 undef $sgpr30_sgpr31 2593 2594... 2595 2596--- 2597name: phi_s32_as_sbranch 2598legalized: true 2599tracksRegLiveness: true 2600 2601body: | 2602 ; FAST-LABEL: name: phi_s32_as_sbranch 2603 ; FAST: bb.0: 2604 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 2605 ; FAST: liveins: $agpr0, $sgpr0, $sgpr2 2606 ; FAST: [[COPY:%[0-9]+]]:agpr(s32) = COPY $agpr0 2607 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 2608 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 2609 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 2610 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 2611 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 2612 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 2613 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 2614 ; FAST: G_BR %bb.2 2615 ; FAST: bb.1: 2616 ; FAST: successors: %bb.2(0x80000000) 2617 ; FAST: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32) 2618 ; FAST: G_BR %bb.2 2619 ; FAST: bb.2: 2620 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1 2621 ; FAST: $agpr0 = COPY [[PHI]](s32) 2622 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31 2623 ; GREEDY-LABEL: name: phi_s32_as_sbranch 2624 ; GREEDY: bb.0: 2625 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 2626 ; GREEDY: liveins: $agpr0, $sgpr0, $sgpr2 2627 ; GREEDY: [[COPY:%[0-9]+]]:agpr(s32) = COPY $agpr0 2628 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 2629 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 2630 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 2631 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 2632 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 2633 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 2634 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 2635 ; GREEDY: G_BR %bb.2 2636 ; GREEDY: bb.1: 2637 ; GREEDY: successors: %bb.2(0x80000000) 2638 ; GREEDY: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32) 2639 ; GREEDY: G_BR %bb.2 2640 ; GREEDY: bb.2: 2641 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1 2642 ; GREEDY: $agpr0 = COPY [[PHI]](s32) 2643 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31 2644 bb.0: 2645 successors: %bb.1, %bb.2 2646 liveins: $agpr0, $sgpr0, $sgpr2 2647 2648 %0:_(s32) = COPY $agpr0 2649 %1:_(s32) = COPY $sgpr0 2650 %2:_(s32) = COPY $sgpr2 2651 %3:_(s32) = G_CONSTANT i32 0 2652 %4:_(s1) = G_ICMP intpred(eq), %2, %3 2653 G_BRCOND %4, %bb.1 2654 G_BR %bb.2 2655 2656 bb.1: 2657 successors: %bb.2 2658 2659 %5:_(s32) = COPY %1 2660 G_BR %bb.2 2661 2662 bb.2: 2663 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1 2664 $agpr0 = COPY %6 2665 S_SETPC_B64 undef $sgpr30_sgpr31 2666 2667... 2668 2669--- 2670name: phi_s32_sa_sbranch 2671legalized: true 2672tracksRegLiveness: true 2673 2674body: | 2675 ; FAST-LABEL: name: phi_s32_sa_sbranch 2676 ; FAST: bb.0: 2677 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000) 2678 ; FAST: liveins: $agpr0, $sgpr0, $sgpr2 2679 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 2680 ; FAST: [[COPY1:%[0-9]+]]:agpr(s32) = COPY $agpr0 2681 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 2682 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 2683 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 2684 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 2685 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 2686 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1 2687 ; FAST: G_BR %bb.2 2688 ; FAST: bb.1: 2689 ; FAST: successors: %bb.2(0x80000000) 2690 ; FAST: [[COPY3:%[0-9]+]]:agpr(s32) = COPY [[COPY1]](s32) 2691 ; FAST: G_BR %bb.2 2692 ; FAST: bb.2: 2693 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1 2694 ; FAST: $agpr0 = COPY [[PHI]](s32) 2695 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31 2696 ; GREEDY-LABEL: name: phi_s32_sa_sbranch 2697 ; GREEDY: bb.0: 2698 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000) 2699 ; GREEDY: liveins: $agpr0, $sgpr0, $sgpr2 2700 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0 2701 ; GREEDY: [[COPY1:%[0-9]+]]:agpr(s32) = COPY $agpr0 2702 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2 2703 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0 2704 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]] 2705 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32) 2706 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1) 2707 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1 2708 ; GREEDY: G_BR %bb.2 2709 ; GREEDY: bb.1: 2710 ; GREEDY: successors: %bb.2(0x80000000) 2711 ; GREEDY: [[COPY3:%[0-9]+]]:agpr(s32) = COPY [[COPY1]](s32) 2712 ; GREEDY: G_BR %bb.2 2713 ; GREEDY: bb.2: 2714 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1 2715 ; GREEDY: $agpr0 = COPY [[PHI]](s32) 2716 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31 2717 bb.0: 2718 successors: %bb.1, %bb.2 2719 liveins: $agpr0, $sgpr0, $sgpr2 2720 2721 %0:_(s32) = COPY $sgpr0 2722 %1:_(s32) = COPY $agpr0 2723 %2:_(s32) = COPY $sgpr2 2724 %3:_(s32) = G_CONSTANT i32 0 2725 %4:_(s1) = G_ICMP intpred(eq), %2, %3 2726 G_BRCOND %4, %bb.1 2727 G_BR %bb.2 2728 2729 bb.1: 2730 successors: %bb.2 2731 2732 %5:_(s32) = COPY %1 2733 G_BR %bb.2 2734 2735 bb.2: 2736 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1 2737 $agpr0 = COPY %6 2738 S_SETPC_B64 undef $sgpr30_sgpr31 2739 2740... 2741