Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / code-coverage-tsan.c
blobf6cf7f73f173ee75c6f1e2dacd38ae67371e0f14
1 /// -fprofile-update=atomic requires the (potentially concurrent) counter updates to be atomic.
2 // RUN: %clang_cc1 %s -triple x86_64 -emit-llvm -fprofile-update=atomic \
3 // RUN: -coverage-notes-file=/dev/null -coverage-data-file=/dev/null -o - | FileCheck %s
5 // CHECK-LABEL: void @foo()
6 /// Two counters are incremented by __tsan_atomic64_fetch_add.
7 // CHECK: atomicrmw add ptr @__llvm_gcov_ctr{{.*}} monotonic, align 8
8 // CHECK-NEXT: atomicrmw sub ptr
10 _Atomic(int) cnt;
11 void foo(void) { cnt--; }