| 1 |
// Ensure we support the -mtune flag. |
| 2 |
|
| 3 |
// GENERIC-CPU: "-target-cpu" "generic" |
| 4 |
|
| 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" |
| 8 |
|
| 9 |
// RUN: %clang -### -c --target=aarch64 %s -mtune=generic 2>&1 | FileCheck %s -check-prefix=GENERIC |
| 10 |
// GENERIC: "-tune-cpu" "generic" |
| 11 |
|
| 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" |
| 14 |
|
| 15 |
// RUN: %clang -### -c --target=aarch64 %s -mtune=thunderx2t99 2>&1 | FileCheck %s -check-prefixes=GENERIC-CPU,THUNDERX2T99 |
| 16 |
// THUNDERX2T99: "-tune-cpu" "thunderx2t99" |
| 17 |
|
| 18 |
// Check interaction between march and mtune. |
| 19 |
|
| 20 |
// RUN: %clang -### -c --target=aarch64 %s -march=armv8-a 2>&1 | FileCheck %s --check-prefixes=GENERIC-CPU,MARCHARMV8A |
| 21 |
// MARCHARMV8A-NOT: "-tune-cpu" |
| 22 |
|
| 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" |
| 25 |
|
| 26 |
// Check interaction between mcpu and mtune. |
| 27 |
|
| 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" |
| 31 |
|
| 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" |