| 1 |
# RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -run-pass=if-converter %s -o - | FileCheck %s |
| 2 |
--- |
| 3 |
name: foo |
| 4 |
body: | |
| 5 |
bb.0: |
| 6 |
liveins: $x0, $x3 |
| 7 |
successors: %bb.1(0x40000000), %bb.2(0x40000000) |
| 8 |
|
| 9 |
dead renamable $x3 = ANDI8_rec killed renamable $x3, 1, implicit-def dead $cr0, implicit-def $cr0gt |
| 10 |
$cr2lt = CROR $cr0gt, $cr0gt |
| 11 |
BCn killed renamable $cr2lt, %bb.2 |
| 12 |
B %bb.1 |
| 13 |
|
| 14 |
bb.1: |
| 15 |
renamable $x3 = LIS8 4096 |
| 16 |
MTLR8 $x0, implicit-def $lr8 |
| 17 |
BLR8 implicit $lr8, implicit $rm, implicit $x3 |
| 18 |
|
| 19 |
bb.2: |
| 20 |
renamable $x3 = LIS8 4096 |
| 21 |
MTLR8 $x0, implicit-def $lr8 |
| 22 |
BLR8 implicit $lr8, implicit $rm, implicit $x3 |
| 23 |
... |
| 24 |
|
| 25 |
# Diamond testcase with equivalent branches terminating in returns. |
| 26 |
|
| 27 |
# CHECK: body: | |
| 28 |
# CHECK: bb.0: |
| 29 |
# CHECK: dead renamable $x3 = ANDI8_rec killed renamable $x3, 1, implicit-def dead $cr0, implicit-def $cr0gt |
| 30 |
# CHECK: $cr2lt = CROR $cr0gt, $cr0gt |
| 31 |
# CHECK: renamable $x3 = LIS8 4096 |
| 32 |
# CHECK: MTLR8 $x0, implicit-def $lr8 |
| 33 |
# CHECK: BLR8 implicit $lr8, implicit $rm, implicit $x3 |
| 34 |
|