llvm-project/clang/test/CodeGen/tsan-instrprof-atomic.c
Qiongsi Wu 611ce24114 [PGO] Enable -fprofile-update for -fprofile-generate
Currently, the `-fprofile-udpate` is ignored when `-fprofile-generate` is in effect. This patch enables `-fprofile-update` for `-fprofile-generate`. This patch continues the work from https://reviews.llvm.org/D87737, which added `-fprofile-update` in the first place.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D157280
2023-08-15 10:10:03 -04:00

9 lines
393 B
C

// RUN: %clang_cc1 %s -emit-llvm -fprofile-instrument=clang -fprofile-update=atomic -o - | FileCheck %s
// RUN: %clang %s -S -emit-llvm -fprofile-generate -fprofile-update=atomic -o - | FileCheck %s
// RUN: %clang -O3 %s -S -emit-llvm -fprofile-generate -fprofile-update=atomic -o - | FileCheck %s
// CHECK: define {{.*}}@foo
// CHECK-NOT: load {{.*}}foo
// CHECK: ret void
void foo(void) {}