Skip to content

Commit e4e2a99

Browse files
committed
[AArch64][Clang] Update new Neon vector element types.
This updates the element types used in the new __Int8x8_t types added in llvm#126945, mostly to allow C++ name mangling in ItaniumMangling mangleAArch64VectorBase to work correctly. Char is replaced by SignedCharTy or UnsignedCharTy as required and Float16Ty is better using HalfTy to match the vector types. Same for Long types.
1 parent 3894bdc commit e4e2a99

File tree

3 files changed

+538
-65
lines changed

3 files changed

+538
-65
lines changed

clang/include/clang/Basic/AArch64ACLETypes.def

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -123,31 +123,31 @@
123123

124124
//===- Neon Vector point types --------------------------------------------===//
125125

126-
NEON_VECTOR_TYPE(__Int8x8_t, CharTy, 8, 8, VectorKind::Neon)
126+
NEON_VECTOR_TYPE(__Int8x8_t, SignedCharTy, 8, 8, VectorKind::Neon)
127127
NEON_VECTOR_TYPE(__Int16x4_t, ShortTy, 16, 4, VectorKind::Neon)
128128
NEON_VECTOR_TYPE(__Int32x2_t, IntTy, 32, 2, VectorKind::Neon)
129-
NEON_VECTOR_TYPE(__Uint8x8_t, CharTy, 8, 8, VectorKind::Neon)
129+
NEON_VECTOR_TYPE(__Uint8x8_t, UnsignedCharTy, 8, 8, VectorKind::Neon)
130130
NEON_VECTOR_TYPE(__Uint16x4_t, UnsignedShortTy, 16, 4, VectorKind::Neon)
131131
NEON_VECTOR_TYPE(__Uint32x2_t, UnsignedIntTy, 32, 2, VectorKind::Neon)
132-
NEON_VECTOR_TYPE(__Float16x4_t, Float16Ty, 16, 4, VectorKind::Neon)
132+
NEON_VECTOR_TYPE(__Float16x4_t, HalfTy, 16, 4, VectorKind::Neon)
133133
NEON_VECTOR_TYPE(__Float32x2_t, FloatTy, 32, 2, VectorKind::Neon)
134-
NEON_VECTOR_TYPE(__Poly8x8_t, CharTy, 8, 8, VectorKind::NeonPoly)
134+
NEON_VECTOR_TYPE(__Poly8x8_t, UnsignedCharTy, 8, 8, VectorKind::NeonPoly)
135135
NEON_VECTOR_TYPE(__Poly16x4_t, UnsignedShortTy, 16, 4, VectorKind::NeonPoly)
136136
NEON_VECTOR_TYPE(__Bfloat16x4_t, BFloat16Ty, 16, 4, VectorKind::Neon)
137-
NEON_VECTOR_TYPE(__Int8x16_t, CharTy, 8, 16, VectorKind::Neon)
137+
NEON_VECTOR_TYPE(__Int8x16_t, SignedCharTy, 8, 16, VectorKind::Neon)
138138
NEON_VECTOR_TYPE(__Int16x8_t, ShortTy, 16, 8, VectorKind::Neon)
139139
NEON_VECTOR_TYPE(__Int32x4_t, IntTy, 32, 4, VectorKind::Neon)
140-
NEON_VECTOR_TYPE(__Int64x2_t, LongLongTy, 64, 2, VectorKind::Neon)
141-
NEON_VECTOR_TYPE(__Uint8x16_t, CharTy, 8, 16, VectorKind::Neon)
140+
NEON_VECTOR_TYPE(__Int64x2_t, LongTy, 64, 2, VectorKind::Neon)
141+
NEON_VECTOR_TYPE(__Uint8x16_t, UnsignedCharTy, 8, 16, VectorKind::Neon)
142142
NEON_VECTOR_TYPE(__Uint16x8_t, UnsignedShortTy, 16, 8, VectorKind::Neon)
143143
NEON_VECTOR_TYPE(__Uint32x4_t, UnsignedIntTy, 32, 4, VectorKind::Neon)
144-
NEON_VECTOR_TYPE(__Uint64x2_t, UnsignedLongLongTy, 64, 2, VectorKind::Neon)
145-
NEON_VECTOR_TYPE(__Float16x8_t, Float16Ty, 16, 8, VectorKind::Neon)
144+
NEON_VECTOR_TYPE(__Uint64x2_t, UnsignedLongTy, 64, 2, VectorKind::Neon)
145+
NEON_VECTOR_TYPE(__Float16x8_t, HalfTy, 16, 8, VectorKind::Neon)
146146
NEON_VECTOR_TYPE(__Float32x4_t, FloatTy, 32, 4, VectorKind::Neon)
147147
NEON_VECTOR_TYPE(__Float64x2_t, DoubleTy, 64, 2, VectorKind::Neon)
148-
NEON_VECTOR_TYPE(__Poly8x16_t, CharTy, 8, 16, VectorKind::NeonPoly)
148+
NEON_VECTOR_TYPE(__Poly8x16_t, UnsignedCharTy, 8, 16, VectorKind::NeonPoly)
149149
NEON_VECTOR_TYPE(__Poly16x8_t, UnsignedShortTy, 16, 8, VectorKind::NeonPoly)
150-
NEON_VECTOR_TYPE(__Poly64x2_t, UnsignedLongLongTy, 64, 2, VectorKind::NeonPoly)
150+
NEON_VECTOR_TYPE(__Poly64x2_t, UnsignedLongTy, 64, 2, VectorKind::NeonPoly)
151151
NEON_VECTOR_TYPE(__Bfloat16x8_t, BFloat16Ty, 16, 8, VectorKind::Neon)
152152
NEON_VECTOR_TYPE(__Mfloat8x8_t, MFloat8Ty, 8, 8, VectorKind::Neon)
153153
NEON_VECTOR_TYPE(__Mfloat8x16_t, MFloat8Ty, 8, 16, VectorKind::Neon)

clang/test/AST/ast-dump-aarch64-neon-types.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// RUN: %clang_cc1 -verify -verify-ignore-unexpected=note -triple arm-linux-gnu %s -x c++
1010

1111
__Int8x8_t Int8x8;
12-
// CHECK: Int8x8 '__Int8x8_t':'__attribute__((neon_vector_type(8))) char'
12+
// CHECK: Int8x8 '__Int8x8_t':'__attribute__((neon_vector_type(8))) signed char'
1313
// expected-error@-2{{unknown type name '__Int8x8_t'}}
1414

1515
__Int16x4_t Int16x4;
@@ -21,7 +21,7 @@ __Int32x2_t Int32x2;
2121
// expected-error@-2{{unknown type name '__Int32x2_t'}}
2222

2323
__Uint8x8_t Uint8x8;
24-
// CHECK: Uint8x8 '__Uint8x8_t':'__attribute__((neon_vector_type(8))) char'
24+
// CHECK: Uint8x8 '__Uint8x8_t':'__attribute__((neon_vector_type(8))) unsigned char'
2525
// expected-error@-2{{unknown type name '__Uint8x8_t'}}
2626

2727
__Uint16x4_t Uint16x4;
@@ -33,15 +33,15 @@ __Uint32x2_t Uint32x2;
3333
// expected-error@-2{{unknown type name '__Uint32x2_t'}}
3434

3535
__Float16x4_t Float16x4;
36-
// CHECK: Float16x4 '__Float16x4_t':'__attribute__((neon_vector_type(4))) _Float16'
36+
// CHECK: Float16x4 '__Float16x4_t':'__attribute__((neon_vector_type(4))) __fp16'
3737
// expected-error@-2{{unknown type name '__Float16x4_t'}}
3838

3939
__Float32x2_t Float32x2;
4040
// CHECK: Float32x2 '__Float32x2_t':'__attribute__((neon_vector_type(2))) float'
4141
// expected-error@-2{{unknown type name '__Float32x2_t'}}
4242

4343
__Poly8x8_t Poly8x8;
44-
// CHECK: Poly8x8 '__Poly8x8_t':'__attribute__((neon_polyvector_type(8))) char'
44+
// CHECK: Poly8x8 '__Poly8x8_t':'__attribute__((neon_polyvector_type(8))) unsigned char'
4545
// expected-error@-2{{unknown type name '__Poly8x8_t'}}
4646

4747
__Poly16x4_t Poly16x4;
@@ -53,7 +53,7 @@ __Bfloat16x4_t Bfloat16x4;
5353
// expected-error@-2{{unknown type name '__Bfloat16x4_t'}}
5454

5555
__Int8x16_t Int8x16;
56-
// CHECK: Int8x16 '__Int8x16_t':'__attribute__((neon_vector_type(16))) char'
56+
// CHECK: Int8x16 '__Int8x16_t':'__attribute__((neon_vector_type(16))) signed char'
5757
// expected-error@-2{{unknown type name '__Int8x16_t'}}
5858

5959
__Int16x8_t Int16x8;
@@ -65,11 +65,11 @@ __Int32x4_t Int32x4;
6565
// expected-error@-2{{unknown type name '__Int32x4_t'}}
6666

6767
__Int64x2_t Int64x2;
68-
// CHECK: Int64x2 '__Int64x2_t':'__attribute__((neon_vector_type(2))) long long'
68+
// CHECK: Int64x2 '__Int64x2_t':'__attribute__((neon_vector_type(2))) long'
6969
// expected-error@-2{{unknown type name '__Int64x2_t'}}
7070

7171
__Uint8x16_t Uint8x16;
72-
// CHECK: Uint8x16 '__Uint8x16_t':'__attribute__((neon_vector_type(16))) char'
72+
// CHECK: Uint8x16 '__Uint8x16_t':'__attribute__((neon_vector_type(16))) unsigned char'
7373
// expected-error@-2{{unknown type name '__Uint8x16_t'}}
7474

7575
__Uint16x8_t Uint16x8;
@@ -81,11 +81,11 @@ __Uint32x4_t Uint32x4;
8181
// expected-error@-2{{unknown type name '__Uint32x4_t'}}
8282

8383
__Uint64x2_t Uint64x2;
84-
// CHECK: Uint64x2 '__Uint64x2_t':'__attribute__((neon_vector_type(2))) unsigned long long'
84+
// CHECK: Uint64x2 '__Uint64x2_t':'__attribute__((neon_vector_type(2))) unsigned long'
8585
// expected-error@-2{{unknown type name '__Uint64x2_t'}}
8686

8787
__Float16x8_t Float16x8;
88-
// CHECK: Float16x8 '__Float16x8_t':'__attribute__((neon_vector_type(8))) _Float16'
88+
// CHECK: Float16x8 '__Float16x8_t':'__attribute__((neon_vector_type(8))) __fp16'
8989
// expected-error@-2{{unknown type name '__Float16x8_t'}}
9090

9191
__Float32x4_t Float32x4;
@@ -97,15 +97,15 @@ __Float64x2_t Float64x2;
9797
// expected-error@-2{{unknown type name '__Float64x2_t'}}
9898

9999
__Poly8x16_t Poly8x16;
100-
// CHECK: Poly8x16 '__Poly8x16_t':'__attribute__((neon_polyvector_type(16))) char'
100+
// CHECK: Poly8x16 '__Poly8x16_t':'__attribute__((neon_polyvector_type(16))) unsigned char'
101101
// expected-error@-2{{unknown type name '__Poly8x16_t'}}
102102

103103
__Poly16x8_t Poly16x8;
104104
// CHECK: Poly16x8 '__Poly16x8_t':'__attribute__((neon_polyvector_type(8))) unsigned short'
105105
// expected-error@-2{{unknown type name '__Poly16x8_t'}}
106106

107107
__Poly64x2_t Poly64x2;
108-
// CHECK: Poly64x2 '__Poly64x2_t':'__attribute__((neon_polyvector_type(2))) unsigned long long'
108+
// CHECK: Poly64x2 '__Poly64x2_t':'__attribute__((neon_polyvector_type(2))) unsigned long'
109109
// expected-error@-2{{unknown type name '__Poly64x2_t'}}
110110

111111
__Bfloat16x8_t Bfloat16x8;

0 commit comments

Comments
 (0)