diff options
Diffstat (limited to 'test/Instrumentation/InstrProfiling/noruntime.ll')
-rw-r--r-- | test/Instrumentation/InstrProfiling/noruntime.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Instrumentation/InstrProfiling/noruntime.ll b/test/Instrumentation/InstrProfiling/noruntime.ll new file mode 100644 index 0000000..e69445d --- /dev/null +++ b/test/Instrumentation/InstrProfiling/noruntime.ll @@ -0,0 +1,16 @@ +;; Check that we don't emit the runtime hooks if the user provided them. + +; RUN: opt < %s -instrprof -S | FileCheck %s +; CHECK-NOT: define {{.*}} @__llvm_profile_runtime_user() +; CHECK-NOT: load i32* @__llvm_profile_runtime + +@__llvm_profile_runtime = global i32 0, align 4 + +@__llvm_profile_name_foo = hidden constant [3 x i8] c"foo" + +define void @foo() { + call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8]* @__llvm_profile_name_foo, i32 0, i32 0), i64 0, i32 1, i32 0) + ret void +} + +declare void @llvm.instrprof.increment(i8*, i64, i32, i32) |