Skip to content

Commit 80267f8

Browse files
authored
Support z17 processor name and scheduler description (#135254)
The recently announced IBM z17 processor implements the architecture already supported as "arch15" in LLVM. This patch adds support for "z17" as an alternate architecture name for arch15. This patch also add the scheduler description for the z17 processor, provided by Jonas Paulsson.
1 parent 324083b commit 80267f8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1940
-174
lines changed

clang/lib/Basic/Targets/SystemZ.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ static constexpr ISANameRevision ISARevisions[] = {
114114
{{"arch12"}, 12}, {{"z14"}, 12},
115115
{{"arch13"}, 13}, {{"z15"}, 13},
116116
{{"arch14"}, 14}, {{"z16"}, 14},
117-
{{"arch15"}, 15},
117+
{{"arch15"}, 15}, {{"z17"}, 15},
118118
};
119119

120120
int SystemZTargetInfo::getISARevision(StringRef Name) const {

clang/test/CodeGen/SystemZ/builtins-systemz-bitop.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// REQUIRES: systemz-registered-target
2-
// RUN: %clang_cc1 -target-cpu arch15 -triple s390x-ibm-linux -Wall -Wno-unused -Werror -emit-llvm %s -o - | FileCheck %s
3-
// RUN: %clang_cc1 -target-cpu arch15 -triple s390x-ibm-linux -Wall -Wno-unused -Werror -emit-llvm -x c++ %s -o - | FileCheck %s
2+
// RUN: %clang_cc1 -target-cpu z17 -triple s390x-ibm-linux -Wall -Wno-unused -Werror -emit-llvm %s -o - | FileCheck %s
3+
// RUN: %clang_cc1 -target-cpu z17 -triple s390x-ibm-linux -Wall -Wno-unused -Werror -emit-llvm -x c++ %s -o - | FileCheck %s
44

55
unsigned long test_bdepg(unsigned long a, unsigned long b) {
66
// CHECK-LABEL: test_bdepg

clang/test/CodeGen/SystemZ/builtins-systemz-vector5-error.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// REQUIRES: systemz-registered-target
2-
// RUN: %clang_cc1 -target-cpu arch15 -triple s390x-unknown-unknown \
2+
// RUN: %clang_cc1 -target-cpu z17 -triple s390x-unknown-unknown \
33
// RUN: -Wall -Wno-unused -Werror -fsyntax-only -verify %s
44

55
typedef __attribute__((vector_size(16))) signed char vec_schar;

clang/test/CodeGen/SystemZ/builtins-systemz-vector5.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// REQUIRES: systemz-registered-target
2-
// RUN: %clang_cc1 -target-cpu arch15 -triple s390x-ibm-linux -flax-vector-conversions=none \
2+
// RUN: %clang_cc1 -target-cpu z17 -triple s390x-ibm-linux -flax-vector-conversions=none \
33
// RUN: -Wall -Wno-unused -Werror -emit-llvm %s -o - | FileCheck %s
44

55
typedef __attribute__((vector_size(16))) signed char vec_schar;

clang/test/CodeGen/SystemZ/builtins-systemz-zvector5-error.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// REQUIRES: systemz-registered-target
2-
// RUN: %clang_cc1 -target-cpu arch15 -triple s390x-linux-gnu \
2+
// RUN: %clang_cc1 -target-cpu z17 -triple s390x-linux-gnu \
33
// RUN: -fzvector -flax-vector-conversions=none \
44
// RUN: -Wall -Wno-unused -Werror -fsyntax-only -verify %s
55

clang/test/CodeGen/SystemZ/builtins-systemz-zvector5.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// REQUIRES: systemz-registered-target
2-
// RUN: %clang_cc1 -target-cpu arch15 -triple s390x-linux-gnu \
2+
// RUN: %clang_cc1 -target-cpu z17 -triple s390x-linux-gnu \
33
// RUN: -O2 -fzvector -flax-vector-conversions=none \
44
// RUN: -Wall -Wno-unused -Werror -emit-llvm %s -o - | FileCheck %s
5-
// RUN: %clang_cc1 -target-cpu arch15 -triple s390x-linux-gnu \
5+
// RUN: %clang_cc1 -target-cpu z17 -triple s390x-linux-gnu \
66
// RUN: -O2 -fzvector -flax-vector-conversions=none \
77
// RUN: -Wall -Wno-unused -Werror -S %s -o - | FileCheck %s --check-prefix=CHECK-ASM
88

clang/test/CodeGen/SystemZ/systemz-abi-vector.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
// RUN: -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-VECTOR %s
1919
// RUN: %clang_cc1 -no-enable-noundef-analysis -triple s390x-linux-gnu -target-cpu arch14 \
2020
// RUN: -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-VECTOR %s
21+
// RUN: %clang_cc1 -no-enable-noundef-analysis -triple s390x-linux-gnu -target-cpu z17 \
22+
// RUN: -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-VECTOR %s
2123
// RUN: %clang_cc1 -no-enable-noundef-analysis -triple s390x-linux-gnu -target-cpu arch15 \
2224
// RUN: -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-VECTOR %s
2325

clang/test/CodeGen/SystemZ/systemz-abi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
// RUN: %clang_cc1 -no-enable-noundef-analysis -triple s390x-linux-gnu -target-cpu arch14 \
2525
// RUN: -emit-llvm -o - %s -mfloat-abi soft | FileCheck %s \
2626
// RUN: --check-prefixes=CHECK,SOFT-FLOAT
27+
// RUN: %clang_cc1 -no-enable-noundef-analysis -triple s390x-linux-gnu -target-cpu z17 \
28+
// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,HARD-FLOAT
2729
// RUN: %clang_cc1 -no-enable-noundef-analysis -triple s390x-linux-gnu -target-cpu arch15 \
2830
// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,HARD-FLOAT
2931
// RUN: %clang_cc1 -no-enable-noundef-analysis -triple s390x-linux-gnu -target-cpu arch15 \

clang/test/Driver/systemz-march.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
// RUN: %clang -target s390x -### -S -emit-llvm -march=arch13 %s 2>&1 | FileCheck --check-prefix=CHECK-ARCH13 %s
1616
// RUN: %clang -target s390x -### -S -emit-llvm -march=z16 %s 2>&1 | FileCheck --check-prefix=CHECK-Z16 %s
1717
// RUN: %clang -target s390x -### -S -emit-llvm -march=arch14 %s 2>&1 | FileCheck --check-prefix=CHECK-ARCH14 %s
18+
// RUN: %clang -target s390x -### -S -emit-llvm -march=z17 %s 2>&1 | FileCheck --check-prefix=CHECK-Z17 %s
1819
// RUN: %clang -target s390x -### -S -emit-llvm -march=arch15 %s 2>&1 | FileCheck --check-prefix=CHECK-ARCH15 %s
1920

2021
// CHECK-Z9: error: unknown target CPU 'z9'
@@ -32,6 +33,7 @@
3233
// CHECK-ARCH13: "-target-cpu" "arch13"
3334
// CHECK-Z16: "-target-cpu" "z16"
3435
// CHECK-ARCH14: "-target-cpu" "arch14"
36+
// CHECK-Z17: "-target-cpu" "z17"
3537
// CHECK-ARCH15: "-target-cpu" "arch15"
3638

3739
int x;

clang/test/Misc/target-invalid-cpu-note/systemz.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@
2020
// CHECK-SAME: {{^}}, arch14
2121
// CHECK-SAME: {{^}}, z16
2222
// CHECK-SAME: {{^}}, arch15
23+
// CHECK-SAME: {{^}}, z17
2324
// CHECK-SAME: {{$}}

0 commit comments

Comments
 (0)