2017-04-18 06:22:38 +08:00
|
|
|
# RUN: llc -mtriple=x86_64-linux -run-pass=block-placement -o - %s | FileCheck %s
|
|
|
|
|
|
|
|
---
|
|
|
|
# check loop bb.7 is not merged with bb.10, bb.13
|
|
|
|
# check loop bb.9 is not merged with bb.12
|
|
|
|
# CHECK: bb.2:
|
2017-08-23 11:49:53 +08:00
|
|
|
# CHECK-NEXT: successors: %bb.3(0x30000000), %bb.4(0x50000000)
|
2018-02-01 06:04:26 +08:00
|
|
|
# CHECK: $rax = MOV64rm $r14, 1, $noreg, 0, $noreg
|
|
|
|
# CHECK-NEXT: TEST64rr $rax, $rax
|
2017-08-23 11:49:53 +08:00
|
|
|
# CHECK-NEXT: JE_1 %bb.3
|
2017-04-18 06:22:38 +08:00
|
|
|
# CHECK: bb.4:
|
2017-08-23 11:49:53 +08:00
|
|
|
# CHECK-NEXT: successors: %bb.5(0x30000000), %bb.10(0x50000000)
|
2018-02-01 06:04:26 +08:00
|
|
|
# CHECK: CMP64mi8 killed $rax, 1, $noreg, 8, $noreg, 0
|
2017-08-23 11:49:53 +08:00
|
|
|
# CHECK-NEXT: JNE_1 %bb.10
|
|
|
|
# CHECK: bb.5:
|
|
|
|
# CHECK-NEXT: successors: %bb.6(0x30000000), %bb.7(0x50000000)
|
2018-02-01 06:04:26 +08:00
|
|
|
# CHECK: $rax = MOV64rm $r14, 1, $noreg, 0, $noreg
|
|
|
|
# CHECK-NEXT: TEST64rr $rax, $rax
|
2017-08-23 11:49:53 +08:00
|
|
|
# CHECK-NEXT: JE_1 %bb.6
|
|
|
|
# CHECK: bb.7
|
|
|
|
# CHECK-NEXT: successors: %bb.8(0x71555555), %bb.10(0x0eaaaaab)
|
2018-02-01 06:04:26 +08:00
|
|
|
# CHECK: CMP64mi8 killed $rax, 1, $noreg, 8, $noreg, 0
|
2017-08-23 11:49:53 +08:00
|
|
|
# CHECK-NEXT: JNE_1 %bb.10
|
|
|
|
# CHECK: bb.8:
|
|
|
|
# CHECK-NEXT: successors: %bb.9(0x04000000), %bb.7(0x7c000000)
|
2018-02-01 06:04:26 +08:00
|
|
|
# CHECK: $rax = MOV64rm $r14, 1, $noreg, 0, $noreg
|
|
|
|
# CHECK-NEXT: TEST64rr $rax, $rax
|
2017-08-23 11:49:53 +08:00
|
|
|
# CHECK-NEXT: JNE_1 %bb.7
|
2017-04-18 06:22:38 +08:00
|
|
|
|
|
|
|
name: foo
|
|
|
|
body: |
|
|
|
|
bb.0:
|
|
|
|
successors: %bb.1(0x40000000), %bb.7(0x40000000)
|
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
TEST8ri $dl, 1, implicit-def $eflags, implicit killed $edx
|
|
|
|
JE_1 %bb.7, implicit $eflags
|
2017-04-18 06:22:38 +08:00
|
|
|
|
|
|
|
bb.1:
|
|
|
|
successors: %bb.16(0x80000000)
|
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
$ebp = XOR32rr undef $ebp, undef $ebp, implicit-def dead $eflags
|
2017-04-18 06:22:38 +08:00
|
|
|
JMP_1 %bb.16
|
|
|
|
|
|
|
|
bb.7:
|
|
|
|
successors: %bb.8(0x30000000), %bb.9(0x50000000)
|
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
$rax = MOV64rm $r14, 1, $noreg, 0, $noreg :: (load 8)
|
|
|
|
TEST64rr $rax, $rax, implicit-def $eflags
|
|
|
|
JNE_1 %bb.9, implicit killed $eflags
|
2017-04-18 06:22:38 +08:00
|
|
|
|
|
|
|
bb.8:
|
|
|
|
successors: %bb.16(0x80000000)
|
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
$ebp = XOR32rr undef $ebp, undef $ebp, implicit-def dead $eflags
|
2017-04-18 06:22:38 +08:00
|
|
|
JMP_1 %bb.16
|
|
|
|
|
|
|
|
bb.9:
|
|
|
|
successors: %bb.10(0x30000000), %bb.15(0x50000000)
|
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
CMP64mi8 killed $rax, 1, $noreg, 8, $noreg, 0, implicit-def $eflags :: (load 8)
|
|
|
|
JNE_1 %bb.15, implicit $eflags
|
2017-04-18 06:22:38 +08:00
|
|
|
|
|
|
|
bb.10:
|
|
|
|
successors: %bb.11(0x30000000), %bb.12(0x50000000)
|
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
$rax = MOV64rm $r14, 1, $noreg, 0, $noreg :: (load 8)
|
|
|
|
TEST64rr $rax, $rax, implicit-def $eflags
|
|
|
|
JNE_1 %bb.12, implicit $eflags
|
2017-04-18 06:22:38 +08:00
|
|
|
|
|
|
|
bb.11:
|
|
|
|
successors: %bb.16(0x80000000)
|
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
$ebp = XOR32rr undef $ebp, undef $ebp, implicit-def dead $eflags
|
2017-04-18 06:22:38 +08:00
|
|
|
JMP_1 %bb.16
|
|
|
|
|
|
|
|
bb.12:
|
|
|
|
successors: %bb.13(0x71555555), %bb.15(0x0eaaaaab)
|
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
CMP64mi8 killed $rax, 1, $noreg, 8, $noreg, 0, implicit-def $eflags :: (load 8), (load 8)
|
|
|
|
JNE_1 %bb.15, implicit $eflags
|
2017-04-18 06:22:38 +08:00
|
|
|
|
|
|
|
bb.13:
|
|
|
|
successors: %bb.14(0x04000000), %bb.12(0x7c000000)
|
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
$rax = MOV64rm $r14, 1, $noreg, 0, $noreg :: (load 8)
|
|
|
|
TEST64rr $rax, $rax, implicit-def $eflags
|
|
|
|
JNE_1 %bb.12, implicit $eflags
|
2017-04-18 06:22:38 +08:00
|
|
|
|
|
|
|
bb.14:
|
|
|
|
successors: %bb.16(0x80000000)
|
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
$ebp = XOR32rr undef $ebp, undef $ebp, implicit-def dead $eflags
|
2017-04-18 06:22:38 +08:00
|
|
|
JMP_1 %bb.16
|
|
|
|
|
|
|
|
bb.15:
|
|
|
|
successors: %bb.16(0x80000000)
|
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
$ebp = XOR32rr undef $ebp, undef $ebp, implicit-def dead $eflags
|
|
|
|
dead $eax = XOR32rr undef $eax, undef $eax, implicit-def dead $eflags, implicit-def $al
|
2017-04-18 06:22:38 +08:00
|
|
|
|
|
|
|
bb.16:
|
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
RETQ $eax
|
2017-04-18 06:22:38 +08:00
|
|
|
|
|
|
|
...
|