Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Driver / aarch64-mtune.c
blob2518214f56750c641506f3ac2fcdc7a78c62f8a8
1 // Ensure we support the -mtune flag.
3 // GENERIC-CPU: "-target-cpu" "generic"
5 // There shouldn't be a default -mtune.
6 // RUN: %clang -### -c --target=aarch64 %s 2>&1 | FileCheck %s -check-prefix=NOTUNE
7 // NOTUNE-NOT: "-tune-cpu"
9 // RUN: %clang -### -c --target=aarch64 %s -mtune=generic 2>&1 | FileCheck %s -check-prefix=GENERIC
10 // GENERIC: "-tune-cpu" "generic"
12 // RUN: %clang -### -c --target=aarch64 %s -mtune=neoverse-n1 2>&1 | FileCheck %s --check-prefixes=GENERIC-CPU,NEOVERSE-N1
13 // NEOVERSE-N1: "-tune-cpu" "neoverse-n1"
15 // RUN: %clang -### -c --target=aarch64 %s -mtune=thunderx2t99 2>&1 | FileCheck %s -check-prefixes=GENERIC-CPU,THUNDERX2T99
16 // THUNDERX2T99: "-tune-cpu" "thunderx2t99"
18 // Check interaction between march and mtune.
20 // RUN: %clang -### -c --target=aarch64 %s -march=armv8-a 2>&1 | FileCheck %s --check-prefixes=GENERIC-CPU,MARCHARMV8A
21 // MARCHARMV8A-NOT: "-tune-cpu"
23 // RUN: %clang -### -c --target=aarch64 %s -march=armv8-a -mtune=cortex-a75 2>&1 | FileCheck %s --check-prefixes=GENERIC-CPU,MARCHARMV8A-A75
24 // MARCHARMV8A-A75: "-tune-cpu" "cortex-a75"
26 // Check interaction between mcpu and mtune.
28 // RUN: %clang -### -c --target=aarch64 %s -mcpu=thunderx 2>&1 | FileCheck %s -check-prefix=MCPUTHUNDERX
29 // MCPUTHUNDERX: "-target-cpu" "thunderx"
30 // MCPUTHUNDERX-NOT: "-tune-cpu"
32 // RUN: %clang -### -c --target=aarch64 %s -mcpu=cortex-a75 -mtune=cortex-a57 2>&1 | FileCheck %s -check-prefix=MCPUA75-MTUNEA57
33 // MCPUA75-MTUNEA57: "-target-cpu" "cortex-a75"
34 // MCPUA75-MTUNEA57: "-tune-cpu" "cortex-a57"