brintos

brintos / llvm-project-archived public Read only

0
0
Text · 512 B · f6cf7f7 Raw
12 lines · c
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 %s4 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 88// CHECK-NEXT:    atomicrmw sub ptr9 10_Atomic(int) cnt;11void foo(void) { cnt--; }12