brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.4 KiB · 8e4e786 Raw
153 lines · plain
1# REQUIRES: asserts2# RUN: llc -mtriple=x86_64-- -run-pass=greedy %s -debug-only=regalloc -huge-size-for-split=0 -o /dev/null 2>&1 | FileCheck %s3# RUN: llc -mtriple=x86_64-- -passes=greedy %s -debug-only=regalloc -huge-size-for-split=0 -o /dev/null 2>&1 | FileCheck %s4# Check no global region split is needed because the live range to split is trivially rematerializable.5# CHECK-NOT: Compact region bundles6--- |7  ; ModuleID = '<stdin>'8  source_filename = "2.cc"9  target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"10  target triple = "x86_64-unknown-linux-gnu"11  12  @m = local_unnamed_addr global i32 0, align 413  @.str = private unnamed_addr constant [4 x i8] c"abc\00", align 114  @.str.1 = private unnamed_addr constant [4 x i8] c"def\00", align 115  @.str.2 = private unnamed_addr constant [4 x i8] c"ghi\00", align 116  17  ; Function Attrs: uwtable18  define void @_Z3fooi(i32 %value) local_unnamed_addr #0 {19  entry:20    br label %do.body21  22  do.body:                                          ; preds = %do.cond, %entry23    tail call void asm sideeffect "", "~{r10},~{r11},~{r12},~{r13},~{r14},~{r15},~{dirflag},~{fpsr},~{flags}"() #2, !srcloc !324    switch i32 %value, label %do.cond [25      i32 0, label %sw.bb26      i32 1, label %sw.bb127      i32 2, label %sw.bb228    ]29  30  sw.bb:                                            ; preds = %do.body31    tail call void @_Z3gooPKc(ptr @.str)32    br label %sw.bb133  34  sw.bb1:                                           ; preds = %sw.bb, %do.body35    tail call void @_Z3gooPKc(ptr @.str.1)36    br label %sw.bb237  38  sw.bb2:                                           ; preds = %sw.bb1, %do.body39    tail call void @_Z3gooPKc(ptr @.str.2)40    br label %do.cond41  42  do.cond:                                          ; preds = %sw.bb2, %do.body43    %0 = load i32, ptr @m, align 4, !tbaa !444    %cmp = icmp eq i32 %0, 545    br i1 %cmp, label %do.end, label %do.body46  47  do.end:                                           ; preds = %do.cond48    ret void49  }50  51  declare void @_Z3gooPKc(ptr) local_unnamed_addr #152  53  ; Function Attrs: nounwind54  declare void @llvm.stackprotector(ptr, ptr) #255  56  attributes #0 = { uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "use-soft-float"="false" }57  attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "use-soft-float"="false" }58  attributes #2 = { nounwind }59  60  !llvm.module.flags = !{!0, !1}61  !llvm.ident = !{!2}62  63  !0 = !{i32 1, !"wchar_size", i32 4}64  !1 = !{i32 7, !"PIC Level", i32 2}65  !2 = !{!"clang version 7.0.0 (trunk 335057)"}66  !3 = !{i32 80}67  !4 = !{!5, !5, i64 0}68  !5 = !{!"int", !6, i64 0}69  !6 = !{!"omnipotent char", !7, i64 0}70  !7 = !{!"Simple C++ TBAA"}71 72...73---74name:            _Z3fooi75alignment:       1676tracksRegLiveness: true77registers:       78  - { id: 0, class: gr32 }79  - { id: 1, class: gr32 }80  - { id: 2, class: gr32 }81  - { id: 3, class: gr64 }82  - { id: 4, class: gr64 }83  - { id: 5, class: gr64 }84  - { id: 6, class: gr64 }85  - { id: 7, class: gr32 }86  - { id: 8, class: gr32 }87liveins:         88  - { reg: '$edi', virtual-reg: '%0' }89frameInfo:       90  adjustsStack:    true91  hasCalls:        true92body:             |93  bb.0.entry:94    liveins: $edi95  96    %0:gr32 = COPY $edi97    %5:gr64 = LEA64r $rip, 1, $noreg, @.str.2, $noreg98    %6:gr64 = MOV64rm $rip, 1, $noreg, target-flags(x86-gotpcrel) @m, $noreg :: (load (s64) from got)99    %4:gr64 = LEA64r $rip, 1, $noreg, @.str.1, $noreg100    %3:gr64 = LEA64r $rip, 1, $noreg, @.str, $noreg101  102  bb.1.do.body:103    successors: %bb.6(0x20000000), %bb.2(0x60000000)104  105    INLINEASM &"", 1, 12, implicit-def dead early-clobber $r10, 12, implicit-def dead early-clobber $r11, 12, implicit-def dead early-clobber $r12, 12, implicit-def dead early-clobber $r13, 12, implicit-def dead early-clobber $r14, 12, implicit-def dead early-clobber $r15, 12, implicit-def dead early-clobber $eflags, !3106    CMP32ri %0, 2, implicit-def $eflags107    JCC_1 %bb.6, 4, implicit killed $eflags108    JMP_1 %bb.2109  110  bb.2.do.body:111    successors: %bb.5(0x2aaaaaab), %bb.3(0x55555555)112  113    CMP32ri %0, 1, implicit-def $eflags114    JCC_1 %bb.5, 4, implicit killed $eflags115    JMP_1 %bb.3116  117  bb.3.do.body:118    successors: %bb.4, %bb.7119  120    TEST32rr %0, %0, implicit-def $eflags121    JCC_1 %bb.7, 5, implicit killed $eflags122    JMP_1 %bb.4123  124  bb.4.sw.bb:125    ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp126    $rdi = COPY %3127    CALL64pcrel32 target-flags(x86-plt) @_Z3gooPKc, csr_64, implicit $rsp, implicit $ssp, implicit $rdi, implicit-def $rsp, implicit-def $ssp128    ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp129  130  bb.5.sw.bb1:131    ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp132    $rdi = COPY %4133    CALL64pcrel32 target-flags(x86-plt) @_Z3gooPKc, csr_64, implicit $rsp, implicit $ssp, implicit $rdi, implicit-def $rsp, implicit-def $ssp134    ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp135  136  bb.6.sw.bb2:137    ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp138    $rdi = COPY %5139    CALL64pcrel32 target-flags(x86-plt) @_Z3gooPKc, csr_64, implicit $rsp, implicit $ssp, implicit $rdi, implicit-def $rsp, implicit-def $ssp140    ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp141  142  bb.7.do.cond:143    successors: %bb.8(0x04000000), %bb.1(0x7c000000)144  145    CMP32mi %6, 1, $noreg, 0, $noreg, 5, implicit-def $eflags :: (dereferenceable load (s32) from @m, !tbaa !4)146    JCC_1 %bb.1, 5, implicit killed $eflags147    JMP_1 %bb.8148  149  bb.8.do.end:150    RET 0151 152...153