1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=x86_64-linux -run-pass=block-placement -o - %s | FileCheck %s
5 # check loop bb.7 is not merged with bb.10, bb.13
6 # check loop bb.9 is not merged with bb.12
10 ; CHECK-LABEL: name: foo
12 ; CHECK: successors: %bb.1(0x40000000), %bb.2(0x40000000)
13 ; CHECK: TEST8ri $dl, 1, implicit-def $eflags, implicit killed $edx
14 ; CHECK: JCC_1 %bb.1, 5, implicit $eflags
16 ; CHECK: successors: %bb.1(0x30000000), %bb.3(0x50000000)
17 ; CHECK: $rax = MOV64rm $r14, 1, $noreg, 0, $noreg :: (load 8)
18 ; CHECK: TEST64rr $rax, $rax, implicit-def $eflags
19 ; CHECK: JCC_1 %bb.1, 4, implicit $eflags
21 ; CHECK: successors: %bb.4(0x30000000), %bb.8(0x50000000)
22 ; CHECK: CMP64mi8 killed $rax, 1, $noreg, 8, $noreg, 0, implicit-def $eflags :: (load 8)
23 ; CHECK: JCC_1 %bb.8, 5, implicit $eflags
25 ; CHECK: successors: %bb.1(0x30000000), %bb.5(0x50000000)
26 ; CHECK: $rax = MOV64rm $r14, 1, $noreg, 0, $noreg :: (load 8)
27 ; CHECK: TEST64rr $rax, $rax, implicit-def $eflags
28 ; CHECK: JCC_1 %bb.1, 4, implicit $eflags
29 ; CHECK: bb.5 (align 4):
30 ; CHECK: successors: %bb.6(0x71555555), %bb.8(0x0eaaaaab)
31 ; CHECK: CMP64mi8 killed $rax, 1, $noreg, 8, $noreg, 0, implicit-def $eflags :: (load 8), (load 8)
32 ; CHECK: JCC_1 %bb.8, 5, implicit $eflags
34 ; CHECK: successors: %bb.1(0x04000000), %bb.5(0x7c000000)
35 ; CHECK: $rax = MOV64rm $r14, 1, $noreg, 0, $noreg :: (load 8)
36 ; CHECK: TEST64rr $rax, $rax, implicit-def $eflags
37 ; CHECK: JCC_1 %bb.5, 5, implicit $eflags
39 ; CHECK: $ebp = XOR32rr undef $ebp, undef $ebp, implicit-def dead $eflags
42 ; CHECK: $ebp = XOR32rr undef $ebp, undef $ebp, implicit-def dead $eflags
43 ; CHECK: dead $eax = XOR32rr undef $eax, undef $eax, implicit-def dead $eflags, implicit-def $al
46 successors: %bb.1(0x40000000), %bb.7(0x40000000)
48 TEST8ri $dl, 1, implicit-def $eflags, implicit killed $edx
49 JCC_1 %bb.7, 4, implicit $eflags
52 successors: %bb.16(0x80000000)
54 $ebp = XOR32rr undef $ebp, undef $ebp, implicit-def dead $eflags
58 successors: %bb.8(0x30000000), %bb.9(0x50000000)
60 $rax = MOV64rm $r14, 1, $noreg, 0, $noreg :: (load 8)
61 TEST64rr $rax, $rax, implicit-def $eflags
62 JCC_1 %bb.9, 5, implicit killed $eflags
65 successors: %bb.16(0x80000000)
67 $ebp = XOR32rr undef $ebp, undef $ebp, implicit-def dead $eflags
71 successors: %bb.10(0x30000000), %bb.15(0x50000000)
73 CMP64mi8 killed $rax, 1, $noreg, 8, $noreg, 0, implicit-def $eflags :: (load 8)
74 JCC_1 %bb.15, 5, implicit $eflags
77 successors: %bb.11(0x30000000), %bb.12(0x50000000)
79 $rax = MOV64rm $r14, 1, $noreg, 0, $noreg :: (load 8)
80 TEST64rr $rax, $rax, implicit-def $eflags
81 JCC_1 %bb.12, 5, implicit $eflags
84 successors: %bb.16(0x80000000)
86 $ebp = XOR32rr undef $ebp, undef $ebp, implicit-def dead $eflags
90 successors: %bb.13(0x71555555), %bb.15(0x0eaaaaab)
92 CMP64mi8 killed $rax, 1, $noreg, 8, $noreg, 0, implicit-def $eflags :: (load 8), (load 8)
93 JCC_1 %bb.15, 5, implicit $eflags
96 successors: %bb.14(0x04000000), %bb.12(0x7c000000)
98 $rax = MOV64rm $r14, 1, $noreg, 0, $noreg :: (load 8)
99 TEST64rr $rax, $rax, implicit-def $eflags
100 JCC_1 %bb.12, 5, implicit $eflags
103 successors: %bb.16(0x80000000)
105 $ebp = XOR32rr undef $ebp, undef $ebp, implicit-def dead $eflags
109 successors: %bb.16(0x80000000)
111 $ebp = XOR32rr undef $ebp, undef $ebp, implicit-def dead $eflags
112 dead $eax = XOR32rr undef $eax, undef $eax, implicit-def dead $eflags, implicit-def $al