1# RUN: llc -mtriple=x86_64-unknown-windows-msvc -start-before=x86-flags-copy-lowering -o - %s | FileCheck %s 2# 3# Test the emission of heap alloc site instruction labels. 4 5--- | 6 declare i8* @alloc(i32) nounwind 7 8 define i32 @test(i32 %x) nounwind !dbg !6 { 9 entry: 10 call i8* @alloc(i32 %x), !dbg !11, !heapallocsite !2 11 ret i32 0, !dbg !12 12 } 13 14 !llvm.dbg.cu = !{!0} 15 !llvm.module.flags = !{!3, !4, !5} 16 17 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None) 18 !1 = !DIFile(filename: "<stdin>", directory: "") 19 !2 = !{} 20 !3 = !{i32 2, !"CodeView", i32 1} 21 !4 = !{i32 2, !"Debug Info Version", i32 3} 22 !5 = !{i32 1, !"wchar_size", i32 2} 23 !6 = distinct !DISubprogram(name: "test", scope: !7, file: !7, line: 2, type: !8, scopeLine: 2, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2) 24 !7 = !DIFile(filename: "test.c", directory: "") 25 !8 = !DISubroutineType(types: !9) 26 !9 = !{!10, !10} 27 !10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) 28 !11 = !DILocation(line: 3, scope: !6) 29 !12 = !DILocation(line: 4, scope: !6) 30 31... 32--- 33name: test 34# CHECK-LABEL: {{^}}test: 35tracksRegLiveness: true 36frameInfo: 37 hasCalls: true 38body: | 39 bb.0.entry: 40 liveins: $ecx 41 42 ADJCALLSTACKDOWN64 32, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp, debug-location !11 43 CALL64pcrel32 @alloc, csr_win64, implicit $rsp, implicit $ssp, implicit $ecx, implicit-def $rsp, implicit-def $ssp, implicit-def dead $rax, heap-alloc-marker !2, debug-location !11 44 ; CHECK: callq alloc 45 ; CHECK-NEXT: .Ltmp{{.*}}: 46 ADJCALLSTACKUP64 32, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp, debug-location !11 47 $eax = MOV32r0 implicit-def dead $eflags, debug-location !12 48 RET 0, killed $eax, debug-location !12 49 50... 51