52 lines · plain
1# RUN: llc -mtriple=x86_64-unknown-windows-msvc -start-before=x86-flags-copy-lowering -o - %s | FileCheck %s2#3# Test the emission of heap alloc site instruction labels.4 5--- |6 declare ptr @alloc(i32) nounwind7 8 define i32 @test(i32 %x) nounwind !dbg !6 {9 entry:10 call ptr @alloc(i32 %x), !dbg !11, !heapallocsite !211 ret i32 0, !dbg !1212 }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: test34# CHECK-LABEL: {{^}}test:35tracksRegLiveness: true36frameInfo:37 adjustsStack: true38 hasCalls: true39body: |40 bb.0.entry:41 liveins: $ecx42 43 ADJCALLSTACKDOWN64 32, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp, debug-location !1144 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 !1145 ; CHECK: callq alloc46 ; CHECK-NEXT: .Ltmp{{.*}}:47 ADJCALLSTACKUP64 32, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp, debug-location !1148 $eax = MOV32r0 implicit-def dead $eflags, debug-location !1249 RET 0, killed $eax, debug-location !1250 51...52