1 # RUN: llc -mtriple=x86_64-unknown-linux -start-before=x86-flags-copy-lowering -o - %s | FileCheck %s
3 # Test the emission of pre- and post-instruction labels.
6 declare void @f(i32 %x) nounwind
8 declare void @g(i32 %x) nounwind
10 declare void @h(i32 %x) nounwind
12 define i64 @test(i32 %x) nounwind {
23 # CHECK-LABEL: {{^}}test:
24 tracksRegLiveness: true
32 %1:gr32 = COPY killed %0
33 ADJCALLSTACKDOWN64 0, 0, 0, implicit-def $rsp, implicit-def $eflags, implicit-def $ssp, implicit $rsp, implicit $ssp
36 CALL64pcrel32 @f, csr_64, implicit $rsp, implicit $ssp, implicit $edi, pre-instr-symbol <mcsymbol .Lpre_f>, post-instr-symbol <mcsymbol .Lpost_f>
39 ; CHECK-NEXT: .Lpost_f:
41 ADJCALLSTACKUP64 0, 0, implicit-def $rsp, implicit-def $eflags, implicit-def $ssp, implicit $rsp, implicit $ssp
42 ADJCALLSTACKDOWN64 0, 0, 0, implicit-def $rsp, implicit-def $eflags, implicit-def $ssp, implicit $rsp, implicit $ssp
45 CALL64pcrel32 @g, csr_64, implicit $rsp, implicit $ssp, implicit $edi, pre-instr-symbol <mcsymbol .Lpre_g>
49 ADJCALLSTACKUP64 0, 0, implicit-def $rsp, implicit-def $eflags, implicit-def $ssp, implicit $rsp, implicit $ssp
50 ADJCALLSTACKDOWN64 0, 0, 0, implicit-def $rsp, implicit-def $eflags, implicit-def $ssp, implicit $rsp, implicit $ssp
53 CALL64pcrel32 @h, csr_64, implicit $rsp, implicit $ssp, implicit $edi, post-instr-symbol <mcsymbol .Lpost_h>
55 ; CHECK-NEXT: .Lpost_h:
57 ADJCALLSTACKUP64 0, 0, implicit-def $rsp, implicit-def $eflags, implicit-def $ssp, implicit $rsp, implicit $ssp
59 %2:gr64 = MOV64ri32 <mcsymbol .Lpre_f>
60 %3:gr64 = MOV64ri32 <mcsymbol .Lpost_f>
61 %4:gr64 = MOV64ri32 <mcsymbol .Lpre_g>
62 %5:gr64 = MOV64ri32 <mcsymbol .Lpost_h>
63 ; CHECK: movq $.Lpre_f, %{{.*}}
64 ; CHECK-NEXT: movq $.Lpost_f, %{{.*}}
65 ; CHECK-NEXT: movq $.Lpre_g, %{{.*}}
66 ; CHECK-NEXT: movq $.Lpost_h, %{{.*}}
68 %6:gr64 = ADD64rr killed %2, killed %3, implicit-def $eflags
69 %7:gr64 = ADD64rr killed %4, killed %5, implicit-def $eflags
70 %8:gr64 = ADD64rr killed %6, killed %7, implicit-def $eflags