Skip to content

Commit e6da3ea

Browse files
[fixup] Address review comments, minor tweaks
1 parent 9496937 commit e6da3ea

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

clang/lib/AST/Type.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2579,8 +2579,10 @@ bool Type::isSveVLSBuiltinType() const {
25792579
bool Type::isNeonVectorBuiltinType() const {
25802580
if (const BuiltinType *BT = getAs<BuiltinType>()) {
25812581
switch (BT->getKind()) {
2582-
case BuiltinType::MFloat8x8:
2583-
case BuiltinType::MFloat8x16:
2582+
#define AARCH64_VECTOR_TYPE(Name, MangledName, Id, SingletonId) \
2583+
case BuiltinType::Id:
2584+
#define SVE_TYPE(Name, Id, SingletonId)
2585+
#include "clang/Basic/AArch64SVEACLETypes.def"
25842586
return true;
25852587
default:
25862588
return false;

clang/test/CodeGen/AArch64/builtin-shufflevector-fp8.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ typedef __attribute__((neon_vector_type(16))) signed char int8x16_t;
99
typedef __MFloat8x8_t mfloat8x8_t;
1010
typedef __MFloat8x16_t mfloat8x16_t;
1111

12-
// CHECK-LABEL: define dso_local <8 x i8> @f0(
12+
// CHECK-LABEL: define dso_local <8 x i8> @test_8x8(
1313
// CHECK-SAME: <8 x i8> [[X:%.*]]) #[[ATTR0:[0-9]+]] {
1414
// CHECK-NEXT: [[ENTRY:.*:]]
1515
// CHECK-NEXT: [[SHUFFLE:%.*]] = shufflevector <8 x i8> [[X]], <8 x i8> [[X]], <8 x i32> <i32 3, i32 2, i32 1, i32 0, i32 3, i32 2, i32 1, i32 0>
1616
// CHECK-NEXT: ret <8 x i8> [[SHUFFLE]]
1717
//
18-
mfloat8x8_t f0(mfloat8x8_t x) {
18+
mfloat8x8_t test_8x8(mfloat8x8_t x) {
1919
return __builtin_shufflevector(x, x, 3, 2, 1, 0, 3, 2, 1, 0);
2020
}
2121

22-
// CHECK-LABEL: define dso_local <8 x i8> @f1(
22+
// CHECK-LABEL: define dso_local <8 x i8> @test_8x8_v(
2323
// CHECK-SAME: <8 x i8> [[X:%.*]], <8 x i8> noundef [[P:%.*]]) #[[ATTR0]] {
2424
// CHECK-NEXT: [[ENTRY:.*:]]
2525
// CHECK-NEXT: [[MASK:%.*]] = and <8 x i8> [[P]], splat (i8 7)
@@ -49,22 +49,22 @@ mfloat8x8_t f0(mfloat8x8_t x) {
4949
// CHECK-NEXT: [[SHUF_INS21:%.*]] = insertelement <8 x i8> [[SHUF_INS18]], i8 [[SHUF_ELT20]], i64 7
5050
// CHECK-NEXT: ret <8 x i8> [[SHUF_INS21]]
5151
//
52-
mfloat8x8_t f1(mfloat8x8_t x, int8x8_t p) {
52+
mfloat8x8_t test_8x8_v(mfloat8x8_t x, int8x8_t p) {
5353
return __builtin_shufflevector(x, p);
5454
}
5555

56-
// CHECK-LABEL: define dso_local <16 x i8> @f3(
56+
// CHECK-LABEL: define dso_local <16 x i8> @test_8x16(
5757
// CHECK-SAME: <16 x i8> [[X:%.*]]) #[[ATTR0]] {
5858
// CHECK-NEXT: [[ENTRY:.*:]]
5959
// CHECK-NEXT: [[SHUFFLE:%.*]] = shufflevector <16 x i8> [[X]], <16 x i8> [[X]], <16 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
6060
// CHECK-NEXT: ret <16 x i8> [[SHUFFLE]]
6161
//
62-
mfloat8x16_t f3(mfloat8x16_t x) {
62+
mfloat8x16_t test_8x16(mfloat8x16_t x) {
6363
return __builtin_shufflevector(x, x, 7, 6, 5, 4, 3, 2, 1, 0, 7, 6, 5, 4, 3, 2,
6464
1, 0);
6565
}
6666

67-
// CHECK-LABEL: define dso_local <16 x i8> @f4(
67+
// CHECK-LABEL: define dso_local <16 x i8> @test_8x16_v(
6868
// CHECK-SAME: <16 x i8> [[X:%.*]], <16 x i8> noundef [[P:%.*]]) #[[ATTR0]] {
6969
// CHECK-NEXT: [[ENTRY:.*:]]
7070
// CHECK-NEXT: [[MASK:%.*]] = and <16 x i8> [[P]], splat (i8 15)
@@ -118,6 +118,6 @@ mfloat8x16_t f3(mfloat8x16_t x) {
118118
// CHECK-NEXT: [[SHUF_INS45:%.*]] = insertelement <16 x i8> [[SHUF_INS42]], i8 [[SHUF_ELT44]], i64 15
119119
// CHECK-NEXT: ret <16 x i8> [[SHUF_INS45]]
120120
//
121-
mfloat8x16_t f4(mfloat8x16_t x, int8x16_t p) {
121+
mfloat8x16_t test_8x16_v(mfloat8x16_t x, int8x16_t p) {
122122
return __builtin_shufflevector(x, p);
123123
}

clang/test/Sema/builtin-shufflevector.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ typedef __attribute__((neon_vector_type(8))) signed char int8x8_t;
66
typedef __attribute__((neon_vector_type(16))) signed char int8x16_t;
77

88
typedef __MFloat8x8_t mfloat8x8_t;
9-
typedef __MFloat8x16_t mfloat8x16_t;
109

1110
int8x8_t non_vector(int x) {
1211
return __builtin_shufflevector(x, x, 3, 2, 1, 0, 3, 2, 1, 0);

0 commit comments

Comments
 (0)