1# RUN: llc -march=x86-64 -run-pass none -o - %s | FileCheck %s
2# This test ensures that the MIR parser parses heap alloc markers correctly.
3
4--- |
5  declare i8* @f(i32) nounwind
6
7  define i32 @test(i32 %x) nounwind {
8  entry:
9    call i8* @f(i32 %x), !heapallocsite !2
10    ret i32 undef
11  }
12
13  !llvm.dbg.cu = !{!0}
14  !llvm.module.flags = !{!3, !4}
15
16  !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None)
17  !1 = !DIFile(filename: "test.ll", directory: "")
18  !2 = !{}
19  !3 = !{i32 2, !"Debug Info Version", i32 3}
20  !4 = !{i32 1, !"wchar_size", i32 2}
21
22...
23---
24name: test
25# CHECK-LABEL: name: test
26tracksRegLiveness: true
27frameInfo:
28  hasCalls: true
29body: |
30  bb.0.entry:
31    liveins: $ecx
32
33    %0:gr32 = COPY $ecx
34    ADJCALLSTACKDOWN64 32, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
35    $ecx = COPY %0
36    CALL64pcrel32 @f, csr_win64, implicit $rsp, implicit $ssp, implicit $ecx, implicit-def $rsp, implicit-def $ssp, implicit-def dead $rax, heap-alloc-marker !2
37  ; CHECK: CALL64pcrel32 @f, {{.*}} heap-alloc-marker !2
38    ADJCALLSTACKUP64 32, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
39    $eax = MOV32r0 implicit-def dead $eflags
40    RET 0, killed $eax
41
42...
43