xref: /llvm-project/llvm/test/Instrumentation/HeapProfiler/no-instrumentation.ll (revision 084b65f7dc3986f0ee584c1b449cfe0c5e751fb3)
1;; Test that we don't add any instrumentation code to functions without
2;; interesting memory accesses.
3;
4; RUN: opt < %s -passes='function(memprof),module(memprof-module)' -S -debug 2>&1 | FileCheck %s
5
6;; Require asserts for -debug
7; REQUIRES: asserts
8
9target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
10target triple = "x86_64-unknown-linux-gnu"
11
12define void @_Z3foov() {
13entry:
14  ret void
15}
16
17;; Confirm we ran memprof and decided not to instrument
18; CHECK: MEMPROF done instrumenting: 0 define void @_Z3foov
19
20;; We should not add any instrumentation related code
21; CHECK: define void @_Z3foov
22; CHECK-NEXT: entry:
23; CHECK-NEXT:  ret void
24