Просмотр исходного кода

[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
Ulrich Weigand 6 лет назад
Родитель
Сommit
284e55561b

+ 1 - 1
lib/Basic/Targets/SystemZ.cpp

@@ -92,7 +92,7 @@ static constexpr ISANameRevision ISARevisions[] = {
   {{"arch10"}, 10}, {{"zEC12"}, 10},
   {{"arch10"}, 10}, {{"zEC12"}, 10},
   {{"arch11"}, 11}, {{"z13"}, 11},
   {{"arch11"}, 11}, {{"z13"}, 11},
   {{"arch12"}, 12}, {{"z14"}, 12},
   {{"arch12"}, 12}, {{"z14"}, 12},
-  {{"arch13"}, 13},
+  {{"arch13"}, 13}, {{"z15"}, 13}
 };
 };
 
 
 int SystemZTargetInfo::getISARevision(StringRef Name) const {
 int SystemZTargetInfo::getISARevision(StringRef Name) const {

+ 1 - 1
test/CodeGen/builtins-systemz-vector3-error.c

@@ -1,5 +1,5 @@
 // REQUIRES: systemz-registered-target
 // 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
 // RUN: -Wall -Wno-unused -Werror -fsyntax-only -verify %s
 
 
 typedef __attribute__((vector_size(16))) signed char vec_schar;
 typedef __attribute__((vector_size(16))) signed char vec_schar;

+ 1 - 1
test/CodeGen/builtins-systemz-vector3.c

@@ -1,5 +1,5 @@
 // REQUIRES: systemz-registered-target
 // 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
 // RUN: -Wall -Wno-unused -Werror -emit-llvm %s -o - | FileCheck %s
 
 
 typedef __attribute__((vector_size(16))) signed char vec_schar;
 typedef __attribute__((vector_size(16))) signed char vec_schar;

+ 1 - 1
test/CodeGen/builtins-systemz-zvector3-error.c

@@ -1,5 +1,5 @@
 // REQUIRES: systemz-registered-target
 // 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: -fzvector -flax-vector-conversions=none \
 // RUN: -Wall -Wno-unused -Werror -fsyntax-only -verify %s
 // RUN: -Wall -Wno-unused -Werror -fsyntax-only -verify %s
 
 

+ 2 - 2
test/CodeGen/builtins-systemz-zvector3.c

@@ -1,8 +1,8 @@
 // REQUIRES: systemz-registered-target
 // 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: -O -fzvector -flax-vector-conversions=none \
 // RUN: -Wall -Wno-unused -Werror -emit-llvm %s -o - | FileCheck %s
 // 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: -O -fzvector -flax-vector-conversions=none \
 // RUN: -Wall -Wno-unused -Werror -S %s -o - | FileCheck %s --check-prefix=CHECK-ASM
 // RUN: -Wall -Wno-unused -Werror -S %s -o - | FileCheck %s --check-prefix=CHECK-ASM
 
 

+ 2 - 0
test/CodeGen/systemz-abi-vector.c

@@ -10,6 +10,8 @@
 // RUN:   -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-VECTOR %s
 // RUN:   -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-VECTOR %s
 // RUN: %clang_cc1 -triple s390x-linux-gnu -target-cpu arch12 \
 // RUN: %clang_cc1 -triple s390x-linux-gnu -target-cpu arch12 \
 // RUN:   -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-VECTOR %s
 // 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: %clang_cc1 -triple s390x-linux-gnu -target-cpu arch13 \
 // RUN:   -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-VECTOR %s
 // RUN:   -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-VECTOR %s
 
 

+ 2 - 0
test/CodeGen/systemz-abi.c

@@ -10,6 +10,8 @@
 // RUN:   -emit-llvm -o - %s | FileCheck %s
 // RUN:   -emit-llvm -o - %s | FileCheck %s
 // RUN: %clang_cc1 -triple s390x-linux-gnu -target-cpu arch12 \
 // RUN: %clang_cc1 -triple s390x-linux-gnu -target-cpu arch12 \
 // RUN:   -emit-llvm -o - %s | FileCheck %s
 // 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: %clang_cc1 -triple s390x-linux-gnu -target-cpu arch13 \
 // RUN:   -emit-llvm -o - %s | FileCheck %s
 // RUN:   -emit-llvm -o - %s | FileCheck %s
 
 

+ 2 - 0
test/CodeGen/target-data.c

@@ -199,6 +199,8 @@
 // RUN: FileCheck %s -check-prefix=SYSTEMZ-VECTOR
 // RUN: FileCheck %s -check-prefix=SYSTEMZ-VECTOR
 // RUN: %clang_cc1 -triple s390x-unknown -target-cpu arch12 -o - -emit-llvm %s | \
 // RUN: %clang_cc1 -triple s390x-unknown -target-cpu arch12 -o - -emit-llvm %s | \
 // RUN: FileCheck %s -check-prefix=SYSTEMZ-VECTOR
 // 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: %clang_cc1 -triple s390x-unknown -target-cpu arch13 -o - -emit-llvm %s | \
 // RUN: FileCheck %s -check-prefix=SYSTEMZ-VECTOR
 // 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"
 // SYSTEMZ-VECTOR: target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64"

+ 2 - 0
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=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=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=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
 // 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'
 // CHECK-Z9: error: unknown target CPU 'z9'
@@ -24,6 +25,7 @@
 // CHECK-ARCH11: "-target-cpu" "arch11"
 // CHECK-ARCH11: "-target-cpu" "arch11"
 // CHECK-Z14: "-target-cpu" "z14"
 // CHECK-Z14: "-target-cpu" "z14"
 // CHECK-ARCH12: "-target-cpu" "arch12"
 // CHECK-ARCH12: "-target-cpu" "arch12"
+// CHECK-Z15: "-target-cpu" "z15"
 // CHECK-ARCH13: "-target-cpu" "arch13"
 // CHECK-ARCH13: "-target-cpu" "arch13"
 
 
 int x;
 int x;

+ 1 - 1
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
 // 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: error: unknown target CPU 'not-a-cpu'
 // SYSTEMZ: note: valid target CPU values are: arch8, z10, arch9, z196, arch10,
 // 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
 // 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'
 // SPARC: error: unknown target CPU 'not-a-cpu'

+ 3 - 0
test/Preprocessor/predefined-arch-macros.c

@@ -3242,6 +3242,9 @@
 // RUN: %clang -march=arch13 -E -dM %s -o - 2>&1 \
 // RUN: %clang -march=arch13 -E -dM %s -o - 2>&1 \
 // RUN:     -target s390x-unknown-linux \
 // RUN:     -target s390x-unknown-linux \
 // RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_SYSTEMZ_ARCH13
 // 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 __ARCH__ 13
 // CHECK_SYSTEMZ_ARCH13: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
 // CHECK_SYSTEMZ_ARCH13: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
 // CHECK_SYSTEMZ_ARCH13: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
 // CHECK_SYSTEMZ_ARCH13: #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1