xref: /llvm-project/llvm/test/Instrumentation/HeapProfiler/shadow.ll (revision 5171712bb2783784eb3b95f415c8f8c3d565a294)
1; RUN: opt < %s -passes='function(memprof),module(memprof-module)' -S | FileCheck --check-prefixes=STATIC %s
2
3; RUN: cat %s > %t.pic.ll
4; RUN: echo -e '!llvm.module.flags = !{!0}\n!0 = !{i32 7, !"PIC Level", i32 1}' >> %t.pic.ll
5; RUN: opt < %t.pic.ll -passes='function(memprof),module(memprof-module)' -S | FileCheck --check-prefixes=PIC %s
6
7; STATIC: @__memprof_shadow_memory_dynamic_address = external dso_local global i64
8; PIC: @__memprof_shadow_memory_dynamic_address = external global i64
9
10define i32 @test_load(ptr %a) {
11entry:
12  %tmp1 = load i32, ptr %a, align 4
13  ret i32 %tmp1
14}
15