diff options
Diffstat (limited to 'llvm/test/Instrumentation/InstrProfiling/atomic-updates.ll')
-rw-r--r-- | llvm/test/Instrumentation/InstrProfiling/atomic-updates.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/Instrumentation/InstrProfiling/atomic-updates.ll b/llvm/test/Instrumentation/InstrProfiling/atomic-updates.ll new file mode 100644 index 00000000000..7230a205dff --- /dev/null +++ b/llvm/test/Instrumentation/InstrProfiling/atomic-updates.ll @@ -0,0 +1,14 @@ +; RUN: opt < %s -S -instrprof -instrprof-atomic-counter-update-all | FileCheck %s + +target triple = "x86_64-apple-macosx10.10.0" + +@__profn_foo = hidden constant [3 x i8] c"foo" + +; CHECK-LABEL: define void @foo +; CHECK-NEXT: atomicrmw add i64* getelementptr inbounds ([1 x i64], [1 x i64]* @__profc_foo, i64 0, i64 0), i64 1 monotonic +define void @foo() { + call void @llvm.instrprof.increment(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @__profn_foo, i32 0, i32 0), i64 0, i32 1, i32 0) + ret void +} + +declare void @llvm.instrprof.increment(i8*, i64, i32, i32) |