Index: tools/clang/test/Driver/aarch64-cpus.c =================================================================== --- tools/clang/test/Driver/aarch64-cpus.c +++ tools/clang/test/Driver/aarch64-cpus.c @@ -283,3 +283,31 @@ // RUN: %clang -target arm64 -mcpu=Cortex-A57 -### -c %s 2>&1 | FileCheck -check-prefix=CASE-INSENSITIVE-ARM64-CA57 %s // RUN: %clang -target arm64 -mtune=Cortex-A57 -### -c %s 2>&1 | FileCheck -check-prefix=CASE-INSENSITIVE-ARM64-CA57 %s // CASE-INSENSITIVE-ARM64-CA57: "-cc1"{{.*}} "-triple" "arm64{{.*}}" "-target-cpu" "cortex-a57" + +// RUN: %clang -target aarch64 -mcpu=xgene1 -### -c %s 2>&1 | FileCheck -check-prefix=XGENE1 %s +// RUN: %clang -target aarch64 -mlittle-endian -mcpu=xgene1 -### -c %s 2>&1 | FileCheck -check-prefix=XGENE1 %s +// RUN: %clang -target aarch64_be -mlittle-endian -mcpu=xgene1 -### -c %s 2>&1 | FileCheck -check-prefix=XGENE1 %s +// RUN: %clang -target aarch64 -mtune=xgene1 -### -c %s 2>&1 | FileCheck -check-prefix=XGENE1 %s +// RUN: %clang -target aarch64_be -mlittle-endian -mtune=xgene1 -### -c %s 2>&1 | FileCheck -check-prefix=XGENE1 %s +// XGENE1: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-cpu" "xgene1" + +// RUN: %clang -target arm64 -mcpu=xgene1 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-XGENE1 %s +// RUN: %clang -target arm64 -mlittle-endian -mcpu=xgene1 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-XGENE1 %s +// RUN: %clang -target arm64 -mtune=xgene1 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-XGENE1 %s +// RUN: %clang -target arm64 -mlittle-endian -mtune=xgene1 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-XGENE1 %s +// ARM64-XGENE1: "-cc1"{{.*}} "-triple" "arm64{{.*}}" "-target-cpu" "xgene1" + +// RUN: %clang -target aarch64_be -mcpu=xgene1 -### -c %s 2>&1 | FileCheck -check-prefix=XGENE1-BE %s +// RUN: %clang -target aarch64 -mbig-endian -mcpu=xgene1 -### -c %s 2>&1 | FileCheck -check-prefix=XGENE1-BE %s +// RUN: %clang -target aarch64_be -mbig-endian -mcpu=xgene1 -### -c %s 2>&1 | FileCheck -check-prefix=XGENE1-BE %s +// RUN: %clang -target aarch64_be -mtune=xgene1 -### -c %s 2>&1 | FileCheck -check-prefix=XGENE1-BE %s +// RUN: %clang -target aarch64 -mbig-endian -mtune=xgene1 -### -c %s 2>&1 | FileCheck -check-prefix=XGENE1-BE %s +// RUN: %clang -target aarch64_be -mbig-endian -mtune=xgene1 -### -c %s 2>&1 | FileCheck -check-prefix=XGENE1-BE %s +// XGENE1-BE: "-cc1"{{.*}} "-triple" "aarch64_be{{.*}}" "-target-cpu" "xgene1" + +// RUN: %clang -target aarch64 -mcpu=vulcan -mtune=xgene1 -### -c %s 2>&1 | FileCheck -check-prefix=MCPU-MTUNE %s +// RUN: %clang -target aarch64 -mtune=xgene1 -mcpu=vulcan -### -c %s 2>&1 | FileCheck -check-prefix=MCPU-MTUNE %s +// MCPU-MTUNE: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-cpu" "xgene1" + +// CASE-INSENSITIVE-XGENE1: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-cpu" "xgene1" +// CASE-INSENSITIVE-ARM64-XGENE1: "-cc1"{{.*}} "-triple" "arm64{{.*}}" "-target-cpu" "xgene1" Index: tools/clang/test/Frontend/aarch64-target-cpu.c =================================================================== --- tools/clang/test/Frontend/aarch64-target-cpu.c +++ tools/clang/test/Frontend/aarch64-target-cpu.c @@ -10,5 +10,6 @@ // RUN: %clang_cc1 -triple aarch64-unknown-unknown -target-cpu generic -verify %s // RUN: %clang_cc1 -triple aarch64-unknown-unknown -target-cpu kryo -verify %s // RUN: %clang_cc1 -triple aarch64-unknown-unknown -target-cpu vulcan -verify %s +// RUN: %clang_cc1 -triple aarch64-unknown-unknown -target-cpu xgene1 -verify %s // // expected-no-diagnostics Index: tools/clang/test/Preprocessor/aarch64-target-features.c =================================================================== --- tools/clang/test/Preprocessor/aarch64-target-features.c +++ tools/clang/test/Preprocessor/aarch64-target-features.c @@ -97,6 +97,7 @@ // RUN: %clang -target aarch64 -mcpu=exynos-m2 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-M1 %s // RUN: %clang -target aarch64 -mcpu=kryo -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-KRYO %s // RUN: %clang -target aarch64 -mcpu=vulcan -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-VULCAN %s +// RUN: %clang -target aarch64 -mcpu=xgene1 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-XGENE1 %s // CHECK-MCPU-CYCLONE: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+crypto" "-target-feature" "+zcm" "-target-feature" "+zcz" // CHECK-MCPU-A35: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+crc" "-target-feature" "+crypto" // CHECK-MCPU-A53: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+crc" "-target-feature" "+crypto" @@ -106,6 +107,7 @@ // CHECK-MCPU-M1: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+crc" "-target-feature" "+crypto" // CHECK-MCPU-KRYO: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+crc" "-target-feature" "+crypto" // CHECK-MCPU-VULCAN: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+crc" "-target-feature" "+crypto" +// CHECK-MCPU-XGENE1: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+fp" "-target-feature" "+crc" "-target-feature" "+simd" "-target-feature" "+neon" // RUN: %clang -target x86_64-apple-macosx -arch arm64 -### -c %s 2>&1 | FileCheck --check-prefix=CHECK-ARCH-ARM64 %s // CHECK-ARCH-ARM64: "-target-cpu" "cyclone" "-target-feature" "+neon" "-target-feature" "+crypto" "-target-feature" "+zcm" "-target-feature" "+zcz"