From 284e55561b91424f97f4e181de06aa2c71106937 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Fri, 20 Sep 2019 23:06:03 +0000 Subject: [PATCH] [SystemZ] Support z15 processor name The recently announced IBM z15 processor implements the architecture already supported as "arch13" in LLVM. This patch adds support for "z15" as an alternate architecture name for arch13. Corrsponding LLVM support was committed as rev. 372435. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372436 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Basic/Targets/SystemZ.cpp | 2 +- test/CodeGen/builtins-systemz-vector3-error.c | 2 +- test/CodeGen/builtins-systemz-vector3.c | 2 +- test/CodeGen/builtins-systemz-zvector3-error.c | 2 +- test/CodeGen/builtins-systemz-zvector3.c | 4 ++-- test/CodeGen/systemz-abi-vector.c | 2 ++ test/CodeGen/systemz-abi.c | 2 ++ test/CodeGen/target-data.c | 2 ++ test/Driver/systemz-march.c | 2 ++ test/Misc/target-invalid-cpu-note.c | 2 +- test/Preprocessor/predefined-arch-macros.c | 3 +++ 11 files changed, 18 insertions(+), 7 deletions(-) diff --git a/lib/Basic/Targets/SystemZ.cpp b/lib/Basic/Targets/SystemZ.cpp index d86928a633..ad3915e4d5 100644 --- a/lib/Basic/Targets/SystemZ.cpp +++ b/lib/Basic/Targets/SystemZ.cpp @@ -92,7 +92,7 @@ static constexpr ISANameRevision ISARevisions[] = { {{"arch10"}, 10}, {{"zEC12"}, 10}, {{"arch11"}, 11}, {{"z13"}, 11}, {{"arch12"}, 12}, {{"z14"}, 12}, - {{"arch13"}, 13}, + {{"arch13"}, 13}, {{"z15"}, 13} }; int SystemZTargetInfo::getISARevision(StringRef Name) const { diff --git a/test/CodeGen/builtins-systemz-vector3-error.c b/test/CodeGen/builtins-systemz-vector3-error.c index 6583857c3c..99b171c55b 100644 --- a/test/CodeGen/builtins-systemz-vector3-error.c +++ b/test/CodeGen/builtins-systemz-vector3-error.c @@ -1,5 +1,5 @@ // REQUIRES: systemz-registered-target -// RUN: %clang_cc1 -target-cpu arch13 -triple s390x-unknown-unknown \ +// RUN: %clang_cc1 -target-cpu z15 -triple s390x-unknown-unknown \ // RUN: -Wall -Wno-unused -Werror -fsyntax-only -verify %s typedef __attribute__((vector_size(16))) signed char vec_schar; diff --git a/test/CodeGen/builtins-systemz-vector3.c b/test/CodeGen/builtins-systemz-vector3.c index e8194b642c..e4af1c1e54 100644 --- a/test/CodeGen/builtins-systemz-vector3.c +++ b/test/CodeGen/builtins-systemz-vector3.c @@ -1,5 +1,5 @@ // REQUIRES: systemz-registered-target -// RUN: %clang_cc1 -target-cpu arch13 -triple s390x-ibm-linux -flax-vector-conversions=none \ +// RUN: %clang_cc1 -target-cpu z15 -triple s390x-ibm-linux -flax-vector-conversions=none \ // RUN: -Wall -Wno-unused -Werror -emit-llvm %s -o - | FileCheck %s typedef __attribute__((vector_size(16))) signed char vec_schar; diff --git a/test/CodeGen/builtins-systemz-zvector3-error.c b/test/CodeGen/builtins-systemz-zvector3-error.c index 657508b261..557b9a3a7e 100644 --- a/test/CodeGen/builtins-systemz-zvector3-error.c +++ b/test/CodeGen/builtins-systemz-zvector3-error.c @@ -1,5 +1,5 @@ // REQUIRES: systemz-registered-target -// RUN: %clang_cc1 -target-cpu arch13 -triple s390x-linux-gnu \ +// RUN: %clang_cc1 -target-cpu z15 -triple s390x-linux-gnu \ // RUN: -fzvector -flax-vector-conversions=none \ // RUN: -Wall -Wno-unused -Werror -fsyntax-only -verify %s diff --git a/test/CodeGen/builtins-systemz-zvector3.c b/test/CodeGen/builtins-systemz-zvector3.c index db30f41933..a987c6113e 100644 --- a/test/CodeGen/builtins-systemz-zvector3.c +++ b/test/CodeGen/builtins-systemz-zvector3.c @@ -1,8 +1,8 @@ // REQUIRES: systemz-registered-target -// RUN: %clang_cc1 -target-cpu arch13 -triple s390x-linux-gnu \ +// RUN: %clang_cc1 -target-cpu z15 -triple s390x-linux-gnu \ // RUN: -O -fzvector -flax-vector-conversions=none \ // RUN: -Wall -Wno-unused -Werror -emit-llvm %s -o - | FileCheck %s -// RUN: %clang_cc1 -target-cpu arch13 -triple s390x-linux-gnu \ +// RUN: %clang_cc1 -target-cpu z15 -triple s390x-linux-gnu \ // RUN: -O -fzvector -flax-vector-conversions=none \ // RUN: -Wall -Wno-unused -Werror -S %s -o - | FileCheck %s --check-prefix=CHECK-ASM diff --git a/test/CodeGen/systemz-abi-vector.c b/test/CodeGen/systemz-abi-vector.c index 46c008a8d9..f2e6c13c71 100644 --- a/test/CodeGen/systemz-abi-vector.c +++ b/test/CodeGen/systemz-abi-vector.c @@ -10,6 +10,8 @@ // RUN: -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-VECTOR %s // RUN: %clang_cc1 -triple s390x-linux-gnu -target-cpu arch12 \ // RUN: -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-VECTOR %s +// RUN: %clang_cc1 -triple s390x-linux-gnu -target-cpu z15 \ +// RUN: -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-VECTOR %s // RUN: %clang_cc1 -triple s390x-linux-gnu -target-cpu arch13 \ // RUN: -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-VECTOR %s diff --git a/test/CodeGen/systemz-abi.c b/test/CodeGen/systemz-abi.c index c04a51ff6e..3511983e32 100644 --- a/test/CodeGen/systemz-abi.c +++ b/test/CodeGen/systemz-abi.c @@ -10,6 +10,8 @@ // RUN: -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -triple s390x-linux-gnu -target-cpu arch12 \ // RUN: -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple s390x-linux-gnu -target-cpu z15 \ +// RUN: -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -triple s390x-linux-gnu -target-cpu arch13 \ // RUN: -emit-llvm -o - %s | FileCheck %s diff --git a/test/CodeGen/target-data.c b/test/CodeGen/target-data.c index 3e4d054363..21a8b415dc 100644 --- a/test/CodeGen/target-data.c +++ b/test/CodeGen/target-data.c @@ -199,6 +199,8 @@ // RUN: FileCheck %s -check-prefix=SYSTEMZ-VECTOR // RUN: %clang_cc1 -triple s390x-unknown -target-cpu arch12 -o - -emit-llvm %s | \ // RUN: FileCheck %s -check-prefix=SYSTEMZ-VECTOR +// RUN: %clang_cc1 -triple s390x-unknown -target-cpu z15 -o - -emit-llvm %s | \ +// RUN: FileCheck %s -check-prefix=SYSTEMZ-VECTOR // RUN: %clang_cc1 -triple s390x-unknown -target-cpu arch13 -o - -emit-llvm %s | \ // RUN: FileCheck %s -check-prefix=SYSTEMZ-VECTOR // SYSTEMZ-VECTOR: target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64" diff --git a/test/Driver/systemz-march.c b/test/Driver/systemz-march.c index 6b751523c3..f07a2c5013 100644 --- a/test/Driver/systemz-march.c +++ b/test/Driver/systemz-march.c @@ -11,6 +11,7 @@ // RUN: %clang -target s390x -### -S -emit-llvm -march=arch11 %s 2>&1 | FileCheck --check-prefix=CHECK-ARCH11 %s // RUN: %clang -target s390x -### -S -emit-llvm -march=z14 %s 2>&1 | FileCheck --check-prefix=CHECK-Z14 %s // RUN: %clang -target s390x -### -S -emit-llvm -march=arch12 %s 2>&1 | FileCheck --check-prefix=CHECK-ARCH12 %s +// RUN: %clang -target s390x -### -S -emit-llvm -march=z15 %s 2>&1 | FileCheck --check-prefix=CHECK-Z15 %s // RUN: %clang -target s390x -### -S -emit-llvm -march=arch13 %s 2>&1 | FileCheck --check-prefix=CHECK-ARCH13 %s // CHECK-Z9: error: unknown target CPU 'z9' @@ -24,6 +25,7 @@ // CHECK-ARCH11: "-target-cpu" "arch11" // CHECK-Z14: "-target-cpu" "z14" // CHECK-ARCH12: "-target-cpu" "arch12" +// CHECK-Z15: "-target-cpu" "z15" // CHECK-ARCH13: "-target-cpu" "arch13" int x; diff --git a/test/Misc/target-invalid-cpu-note.c b/test/Misc/target-invalid-cpu-note.c index e7dc6ed478..4f8158e502 100644 --- a/test/Misc/target-invalid-cpu-note.c +++ b/test/Misc/target-invalid-cpu-note.c @@ -60,7 +60,7 @@ // RUN: not %clang_cc1 -triple systemz--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix SYSTEMZ // SYSTEMZ: error: unknown target CPU 'not-a-cpu' // SYSTEMZ: note: valid target CPU values are: arch8, z10, arch9, z196, arch10, -// SYSTEMZ-SAME: zEC12, arch11, z13, arch12, z14, arch13 +// SYSTEMZ-SAME: zEC12, arch11, z13, arch12, z14, arch13, z15 // RUN: not %clang_cc1 -triple sparc--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix SPARC // SPARC: error: unknown target CPU 'not-a-cpu' diff --git a/test/Preprocessor/predefined-arch-macros.c b/test/Preprocessor/predefined-arch-macros.c index 5981c80ae3..95bea654fe 100644 --- a/test/Preprocessor/predefined-arch-macros.c +++ b/test/Preprocessor/predefined-arch-macros.c @@ -3242,6 +3242,9 @@ // RUN: %clang -march=arch13 -E -dM %s -o - 2>&1 \ // RUN: -target s390x-unknown-linux \ // RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SYSTEMZ_ARCH13 +// RUN: %clang -march=z15 -E -dM %s -o - 2>&1 \ +// RUN: -target s390x-unknown-linux \ +// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SYSTEMZ_ARCH13 // CHECK_SYSTEMZ_ARCH13: #define __ARCH__ 13 // CHECK_SYSTEMZ_ARCH13: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 // CHECK_SYSTEMZ_ARCH13: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 -- 2.40.0