Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Driver / fprofile-update.c
blob3313a2c1cb9af46de31ab5b5bb8406b59a8b193d
1 /// For -fprofile-instr-generate and -fprofile-arcs, increment counters atomically
2 /// if -fprofile-update={atomic,prefer-atomic} is specified.
3 // RUN: %clang -### %s -c -fprofile-update=atomic 2>&1 | FileCheck %s
4 // RUN: %clang -### %s -c -fprofile-update=prefer-atomic 2>&1 | FileCheck %s
6 // CHECK: "-fprofile-update=atomic"
8 // RUN: %clang -### %s -c -fprofile-update=atomic -fprofile-update=single 2>&1 | FileCheck %s --check-prefix=SINGLE
10 // SINGLE-NOT: "-fprofile-update=atomic"
12 // RUN: not %clang %s -c -fprofile-update=unknown 2>&1 | FileCheck %s --check-prefix=ERROR
14 // ERROR: error: unsupported argument 'unknown' to option '-fprofile-update='
16 // AIX specific tests
17 // RUN: %clang -### %s --target=powerpc-unknown-aix -fprofile-generate -fprofile-update=atomic 2>&1 | FileCheck %s --check-prefix=AIX
18 // RUN: %clang -### %s --target=powerpc-unknown-aix -fprofile-generate -fprofile-update=prefer-atomic 2>&1 | FileCheck %s --check-prefix=AIX
19 // RUN: %clang -### %s --target=powerpc-unknown-aix -fprofile-generate 2>&1 | FileCheck %s --check-prefix=AIX-NOATOMIC
20 // RUN: %clang -### %s --target=powerpc-unknown-aix -fprofile-generate -fprofile-update=single 2>&1 | FileCheck %s --check-prefix=AIX-NOATOMIC
21 // AIX: "-latomic"
22 // AIX-NOATOMIC-NOT: "-latomic"