1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -mtriple=x86_64-linux-gnu -run-pass=legalizer %s -o - | FileCheck %s --check-prefix=ALL 3 4--- | 5 6 define zeroext i1 @test_i1(i32 %a, i1 zeroext %f, i1 zeroext %t) { 7 entry: 8 %cmp = icmp sgt i32 %a, 0 9 br i1 %cmp, label %cond.true, label %cond.false 10 11 cond.true: ; preds = %entry 12 br label %cond.end 13 14 cond.false: ; preds = %entry 15 br label %cond.end 16 17 cond.end: ; preds = %cond.false, %cond.true 18 %cond = phi i1 [ %f, %cond.true ], [ %t, %cond.false ] 19 ret i1 %cond 20 } 21 22 define i8 @test_i8(i32 %a, i8 %f, i8 %t) { 23 entry: 24 %cmp = icmp sgt i32 %a, 0 25 br i1 %cmp, label %cond.true, label %cond.false 26 27 cond.true: ; preds = %entry 28 br label %cond.end 29 30 cond.false: ; preds = %entry 31 br label %cond.end 32 33 cond.end: ; preds = %cond.false, %cond.true 34 %cond = phi i8 [ %f, %cond.true ], [ %t, %cond.false ] 35 ret i8 %cond 36 } 37 38 define i16 @test_i16(i32 %a, i16 %f, i16 %t) { 39 entry: 40 %cmp = icmp sgt i32 %a, 0 41 br i1 %cmp, label %cond.true, label %cond.false 42 43 cond.true: ; preds = %entry 44 br label %cond.end 45 46 cond.false: ; preds = %entry 47 br label %cond.end 48 49 cond.end: ; preds = %cond.false, %cond.true 50 %cond = phi i16 [ %f, %cond.true ], [ %t, %cond.false ] 51 ret i16 %cond 52 } 53 54 define i32 @test_i32(i32 %a, i32 %f, i32 %t) { 55 entry: 56 %cmp = icmp sgt i32 %a, 0 57 br i1 %cmp, label %cond.true, label %cond.false 58 59 cond.true: ; preds = %entry 60 br label %cond.end 61 62 cond.false: ; preds = %entry 63 br label %cond.end 64 65 cond.end: ; preds = %cond.false, %cond.true 66 %cond = phi i32 [ %f, %cond.true ], [ %t, %cond.false ] 67 ret i32 %cond 68 } 69 70 define i64 @test_i64(i32 %a, i64 %f, i64 %t) { 71 entry: 72 %cmp = icmp sgt i32 %a, 0 73 br i1 %cmp, label %cond.true, label %cond.false 74 75 cond.true: ; preds = %entry 76 br label %cond.end 77 78 cond.false: ; preds = %entry 79 br label %cond.end 80 81 cond.end: ; preds = %cond.false, %cond.true 82 %cond = phi i64 [ %f, %cond.true ], [ %t, %cond.false ] 83 ret i64 %cond 84 } 85 86 define float @test_float(i32 %a, float %f, float %t) { 87 entry: 88 %cmp = icmp sgt i32 %a, 0 89 br i1 %cmp, label %cond.true, label %cond.false 90 91 cond.true: ; preds = %entry 92 br label %cond.end 93 94 cond.false: ; preds = %entry 95 br label %cond.end 96 97 cond.end: ; preds = %cond.false, %cond.true 98 %cond = phi float [ %f, %cond.true ], [ %t, %cond.false ] 99 ret float %cond 100 } 101 102 define double @test_double(i32 %a, double %f, double %t) { 103 entry: 104 %cmp = icmp sgt i32 %a, 0 105 br i1 %cmp, label %cond.true, label %cond.false 106 107 cond.true: ; preds = %entry 108 br label %cond.end 109 110 cond.false: ; preds = %entry 111 br label %cond.end 112 113 cond.end: ; preds = %cond.false, %cond.true 114 %cond = phi double [ %f, %cond.true ], [ %t, %cond.false ] 115 ret double %cond 116 } 117 118... 119--- 120name: test_i1 121alignment: 16 122legalized: false 123regBankSelected: false 124tracksRegLiveness: true 125registers: 126 - { id: 0, class: _, preferred-register: '' } 127 - { id: 1, class: _, preferred-register: '' } 128 - { id: 2, class: _, preferred-register: '' } 129 - { id: 3, class: _, preferred-register: '' } 130 - { id: 4, class: _, preferred-register: '' } 131 - { id: 5, class: _, preferred-register: '' } 132 - { id: 6, class: _, preferred-register: '' } 133 - { id: 7, class: _, preferred-register: '' } 134 - { id: 8, class: _, preferred-register: '' } 135liveins: 136fixedStack: 137stack: 138constants: 139 140 141 142 143body: | 144 ; ALL-LABEL: name: test_i1 145 ; ALL: bb.0.entry: 146 ; ALL: successors: %bb.2(0x40000000), %bb.1(0x40000000) 147 ; ALL: liveins: $edi, $edx, $esi 148 ; ALL: [[COPY:%[0-9]+]]:_(s32) = COPY $edi 149 ; ALL: [[COPY1:%[0-9]+]]:_(s32) = COPY $esi 150 ; ALL: [[COPY2:%[0-9]+]]:_(s32) = COPY $edx 151 ; ALL: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 152 ; ALL: [[ICMP:%[0-9]+]]:_(s8) = G_ICMP intpred(sgt), [[COPY]](s32), [[C]] 153 ; ALL: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s8) 154 ; ALL: [[TRUNC1:%[0-9]+]]:_(s8) = G_TRUNC [[COPY1]](s32) 155 ; ALL: G_BRCOND [[TRUNC]](s1), %bb.2 156 ; ALL: bb.1.cond.false: 157 ; ALL: successors: %bb.2(0x80000000) 158 ; ALL: [[TRUNC2:%[0-9]+]]:_(s8) = G_TRUNC [[COPY2]](s32) 159 ; ALL: bb.2.cond.end: 160 ; ALL: [[PHI:%[0-9]+]]:_(s8) = G_PHI [[TRUNC2]](s8), %bb.1, [[TRUNC1]](s8), %bb.0 161 ; ALL: [[COPY3:%[0-9]+]]:_(s8) = COPY [[PHI]](s8) 162 ; ALL: $al = COPY [[COPY3]](s8) 163 ; ALL: RET 0, implicit $al 164 bb.1.entry: 165 successors: %bb.3(0x40000000), %bb.2(0x40000000) 166 liveins: $edi, $edx, $esi 167 168 %0:_(s32) = COPY $edi 169 %3:_(s32) = COPY $esi 170 %1:_(s1) = G_TRUNC %3(s32) 171 %4:_(s32) = COPY $edx 172 %2:_(s1) = G_TRUNC %4(s32) 173 %5:_(s32) = G_CONSTANT i32 0 174 %6:_(s1) = G_ICMP intpred(sgt), %0(s32), %5 175 G_BRCOND %6(s1), %bb.3 176 177 bb.2.cond.false: 178 successors: %bb.3(0x80000000) 179 180 181 bb.3.cond.end: 182 %7:_(s1) = G_PHI %2(s1), %bb.2, %1(s1), %bb.1 183 %8:_(s8) = G_ANYEXT %7(s1) 184 $al = COPY %8(s8) 185 RET 0, implicit $al 186 187... 188--- 189name: test_i8 190alignment: 16 191legalized: false 192regBankSelected: false 193tracksRegLiveness: true 194registers: 195 - { id: 0, class: _, preferred-register: '' } 196 - { id: 1, class: _, preferred-register: '' } 197 - { id: 2, class: _, preferred-register: '' } 198 - { id: 3, class: _, preferred-register: '' } 199 - { id: 4, class: _, preferred-register: '' } 200 - { id: 5, class: _, preferred-register: '' } 201 - { id: 6, class: _, preferred-register: '' } 202 - { id: 7, class: _, preferred-register: '' } 203liveins: 204fixedStack: 205stack: 206constants: 207 208 209 210body: | 211 ; ALL-LABEL: name: test_i8 212 ; ALL: bb.0.entry: 213 ; ALL: successors: %bb.2(0x40000000), %bb.1(0x40000000) 214 ; ALL: liveins: $edi, $edx, $esi 215 ; ALL: [[COPY:%[0-9]+]]:_(s32) = COPY $edi 216 ; ALL: [[COPY1:%[0-9]+]]:_(s32) = COPY $esi 217 ; ALL: [[TRUNC:%[0-9]+]]:_(s8) = G_TRUNC [[COPY1]](s32) 218 ; ALL: [[COPY2:%[0-9]+]]:_(s32) = COPY $edx 219 ; ALL: [[TRUNC1:%[0-9]+]]:_(s8) = G_TRUNC [[COPY2]](s32) 220 ; ALL: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 221 ; ALL: [[ICMP:%[0-9]+]]:_(s8) = G_ICMP intpred(sgt), [[COPY]](s32), [[C]] 222 ; ALL: [[TRUNC2:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s8) 223 ; ALL: G_BRCOND [[TRUNC2]](s1), %bb.2 224 ; ALL: bb.1.cond.false: 225 ; ALL: successors: %bb.2(0x80000000) 226 ; ALL: bb.2.cond.end: 227 ; ALL: [[PHI:%[0-9]+]]:_(s8) = G_PHI [[TRUNC1]](s8), %bb.1, [[TRUNC]](s8), %bb.0 228 ; ALL: $al = COPY [[PHI]](s8) 229 ; ALL: RET 0, implicit $al 230 bb.1.entry: 231 successors: %bb.3(0x40000000), %bb.2(0x40000000) 232 liveins: $edi, $edx, $esi 233 234 %0:_(s32) = COPY $edi 235 %3:_(s32) = COPY $esi 236 %1:_(s8) = G_TRUNC %3(s32) 237 %4:_(s32) = COPY $edx 238 %2:_(s8) = G_TRUNC %4(s32) 239 %5:_(s32) = G_CONSTANT i32 0 240 %6:_(s1) = G_ICMP intpred(sgt), %0(s32), %5 241 G_BRCOND %6(s1), %bb.3 242 243 bb.2.cond.false: 244 successors: %bb.3(0x80000000) 245 246 247 bb.3.cond.end: 248 %7:_(s8) = G_PHI %2(s8), %bb.2, %1(s8), %bb.1 249 $al = COPY %7(s8) 250 RET 0, implicit $al 251 252... 253--- 254name: test_i16 255alignment: 16 256legalized: false 257regBankSelected: false 258tracksRegLiveness: true 259registers: 260 - { id: 0, class: _, preferred-register: '' } 261 - { id: 1, class: _, preferred-register: '' } 262 - { id: 2, class: _, preferred-register: '' } 263 - { id: 3, class: _, preferred-register: '' } 264 - { id: 4, class: _, preferred-register: '' } 265 - { id: 5, class: _, preferred-register: '' } 266 - { id: 6, class: _, preferred-register: '' } 267 - { id: 7, class: _, preferred-register: '' } 268liveins: 269fixedStack: 270stack: 271constants: 272 273 274 275body: | 276 ; ALL-LABEL: name: test_i16 277 ; ALL: bb.0.entry: 278 ; ALL: successors: %bb.2(0x40000000), %bb.1(0x40000000) 279 ; ALL: liveins: $edi, $edx, $esi 280 ; ALL: [[COPY:%[0-9]+]]:_(s32) = COPY $edi 281 ; ALL: [[COPY1:%[0-9]+]]:_(s32) = COPY $esi 282 ; ALL: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32) 283 ; ALL: [[COPY2:%[0-9]+]]:_(s32) = COPY $edx 284 ; ALL: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[COPY2]](s32) 285 ; ALL: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 286 ; ALL: [[ICMP:%[0-9]+]]:_(s8) = G_ICMP intpred(sgt), [[COPY]](s32), [[C]] 287 ; ALL: [[TRUNC2:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s8) 288 ; ALL: G_BRCOND [[TRUNC2]](s1), %bb.2 289 ; ALL: bb.1.cond.false: 290 ; ALL: successors: %bb.2(0x80000000) 291 ; ALL: bb.2.cond.end: 292 ; ALL: [[PHI:%[0-9]+]]:_(s16) = G_PHI [[TRUNC1]](s16), %bb.1, [[TRUNC]](s16), %bb.0 293 ; ALL: $ax = COPY [[PHI]](s16) 294 ; ALL: RET 0, implicit $ax 295 bb.1.entry: 296 successors: %bb.3(0x40000000), %bb.2(0x40000000) 297 liveins: $edi, $edx, $esi 298 299 %0:_(s32) = COPY $edi 300 %3:_(s32) = COPY $esi 301 %1:_(s16) = G_TRUNC %3(s32) 302 %4:_(s32) = COPY $edx 303 %2:_(s16) = G_TRUNC %4(s32) 304 %5:_(s32) = G_CONSTANT i32 0 305 %6:_(s1) = G_ICMP intpred(sgt), %0(s32), %5 306 G_BRCOND %6(s1), %bb.3 307 308 bb.2.cond.false: 309 successors: %bb.3(0x80000000) 310 311 312 bb.3.cond.end: 313 %7:_(s16) = G_PHI %2(s16), %bb.2, %1(s16), %bb.1 314 $ax = COPY %7(s16) 315 RET 0, implicit $ax 316 317... 318--- 319name: test_i32 320alignment: 16 321legalized: false 322regBankSelected: false 323tracksRegLiveness: true 324registers: 325 - { id: 0, class: _, preferred-register: '' } 326 - { id: 1, class: _, preferred-register: '' } 327 - { id: 2, class: _, preferred-register: '' } 328 - { id: 3, class: _, preferred-register: '' } 329 - { id: 4, class: _, preferred-register: '' } 330 - { id: 5, class: _, preferred-register: '' } 331liveins: 332fixedStack: 333stack: 334constants: 335 336 337 338body: | 339 ; ALL-LABEL: name: test_i32 340 ; ALL: bb.0.entry: 341 ; ALL: successors: %bb.1(0x40000000), %bb.2(0x40000000) 342 ; ALL: liveins: $edi, $edx, $esi 343 ; ALL: [[COPY:%[0-9]+]]:_(s32) = COPY $edi 344 ; ALL: [[COPY1:%[0-9]+]]:_(s32) = COPY $esi 345 ; ALL: [[COPY2:%[0-9]+]]:_(s32) = COPY $edx 346 ; ALL: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 347 ; ALL: [[ICMP:%[0-9]+]]:_(s8) = G_ICMP intpred(sgt), [[COPY]](s32), [[C]] 348 ; ALL: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s8) 349 ; ALL: G_BRCOND [[TRUNC]](s1), %bb.1 350 ; ALL: G_BR %bb.2 351 ; ALL: bb.1.cond.true: 352 ; ALL: successors: %bb.3(0x80000000) 353 ; ALL: G_BR %bb.3 354 ; ALL: bb.2.cond.false: 355 ; ALL: successors: %bb.3(0x80000000) 356 ; ALL: bb.3.cond.end: 357 ; ALL: [[PHI:%[0-9]+]]:_(s32) = G_PHI [[COPY1]](s32), %bb.1, [[COPY2]](s32), %bb.2 358 ; ALL: $eax = COPY [[PHI]](s32) 359 ; ALL: RET 0, implicit $eax 360 bb.1.entry: 361 successors: %bb.2(0x40000000), %bb.3(0x40000000) 362 liveins: $edi, $edx, $esi 363 364 %0(s32) = COPY $edi 365 %1(s32) = COPY $esi 366 %2(s32) = COPY $edx 367 %3(s32) = G_CONSTANT i32 0 368 %4(s1) = G_ICMP intpred(sgt), %0(s32), %3 369 G_BRCOND %4(s1), %bb.2 370 G_BR %bb.3 371 372 bb.2.cond.true: 373 successors: %bb.4(0x80000000) 374 375 G_BR %bb.4 376 377 bb.3.cond.false: 378 successors: %bb.4(0x80000000) 379 380 381 bb.4.cond.end: 382 %5(s32) = G_PHI %1(s32), %bb.2, %2(s32), %bb.3 383 $eax = COPY %5(s32) 384 RET 0, implicit $eax 385 386... 387--- 388name: test_i64 389alignment: 16 390legalized: false 391regBankSelected: false 392tracksRegLiveness: true 393registers: 394 - { id: 0, class: _, preferred-register: '' } 395 - { id: 1, class: _, preferred-register: '' } 396 - { id: 2, class: _, preferred-register: '' } 397 - { id: 3, class: _, preferred-register: '' } 398 - { id: 4, class: _, preferred-register: '' } 399 - { id: 5, class: _, preferred-register: '' } 400liveins: 401fixedStack: 402stack: 403constants: 404 405 406 407body: | 408 ; ALL-LABEL: name: test_i64 409 ; ALL: bb.0.entry: 410 ; ALL: successors: %bb.1(0x40000000), %bb.2(0x40000000) 411 ; ALL: liveins: $edi, $rdx, $rsi 412 ; ALL: [[COPY:%[0-9]+]]:_(s32) = COPY $edi 413 ; ALL: [[COPY1:%[0-9]+]]:_(s64) = COPY $rsi 414 ; ALL: [[COPY2:%[0-9]+]]:_(s64) = COPY $rdx 415 ; ALL: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 416 ; ALL: [[ICMP:%[0-9]+]]:_(s8) = G_ICMP intpred(sgt), [[COPY]](s32), [[C]] 417 ; ALL: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s8) 418 ; ALL: G_BRCOND [[TRUNC]](s1), %bb.1 419 ; ALL: G_BR %bb.2 420 ; ALL: bb.1.cond.true: 421 ; ALL: successors: %bb.3(0x80000000) 422 ; ALL: G_BR %bb.3 423 ; ALL: bb.2.cond.false: 424 ; ALL: successors: %bb.3(0x80000000) 425 ; ALL: bb.3.cond.end: 426 ; ALL: [[PHI:%[0-9]+]]:_(s64) = G_PHI [[COPY1]](s64), %bb.1, [[COPY2]](s64), %bb.2 427 ; ALL: $rax = COPY [[PHI]](s64) 428 ; ALL: RET 0, implicit $rax 429 bb.1.entry: 430 successors: %bb.2(0x40000000), %bb.3(0x40000000) 431 liveins: $edi, $rdx, $rsi 432 433 %0(s32) = COPY $edi 434 %1(s64) = COPY $rsi 435 %2(s64) = COPY $rdx 436 %3(s32) = G_CONSTANT i32 0 437 %4(s1) = G_ICMP intpred(sgt), %0(s32), %3 438 G_BRCOND %4(s1), %bb.2 439 G_BR %bb.3 440 441 bb.2.cond.true: 442 successors: %bb.4(0x80000000) 443 444 G_BR %bb.4 445 446 bb.3.cond.false: 447 successors: %bb.4(0x80000000) 448 449 450 bb.4.cond.end: 451 %5(s64) = G_PHI %1(s64), %bb.2, %2(s64), %bb.3 452 $rax = COPY %5(s64) 453 RET 0, implicit $rax 454 455... 456--- 457name: test_float 458alignment: 16 459legalized: false 460regBankSelected: false 461tracksRegLiveness: true 462registers: 463 - { id: 0, class: _, preferred-register: '' } 464 - { id: 1, class: _, preferred-register: '' } 465 - { id: 2, class: _, preferred-register: '' } 466 - { id: 3, class: _, preferred-register: '' } 467 - { id: 4, class: _, preferred-register: '' } 468 - { id: 5, class: _, preferred-register: '' } 469 - { id: 6, class: _, preferred-register: '' } 470 - { id: 7, class: _, preferred-register: '' } 471 - { id: 8, class: _, preferred-register: '' } 472liveins: 473fixedStack: 474stack: 475constants: 476 477 478 479body: | 480 ; ALL-LABEL: name: test_float 481 ; ALL: bb.0.entry: 482 ; ALL: successors: %bb.2(0x40000000), %bb.1(0x40000000) 483 ; ALL: liveins: $edi, $xmm0, $xmm1 484 ; ALL: [[COPY:%[0-9]+]]:_(s32) = COPY $edi 485 ; ALL: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm0 486 ; ALL: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128) 487 ; ALL: [[COPY2:%[0-9]+]]:_(s128) = COPY $xmm1 488 ; ALL: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY2]](s128) 489 ; ALL: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 490 ; ALL: [[ICMP:%[0-9]+]]:_(s8) = G_ICMP intpred(sgt), [[COPY]](s32), [[C]] 491 ; ALL: [[TRUNC2:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s8) 492 ; ALL: G_BRCOND [[TRUNC2]](s1), %bb.2 493 ; ALL: bb.1.cond.false: 494 ; ALL: successors: %bb.2(0x80000000) 495 ; ALL: bb.2.cond.end: 496 ; ALL: [[PHI:%[0-9]+]]:_(s32) = G_PHI [[TRUNC1]](s32), %bb.1, [[TRUNC]](s32), %bb.0 497 ; ALL: [[ANYEXT:%[0-9]+]]:_(s128) = G_ANYEXT [[PHI]](s32) 498 ; ALL: $xmm0 = COPY [[ANYEXT]](s128) 499 ; ALL: RET 0, implicit $xmm0 500 bb.1.entry: 501 successors: %bb.3(0x40000000), %bb.2(0x40000000) 502 liveins: $edi, $xmm0, $xmm1 503 504 %0:_(s32) = COPY $edi 505 %3:_(s128) = COPY $xmm0 506 %1:_(s32) = G_TRUNC %3(s128) 507 %4:_(s128) = COPY $xmm1 508 %2:_(s32) = G_TRUNC %4(s128) 509 %5:_(s32) = G_CONSTANT i32 0 510 %6:_(s1) = G_ICMP intpred(sgt), %0(s32), %5 511 G_BRCOND %6(s1), %bb.3 512 513 bb.2.cond.false: 514 successors: %bb.3(0x80000000) 515 516 517 bb.3.cond.end: 518 %7:_(s32) = G_PHI %2(s32), %bb.2, %1(s32), %bb.1 519 %8:_(s128) = G_ANYEXT %7(s32) 520 $xmm0 = COPY %8(s128) 521 RET 0, implicit $xmm0 522 523... 524--- 525name: test_double 526alignment: 16 527legalized: false 528regBankSelected: false 529tracksRegLiveness: true 530registers: 531 - { id: 0, class: _, preferred-register: '' } 532 - { id: 1, class: _, preferred-register: '' } 533 - { id: 2, class: _, preferred-register: '' } 534 - { id: 3, class: _, preferred-register: '' } 535 - { id: 4, class: _, preferred-register: '' } 536 - { id: 5, class: _, preferred-register: '' } 537 - { id: 6, class: _, preferred-register: '' } 538 - { id: 7, class: _, preferred-register: '' } 539 - { id: 8, class: _, preferred-register: '' } 540liveins: 541fixedStack: 542stack: 543constants: 544 545 546 547body: | 548 ; ALL-LABEL: name: test_double 549 ; ALL: bb.0.entry: 550 ; ALL: successors: %bb.2(0x40000000), %bb.1(0x40000000) 551 ; ALL: liveins: $edi, $xmm0, $xmm1 552 ; ALL: [[COPY:%[0-9]+]]:_(s32) = COPY $edi 553 ; ALL: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm0 554 ; ALL: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128) 555 ; ALL: [[COPY2:%[0-9]+]]:_(s128) = COPY $xmm1 556 ; ALL: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY2]](s128) 557 ; ALL: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 558 ; ALL: [[ICMP:%[0-9]+]]:_(s8) = G_ICMP intpred(sgt), [[COPY]](s32), [[C]] 559 ; ALL: [[TRUNC2:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s8) 560 ; ALL: G_BRCOND [[TRUNC2]](s1), %bb.2 561 ; ALL: bb.1.cond.false: 562 ; ALL: successors: %bb.2(0x80000000) 563 ; ALL: bb.2.cond.end: 564 ; ALL: [[PHI:%[0-9]+]]:_(s64) = G_PHI [[TRUNC1]](s64), %bb.1, [[TRUNC]](s64), %bb.0 565 ; ALL: [[ANYEXT:%[0-9]+]]:_(s128) = G_ANYEXT [[PHI]](s64) 566 ; ALL: $xmm0 = COPY [[ANYEXT]](s128) 567 ; ALL: RET 0, implicit $xmm0 568 bb.1.entry: 569 successors: %bb.3(0x40000000), %bb.2(0x40000000) 570 liveins: $edi, $xmm0, $xmm1 571 572 %0:_(s32) = COPY $edi 573 %3:_(s128) = COPY $xmm0 574 %1:_(s64) = G_TRUNC %3(s128) 575 %4:_(s128) = COPY $xmm1 576 %2:_(s64) = G_TRUNC %4(s128) 577 %5:_(s32) = G_CONSTANT i32 0 578 %6:_(s1) = G_ICMP intpred(sgt), %0(s32), %5 579 G_BRCOND %6(s1), %bb.3 580 581 bb.2.cond.false: 582 successors: %bb.3(0x80000000) 583 584 585 bb.3.cond.end: 586 %7:_(s64) = G_PHI %2(s64), %bb.2, %1(s64), %bb.1 587 %8:_(s128) = G_ANYEXT %7(s64) 588 $xmm0 = COPY %8(s128) 589 RET 0, implicit $xmm0 590 591... 592