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
33 %1:gr32 = COPY killed %0
34 ADJCALLSTACKDOWN64 0, 0, 0, implicit-def $rsp, implicit-def $eflags, implicit-def $ssp, implicit $rsp, implicit $ssp
37 CALL64pcrel32 @f, csr_64, implicit $rsp, implicit $ssp, implicit $edi, pre-instr-symbol <mcsymbol .Lpre_f>, post-instr-symbol <mcsymbol .Lpost_f>
40 ; CHECK-NEXT: .Lpost_f:
42 ADJCALLSTACKUP64 0, 0, implicit-def $rsp, implicit-def $eflags, implicit-def $ssp, implicit $rsp, implicit $ssp
43 ADJCALLSTACKDOWN64 0, 0, 0, implicit-def $rsp, implicit-def $eflags, implicit-def $ssp, implicit $rsp, implicit $ssp
46 CALL64pcrel32 @g, csr_64, implicit $rsp, implicit $ssp, implicit $edi, pre-instr-symbol <mcsymbol .Lpre_g>
50 ADJCALLSTACKUP64 0, 0, implicit-def $rsp, implicit-def $eflags, implicit-def $ssp, implicit $rsp, implicit $ssp
51 ADJCALLSTACKDOWN64 0, 0, 0, implicit-def $rsp, implicit-def $eflags, implicit-def $ssp, implicit $rsp, implicit $ssp
54 CALL64pcrel32 @h, csr_64, implicit $rsp, implicit $ssp, implicit $edi, post-instr-symbol <mcsymbol .Lpost_h>
56 ; CHECK-NEXT: .Lpost_h:
58 ADJCALLSTACKUP64 0, 0, implicit-def $rsp, implicit-def $eflags, implicit-def $ssp, implicit $rsp, implicit $ssp
60 %2:gr64 = MOV64ri32 <mcsymbol .Lpre_f>
61 %3:gr64 = MOV64ri32 <mcsymbol .Lpost_f>
62 %4:gr64 = MOV64ri32 <mcsymbol .Lpre_g>
63 %5:gr64 = MOV64ri32 <mcsymbol .Lpost_h>
64 ; CHECK: movq $.Lpre_f, %{{.*}}
65 ; CHECK-NEXT: movq $.Lpost_f, %{{.*}}
66 ; CHECK-NEXT: movq $.Lpre_g, %{{.*}}
67 ; CHECK-NEXT: movq $.Lpost_h, %{{.*}}
69 %6:gr64 = ADD64rr killed %2, killed %3, implicit-def $eflags
70 %7:gr64 = ADD64rr killed %4, killed %5, implicit-def $eflags
71 %8:gr64 = ADD64rr killed %6, killed %7, implicit-def $eflags