brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · 672df28 Raw
110 lines · plain
1# RUN: llc -o - %s -mtriple=x86_64-- -run-pass=branch-folder | FileCheck %s2# 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 is5# different with Codegen without -g.6#7# Generated with8#9# clang++ -g -w -O1 -S -emit-llvm test.cc10# llc -stop-before=branch-folder test.ll11#12# template <typename, typename = int> class e;13# class allocator {14# public:15#   ~allocator();16# };17# template <typename, typename> class e {18# public:19#   e(char *, allocator = allocator());20# };21# template <typename b, typename c, typename d> bool operator==(e<c, d>, b);22# class f {23# public:24#   f(int *, int *, int *, int, int, int, int);25#   e<char> g();26#   void j();27# };28# int h, i;29# class k {30#   void l();31#   bool m_fn4();32#   int m;33#   int n;34#   int q;35#   int fmap;36# };37# void k::l() {38#   e<char> o = "";39#   for (;;) {40#     int p = 0;41#     for (;;) {42#       if (m_fn4())43#         break;44#       f a(&q, &fmap, &m, n, h, i, 0);45#       if (a.g() == "")46#         a.j();47#     }48#   }49# }50 51--- |52 53  define dso_local void @l() {54    ret void55  }56 57...58---59name:            l60body:             |61  bb.0:62    ; CHECK: bb.0:63    ; CHECK-NEXT: successors: %bb.1({{.*}}), %bb.764    successors: %bb.1, %bb.365 66  bb.1:67    $rdi = MOV64rr $rsp68 69  bb.2:70    ; CHECK: bb.2:71    ; CHECK-NEXT: successors: %bb.372    successors: %bb.2, %bb.473    DBG_VALUE74    CFI_INSTRUCTION def_cfa_offset 875    ; CHECK: bb.376    ; CHECK-NEXT: successors: %bb.2({{.*}}), %bb.477    TEST8rr killed renamable $al, renamable $al, implicit-def $eflags78    JCC_1 %bb.2, 5, implicit killed $eflags79    JMP_1 %bb.480 81  bb.3 (landing-pad):82    ; CHECK: bb.4:83    ; CHECK-NEXT: successors: %bb.5({{.*}}), %bb.684    successors:85 86  bb.4:87    successors: %bb.5, %bb.688    JCC_1 %bb.6, 4, implicit killed $eflags89    ; CHECK: JCC_1 %bb.6, 4, implicit $eflags90    JMP_1 %bb.591 92  bb.5:93    ; CHECK: bb.5:94    ; CHECK-NEXT: successors: %bb.695    $rdi = COPY renamable $r1296 97  bb.6:98    ; CHECK: bb.6:99    ; CHECK-NEXT: successors: %bb.3100    successors: %bb.2, %bb.4101    ; CHECK: JMP_1 %bb.3102 103  ; CHECK: bb.7 (landing-pad):104    $rdi = COPY renamable $rbx105    TEST8rr killed renamable $al, renamable $al, implicit-def $eflags106    JCC_1 %bb.2, 5, implicit killed $eflags107    JMP_1 %bb.4108 109...110