-
Notifications
You must be signed in to change notification settings - Fork 12k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Driver][test] Clean up and improve some -mtune tests
Note: we should test CHECK-NOT: "-tune-cpu" instead of CHECK-NOT: "-tune-cpu" "generic"
- Loading branch information
Showing
3 changed files
with
43 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
// RUN: %clang -target aarch64 -### -c %s 2>&1 | FileCheck -check-prefix=GENERIC-V8A %s | ||
// RUN: %clang -target aarch64 -march=armv8-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERIC-V8A %s | ||
// RUN: %clang --target=aarch64 -### -c %s 2>&1 | FileCheck -check-prefix=GENERIC-V8A %s | ||
// RUN: %clang --target=aarch64 -march=armv8-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERIC-V8A %s | ||
// GENERIC-V8A: "-cc1"{{.*}} "-triple" "aarch64{{(--)?}}"{{.*}} "-target-cpu" "generic" "-target-feature" "+neon" "-target-feature" "+v8a" | ||
|
||
// RUN: %clang -target aarch64 -march=armv8-r -### -c %s 2>&1 | FileCheck -check-prefix=GENERIC-V8R %s | ||
// RUN: %clang --target=aarch64 -march=armv8-r -### -c %s 2>&1 | FileCheck -check-prefix=GENERIC-V8R %s | ||
// GENERIC-V8R: "-cc1"{{.*}} "-triple" "aarch64{{(--)?}}"{{.*}} "-target-cpu" "generic" "-target-feature" "+neon" "-target-feature" "+v8r" | ||
|
||
// RUN: %clang -target aarch64 -march=armv9a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV9A %s | ||
// RUN: %clang -target aarch64 -march=armv9-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV9A %s | ||
// RUN: %clang -target aarch64 -mlittle-endian -march=armv9a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV9A %s | ||
// RUN: %clang -target aarch64 -mlittle-endian -march=armv9-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV9A %s | ||
// RUN: %clang -target aarch64_be -mlittle-endian -march=armv9a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV9A %s | ||
// RUN: %clang -target aarch64_be -mlittle-endian -march=armv9-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV9A %s | ||
// RUN: %clang --target=aarch64 -march=armv9a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV9A %s | ||
// RUN: %clang --target=aarch64 -march=armv9-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV9A %s | ||
// RUN: %clang --target=aarch64 -mlittle-endian -march=armv9a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV9A %s | ||
// RUN: %clang --target=aarch64 -mlittle-endian -march=armv9-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV9A %s | ||
// RUN: %clang --target=aarch64_be -mlittle-endian -march=armv9a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV9A %s | ||
// RUN: %clang --target=aarch64_be -mlittle-endian -march=armv9-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV9A %s | ||
// GENERICV9A: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-cpu" "generic" "-target-feature" "+neon" "-target-feature" "+v9a" "-target-feature" "+sve" "-target-feature" "+sve2" | ||
|
||
// RUN: %clang -target aarch64_be -march=armv9a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV9A-BE %s | ||
// RUN: %clang -target aarch64_be -march=armv9-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV9A-BE %s | ||
// RUN: %clang -target aarch64 -mbig-endian -march=armv9a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV9A-BE %s | ||
// RUN: %clang -target aarch64 -mbig-endian -march=armv9-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV9A-BE %s | ||
// RUN: %clang -target aarch64_be -mbig-endian -march=armv9a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV9A-BE %s | ||
// RUN: %clang -target aarch64_be -mbig-endian -march=armv9-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV9A-BE %s | ||
// RUN: %clang --target=aarch64_be -march=armv9a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV9A-BE %s | ||
// RUN: %clang --target=aarch64_be -march=armv9-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV9A-BE %s | ||
// RUN: %clang --target=aarch64 -mbig-endian -march=armv9a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV9A-BE %s | ||
// RUN: %clang --target=aarch64 -mbig-endian -march=armv9-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV9A-BE %s | ||
// RUN: %clang --target=aarch64_be -mbig-endian -march=armv9a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV9A-BE %s | ||
// RUN: %clang --target=aarch64_be -mbig-endian -march=armv9-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV9A-BE %s | ||
// GENERICV9A-BE: "-cc1"{{.*}} "-triple" "aarch64_be{{.*}}" "-target-cpu" "generic" "-target-feature" "+neon" "-target-feature" "+v9a" "-target-feature" "+sve" "-target-feature" "+sve2" | ||
|
||
// ================== Check whether -march accepts mixed-case values. | ||
// RUN: %clang -target aarch64_be -march=ARMV8.1A -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV81A-BE %s | ||
// RUN: %clang -target aarch64_be -march=ARMV8.1-A -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV81A-BE %s | ||
// RUN: %clang -target aarch64 -mbig-endian -march=Armv8.1A -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV81A-BE %s | ||
// RUN: %clang -target aarch64 -mbig-endian -march=Armv8.1-A -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV81A-BE %s | ||
// RUN: %clang -target aarch64_be -mbig-endian -march=ARMv8.1a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV81A-BE %s | ||
// RUN: %clang -target aarch64_be -mbig-endian -march=ARMV8.1-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV81A-BE %s | ||
// RUN: %clang --target=aarch64_be -march=ARMV8.1A -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV81A-BE %s | ||
// RUN: %clang --target=aarch64_be -march=ARMV8.1-A -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV81A-BE %s | ||
// RUN: %clang --target=aarch64 -mbig-endian -march=Armv8.1A -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV81A-BE %s | ||
// RUN: %clang --target=aarch64 -mbig-endian -march=Armv8.1-A -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV81A-BE %s | ||
// RUN: %clang --target=aarch64_be -mbig-endian -march=ARMv8.1a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV81A-BE %s | ||
// RUN: %clang --target=aarch64_be -mbig-endian -march=ARMV8.1-a -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV81A-BE %s | ||
// GENERICV81A-BE: "-cc1"{{.*}} "-triple" "aarch64_be{{.*}}" "-target-cpu" "generic" "-target-feature" "+neon" "-target-feature" "+v8.1a" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,34 @@ | ||
// Ensure we support the -mtune flag. | ||
|
||
// GENERIC-CPU: "-target-cpu" "generic" | ||
|
||
// There shouldn't be a default -mtune. | ||
// RUN: %clang -target aarch64-unknown-unknown -c -### %s 2>&1 \ | ||
// RUN: | FileCheck %s -check-prefix=NOTUNE | ||
// NOTUNE-NOT: "-tune-cpu" "generic" | ||
// RUN: %clang -### -c --target=aarch64 %s 2>&1 | FileCheck %s -check-prefix=NOTUNE | ||
// NOTUNE-NOT: "-tune-cpu" | ||
|
||
// RUN: %clang -target aarch64-unknown-unknown -c -### %s -mtune=generic 2>&1 \ | ||
// RUN: | FileCheck %s -check-prefix=GENERIC | ||
// RUN: %clang -### -c --target=aarch64 %s -mtune=generic 2>&1 | FileCheck %s -check-prefix=GENERIC | ||
// GENERIC: "-tune-cpu" "generic" | ||
|
||
// RUN: %clang -target aarch64-unknown-unknown -c -### %s -mtune=neoverse-n1 2>&1 \ | ||
// RUN: | FileCheck %s -check-prefix=NEOVERSE-N1 | ||
// RUN: %clang -### -c --target=aarch64 %s -mtune=neoverse-n1 2>&1 | FileCheck %s --check-prefixes=GENERIC-CPU,NEOVERSE-N1 | ||
// NEOVERSE-N1: "-tune-cpu" "neoverse-n1" | ||
|
||
// RUN: %clang -target aarch64-unknown-unknown -c -### %s -mtune=thunderx2t99 2>&1 \ | ||
// RUN: | FileCheck %s -check-prefix=THUNDERX2T99 | ||
// RUN: %clang -### -c --target=aarch64 %s -mtune=thunderx2t99 2>&1 | FileCheck %s -check-prefixes=GENERIC-CPU,THUNDERX2T99 | ||
// THUNDERX2T99: "-tune-cpu" "thunderx2t99" | ||
|
||
// Check interaction between march and mtune. | ||
|
||
// RUN: %clang -target aarch64-unknown-unknown -c -### %s -march=armv8-a 2>&1 \ | ||
// RUN: | FileCheck %s -check-prefix=MARCHARMV8A | ||
// MARCHARMV8A: "-target-cpu" "generic" | ||
// MARCHARMV8A-NOT: "-tune-cpu" "generic" | ||
// RUN: %clang -### -c --target=aarch64 %s -march=armv8-a 2>&1 | FileCheck %s --check-prefixes=GENERIC-CPU,MARCHARMV8A | ||
// MARCHARMV8A-NOT: "-tune-cpu" | ||
|
||
// RUN: %clang -target aarch64-unknown-unknown -c -### %s -march=armv8-a -mtune=cortex-a75 2>&1 \ | ||
// RUN: | FileCheck %s -check-prefix=MARCHARMV8A-A75 | ||
// MARCHARMV8A-A75: "-target-cpu" "generic" | ||
// RUN: %clang -### -c --target=aarch64 %s -march=armv8-a -mtune=cortex-a75 2>&1 | FileCheck %s --check-prefixes=GENERIC-CPU,MARCHARMV8A-A75 | ||
// MARCHARMV8A-A75: "-tune-cpu" "cortex-a75" | ||
|
||
// Check interaction between mcpu and mtune. | ||
|
||
// RUN: %clang -target aarch64-unknown-unknown -c -### %s -mcpu=thunderx 2>&1 \ | ||
// RUN: | FileCheck %s -check-prefix=MCPUTHUNDERX | ||
// RUN: %clang -### -c --target=aarch64 %s -mcpu=thunderx 2>&1 | FileCheck %s -check-prefix=MCPUTHUNDERX | ||
// MCPUTHUNDERX: "-target-cpu" "thunderx" | ||
// MCPUTHUNDERX-NOT: "-tune-cpu" | ||
|
||
// RUN: %clang -target aarch64-unknown-unknown -c -### %s -mcpu=cortex-a75 -mtune=cortex-a57 2>&1 \ | ||
// RUN: | FileCheck %s -check-prefix=MCPUA75-MTUNEA57 | ||
// RUN: %clang -### -c --target=aarch64 %s -mcpu=cortex-a75 -mtune=cortex-a57 2>&1 | FileCheck %s -check-prefix=MCPUA75-MTUNEA57 | ||
// MCPUA75-MTUNEA57: "-target-cpu" "cortex-a75" | ||
// MCPUA75-MTUNEA57: "-tune-cpu" "cortex-a57" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters