1// REQUIRES: lld-available
2
3// FIXME: Investigate and fix.
4// XFAIL: powerpc64-target-arch
5
6/// Test ld with GC.
7
8// RUN: %clang_pgogen -o %t -O3 %S/Inputs/instrprof-value-merge.c -no-pie -fuse-ld=lld -ffunction-sections -fdata-sections -Wl,--gc-sections -z start-stop-gc
9// RUN: rm -rf %t.profdir
10// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t
11// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t
12// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t
13// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t 1
14// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t 1
15// RUN: llvm-profdata show -counts -function=main -ic-targets -memop-sizes %t.profdir/default_*.profraw | FileCheck %S/Inputs/instrprof-value-merge.c
16

source code of compiler-rt/test/profile/Linux/instrprof-value-merge-lld.c