1 # RUN: llc -o - %s -mtriple=x86_64-- -run-pass=branch-folder | FileCheck %s
2 # Branch folder should ignore the DBG_VALUE between block bb.2 and bb.3,
3 # set these blocks as bb.3, so that bb.6 will succeed to merge between bb.2 and bb.3.
4 # if the DBG_VALUE is not ignored, bb.6 will merge between bb.1 and bb.2, the result is
5 # different with Codegen without -g.
9 # clang++ -g -w -O1 -S -emit-llvm test.cc
10 # llc -stop-before=branch-folder test.ll
12 # template <typename, typename = int> class e;
17 # template <typename, typename> class e {
19 # e(char *, allocator = allocator());
21 # template <typename b, typename c, typename d> bool operator==(e<c, d>, b);
24 # f(int *, int *, int *, int, int, int, int);
44 # f a(&q, &fmap, &m, n, h, i, 0);
53 define dso_local void @l() {
63 ; CHECK-NEXT: successors: %bb.1({{.*}}), %bb.7
64 successors: %bb.1, %bb.3
71 ; CHECK-NEXT: successors: %bb.3
72 successors: %bb.2, %bb.4
74 CFI_INSTRUCTION def_cfa_offset 8
76 ; CHECK-NEXT: successors: %bb.2({{.*}}), %bb.4
77 TEST8rr killed renamable $al, renamable $al, implicit-def $eflags
78 JCC_1 %bb.2, 5, implicit killed $eflags
83 ; CHECK-NEXT: successors: %bb.5({{.*}}), %bb.6
87 successors: %bb.5, %bb.6
88 JCC_1 %bb.6, 4, implicit killed $eflags
89 ; CHECK: JCC_1 %bb.6, 4, implicit $eflags
94 ; CHECK-NEXT: successors: %bb.6
95 $rdi = COPY renamable $r12
99 ; CHECK-NEXT: successors: %bb.3
100 successors: %bb.2, %bb.4
103 ; CHECK: bb.7 (landing-pad):
104 $rdi = COPY renamable $rbx
105 TEST8rr killed renamable $al, renamable $al, implicit-def $eflags
106 JCC_1 %bb.2, 5, implicit killed $eflags