[Driver][test] Clean up and improve some -mtune tests
Note: we should test CHECK-NOT: "-tune-cpu" instead of CHECK-NOT: "-tune-cpu" "generic"
This commit is contained in:
parent
b797834748
commit
12fbd2d377
|
@ -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"
|
||||
|
|
|
@ -1,42 +1,34 @@
|
|||
// Ensure we support the -mtune flag.
|
||||
|
||||
// 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"
|
||||
// GENERIC-CPU: "-target-cpu" "generic"
|
||||
|
||||
// RUN: %clang -target aarch64-unknown-unknown -c -### %s -mtune=generic 2>&1 \
|
||||
// RUN: | FileCheck %s -check-prefix=GENERIC
|
||||
// There shouldn't be a default -mtune.
|
||||
// RUN: %clang -### -c --target=aarch64 %s 2>&1 | FileCheck %s -check-prefix=NOTUNE
|
||||
// NOTUNE-NOT: "-tune-cpu"
|
||||
|
||||
// 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"
|
||||
|
|
|
@ -1,43 +1,36 @@
|
|||
// Ensure we support the -mtune flag.
|
||||
|
||||
// Default mtune should be generic.
|
||||
// RUN: %clang -target x86_64-unknown-unknown -c -### %s 2>&1 \
|
||||
// RUN: | FileCheck %s -check-prefix=notune
|
||||
// notune: "-tune-cpu" "generic"
|
||||
// cpu: "-target-cpu" "x86-64"
|
||||
|
||||
// RUN: %clang -target x86_64-unknown-unknown -c -### %s -mtune=generic 2>&1 \
|
||||
// RUN: | FileCheck %s -check-prefix=generic
|
||||
// Default mtune should be generic.
|
||||
// RUN: %clang -### -c --target=x86_64 %s 2>&1 | FileCheck %s -check-prefix=generic
|
||||
|
||||
// RUN: %clang -### -c --target=x86_64 %s -mtune=generic 2>&1 | FileCheck %s --check-prefixes=cpu,generic
|
||||
// generic: "-tune-cpu" "generic"
|
||||
|
||||
// RUN: %clang -target x86_64-unknown-unknown -c -### %s -mtune=nocona 2>&1 \
|
||||
// RUN: | FileCheck %s -check-prefix=nocona
|
||||
// RUN: %clang -### -c --target=x86_64 %s -mtune=nocona 2>&1 | FileCheck %s --check-prefixes=cpu,nocona
|
||||
// nocona: "-tune-cpu" "nocona"
|
||||
|
||||
// Unlike march we allow 32-bit only cpus with mtune.
|
||||
|
||||
// RUN: %clang -target x86_64-unknown-unknown -c -### %s -mtune=i686 2>&1 \
|
||||
// RUN: | FileCheck %s -check-prefix=i686
|
||||
// RUN: %clang -### -c --target=x86_64 %s -mtune=i686 2>&1 | FileCheck %s --check-prefixes=cpu,i686
|
||||
// i686: "-tune-cpu" "i686"
|
||||
|
||||
// RUN: %clang -target x86_64-unknown-unknown -c -### %s -mtune=pentium4 2>&1 \
|
||||
// RUN: | FileCheck %s -check-prefix=pentium4
|
||||
// RUN: %clang -### -c --target=x86_64 %s -mtune=pentium4 2>&1 | FileCheck %s -check-prefix=pentium4
|
||||
// pentium4: "-tune-cpu" "pentium4"
|
||||
|
||||
// RUN: %clang -target x86_64-unknown-unknown -c -### %s -mtune=athlon 2>&1 \
|
||||
// RUN: | FileCheck %s -check-prefix=athlon
|
||||
// RUN: %clang -### -c --target=x86_64 %s -mtune=athlon 2>&1 | FileCheck %s -check-prefixes=cpu,athlon
|
||||
// athlon: "-tune-cpu" "athlon"
|
||||
|
||||
// Check interaction between march and mtune.
|
||||
|
||||
// -march should remove default mtune generic.
|
||||
// RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=core2 2>&1 \
|
||||
// RUN: | FileCheck %s -check-prefix=marchcore2
|
||||
// RUN: %clang -### -c --target=x86_64 %s -march=core2 2>&1 | FileCheck %s -check-prefix=marchcore2
|
||||
// marchcore2: "-target-cpu" "core2"
|
||||
// marchcore2-NOT: "-tune-cpu"
|
||||
|
||||
// -march should remove default mtune generic.
|
||||
// RUN: %clang -target x86_64-unknown-unknown -c -### %s -march=core2 -mtune=nehalem 2>&1 \
|
||||
// RUN: | FileCheck %s -check-prefix=marchmtune
|
||||
// RUN: %clang -### -c --target=x86_64 %s -march=core2 -mtune=nehalem 2>&1 | FileCheck %s -check-prefix=marchmtune
|
||||
// marchmtune: "-target-cpu" "core2"
|
||||
// mmarchmtune: "-tune-cpu" "nehalem"
|
||||
|
||||
|
|
Loading…
Reference in a new issue