Skip to content

Commit 410d782

Browse files
tmatheson-armdavemgreen
authored andcommitted
Add missing Neon Types
The AAPCS64 adds a number of vector types to the C unconditionally: https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#11appendix-support-for-advanced-simd-extensions The equivalent SVE types are already available in clang: https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#12appendix-support-for-scalable-vectors __mfp8 is defined in the ACLE https://arm-software.github.io/acle/main/acle.html#data-types I'm not sure whether __mfp8 should be defined for A32. For now I have left it as it is.
1 parent 21b4059 commit 410d782

14 files changed

+241
-3
lines changed

clang/include/clang/Basic/AArch64SVEACLETypes.def

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,42 @@ SVE_OPAQUE_TYPE(__SVCount_t, __SVCount_t, SveCount, SveCountTy)
201201

202202
SVE_SCALAR_TYPE(__mfp8, __mfp8, MFloat8, MFloat8Ty, 8)
203203

204+
// Unlike the SVE types above, the Neon vector types are parsed as keywords and
205+
// mapped to the equivalent __attribute__(neon_vector_type(...)) vector type.
206+
// They are not builtin types.
207+
#ifndef NEON_VECTOR_TYPE
208+
#define NEON_VECTOR_TYPE(Name, BaseType, ElBits, NumEls, VectorKind)
209+
#endif
210+
NEON_VECTOR_TYPE(__Int8x8_t, CharTy, 8, 8, VectorKind::Neon)
211+
NEON_VECTOR_TYPE(__Int16x4_t, ShortTy, 16, 4, VectorKind::Neon)
212+
NEON_VECTOR_TYPE(__Int32x2_t, IntTy, 32, 2, VectorKind::Neon)
213+
NEON_VECTOR_TYPE(__Uint8x8_t, CharTy, 8, 8, VectorKind::Neon)
214+
NEON_VECTOR_TYPE(__Uint16x4_t, UnsignedShortTy, 16, 4, VectorKind::Neon)
215+
NEON_VECTOR_TYPE(__Uint32x2_t, UnsignedIntTy, 32, 2, VectorKind::Neon)
216+
NEON_VECTOR_TYPE(__Float16x4_t, Float16Ty, 16, 4, VectorKind::Neon)
217+
NEON_VECTOR_TYPE(__Float32x2_t, FloatTy, 32, 2, VectorKind::Neon)
218+
NEON_VECTOR_TYPE(__Poly8x8_t, CharTy, 8, 8, VectorKind::NeonPoly)
219+
NEON_VECTOR_TYPE(__Poly16x4_t, UnsignedShortTy, 16, 4, VectorKind::NeonPoly)
220+
NEON_VECTOR_TYPE(__Bfloat16x4_t, BFloat16Ty, 16, 4, VectorKind::Neon)
221+
NEON_VECTOR_TYPE(__Int8x16_t, CharTy, 8, 16, VectorKind::Neon)
222+
NEON_VECTOR_TYPE(__Int16x8_t, ShortTy, 16, 8, VectorKind::Neon)
223+
NEON_VECTOR_TYPE(__Int32x4_t, IntTy, 32, 4, VectorKind::Neon)
224+
NEON_VECTOR_TYPE(__Int64x2_t, LongLongTy, 64, 2, VectorKind::Neon)
225+
NEON_VECTOR_TYPE(__Uint8x16_t, CharTy, 8, 16, VectorKind::Neon)
226+
NEON_VECTOR_TYPE(__Uint16x8_t, UnsignedShortTy, 16, 8, VectorKind::Neon)
227+
NEON_VECTOR_TYPE(__Uint32x4_t, UnsignedIntTy, 32, 4, VectorKind::Neon)
228+
NEON_VECTOR_TYPE(__Uint64x2_t, UnsignedLongLongTy, 64, 2, VectorKind::Neon)
229+
NEON_VECTOR_TYPE(__Float16x8_t, Float16Ty, 16, 8, VectorKind::Neon)
230+
NEON_VECTOR_TYPE(__Float32x4_t, FloatTy, 32, 4, VectorKind::Neon)
231+
NEON_VECTOR_TYPE(__Float64x2_t, DoubleTy, 64, 2, VectorKind::Neon)
232+
NEON_VECTOR_TYPE(__Poly8x16_t, CharTy, 8, 16, VectorKind::NeonPoly)
233+
NEON_VECTOR_TYPE(__Poly16x8_t, UnsignedShortTy, 16, 8, VectorKind::NeonPoly)
234+
NEON_VECTOR_TYPE(__Poly64x2_t, UnsignedLongLongTy, 64, 2, VectorKind::NeonPoly)
235+
NEON_VECTOR_TYPE(__Bfloat16x8_t, BFloat16Ty, 16, 8, VectorKind::Neon)
236+
NEON_VECTOR_TYPE(__Mfloat8x8_t, MFloat8Ty, 8, 8, VectorKind::Neon)
237+
NEON_VECTOR_TYPE(__Mfloat8x16_t, MFloat8Ty, 16, 8, VectorKind::Neon)
238+
239+
#undef NEON_VECTOR_TYPE
204240
#undef SVE_VECTOR_TYPE
205241
#undef SVE_VECTOR_TYPE_MFLOAT
206242
#undef SVE_VECTOR_TYPE_BFLOAT

clang/include/clang/Basic/LangOptions.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,7 @@ COMPATIBLE_VALUE_LANGOPT(FunctionAlignment, 5, 0, "Default alignment for functio
463463
COMPATIBLE_VALUE_LANGOPT(LoopAlignment, 32, 0, "Default alignment for loops")
464464

465465
LANGOPT(FixedPoint, 1, 0, "fixed point types")
466+
LANGOPT(ACLE, 1, 0, "Arm C Language Extensions")
466467
LANGOPT(PaddingOnUnsignedFixedPoint, 1, 0,
467468
"unsigned fixed point types having one extra padding bit")
468469

clang/include/clang/Basic/Specifiers.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ namespace clang {
9898
#define GENERIC_IMAGE_TYPE(ImgType, Id) \
9999
TST_##ImgType##_t, // OpenCL image types
100100
#include "clang/Basic/OpenCLImageTypes.def"
101+
102+
#define NEON_VECTOR_TYPE(Name, BaseType, ElBits, NumEls, VectorKind) \
103+
TST_##Name,
104+
#define SVE_TYPE(Name, Id, SingletonId)
105+
#include "clang/Basic/AArch64SVEACLETypes.def"
106+
101107
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) \
102108
TST_##Name, // HLSL Intangible Types
103109
#include "clang/Basic/HLSLIntangibleTypes.def"

clang/include/clang/Basic/TokenKinds.def

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,12 @@ KEYWORD(__bool , KEYALTIVEC|KEYZVECTOR)
687687
ALIAS("__fp16", half , KEYALL)
688688
KEYWORD(__bf16 , KEYALL)
689689

690+
// ARM NEON types
691+
#define NEON_VECTOR_TYPE(Name, BaseType, ElBits, NumEls, VectorKind) \
692+
KEYWORD(Name, KEYACLE)
693+
#define SVE_TYPE(Name, Id, SingletonId)
694+
#include "clang/Basic/AArch64SVEACLETypes.def"
695+
690696
// OpenCL Extension.
691697
KEYWORD(half , HALFSUPPORT)
692698

clang/include/clang/Sema/DeclSpec.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,12 @@ class DeclSpec {
321321
#define GENERIC_IMAGE_TYPE(ImgType, Id) \
322322
static const TST TST_##ImgType##_t = clang::TST_##ImgType##_t;
323323
#include "clang/Basic/OpenCLImageTypes.def"
324+
325+
#define NEON_VECTOR_TYPE(Name, BaseType, ElBits, NumEls, VectorKind) \
326+
static const TST TST_##Name = clang::TST_##Name;
327+
#define SVE_TYPE(Name, Id, SingletonId)
328+
#include "clang/Basic/AArch64SVEACLETypes.def"
329+
324330
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) \
325331
static const TST TST_##Name = clang::TST_##Name;
326332
#include "clang/Basic/HLSLIntangibleTypes.def"

clang/lib/AST/ASTContext.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1450,11 +1450,19 @@ void ASTContext::InitBuiltinTypes(const TargetInfo &Target,
14501450

14511451
if (Target.hasAArch64SVETypes() ||
14521452
(AuxTarget && AuxTarget->hasAArch64SVETypes())) {
1453-
#define SVE_TYPE(Name, Id, SingletonId) \
1454-
InitBuiltinType(SingletonId, BuiltinType::Id);
1453+
#define SVE_VECTOR_TYPE(Name, MangledName, Id, SingletonId) \
1454+
InitBuiltinType(SingletonId, BuiltinType::Id);
1455+
#define SVE_PREDICATE_TYPE(Name, MangledName, Id, SingletonId) \
1456+
InitBuiltinType(SingletonId, BuiltinType::Id);
1457+
#define SVE_OPAQUE_TYPE(Name, MangledName, Id, SingletonId) \
1458+
InitBuiltinType(SingletonId, BuiltinType::Id);
1459+
#define SVE_TYPE(Name, MangledName, SingletonId)
14551460
#include "clang/Basic/AArch64SVEACLETypes.def"
14561461
}
14571462

1463+
if (LangOpts.ACLE)
1464+
InitBuiltinType(MFloat8Ty, BuiltinType::MFloat8);
1465+
14581466
if (Target.getTriple().isPPC64()) {
14591467
#define PPC_VECTOR_MMA_TYPE(Name, Id, Size) \
14601468
InitBuiltinType(Id##Ty, BuiltinType::Id);

clang/lib/Basic/IdentifierTable.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ enum TokenKey : unsigned {
111111
KEYNOZOS = 0x4000000,
112112
KEYHLSL = 0x8000000,
113113
KEYFIXEDPOINT = 0x10000000,
114-
KEYMAX = KEYFIXEDPOINT, // The maximum key
114+
KEYACLE = 0x20000000, // Enable Arm Neon vector type keywords
115+
KEYMAX = KEYACLE, // The maximum key
115116
KEYALLCXX = KEYCXX | KEYCXX11 | KEYCXX20,
116117
KEYALL = (KEYMAX | (KEYMAX - 1)) & ~KEYNOMS18 & ~KEYNOOPENCL &
117118
~KEYNOZOS // KEYNOMS18, KEYNOOPENCL, KEYNOZOS are excluded.
@@ -216,6 +217,8 @@ static KeywordStatus getKeywordStatusHelper(const LangOptions &LangOpts,
216217
return KS_Unknown;
217218
case KEYFIXEDPOINT:
218219
return LangOpts.FixedPoint ? KS_Enabled : KS_Disabled;
220+
case KEYACLE:
221+
return LangOpts.ACLE ? KS_Enabled : KS_Disabled;
219222
default:
220223
llvm_unreachable("Unknown KeywordStatus flag");
221224
}

clang/lib/Basic/LangOptions.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@ void LangOptions::setLangDefaults(LangOptions &Opts, Language Lang,
203203
Opts.setDefaultFPContractMode(LangOptions::FPM_Fast);
204204
}
205205

206+
if (T.isARM() || T.isAArch64())
207+
Opts.ACLE = true;
208+
206209
// OpenCL, C++ and C23 have bool, true, false keywords.
207210
Opts.Bool = Opts.OpenCL || Opts.CPlusPlus || Opts.C23;
208211

clang/lib/Parse/ParseDecl.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4445,6 +4445,15 @@ void Parser::ParseDeclarationSpecifiers(
44454445
goto DoneWithDeclSpec; \
44464446
break;
44474447
#include "clang/Basic/OpenCLImageTypes.def"
4448+
4449+
#define NEON_VECTOR_TYPE(Name, BaseType, ElBits, NumEls, VectorKind) \
4450+
case tok::kw_##Name: \
4451+
isInvalid = DS.SetTypeSpecType(DeclSpec::TST_##Name, Loc, PrevSpec, \
4452+
DiagID, Policy); \
4453+
break;
4454+
#define SVE_TYPE(Name, Id, SingletonId)
4455+
#include "clang/Basic/AArch64SVEACLETypes.def"
4456+
44484457
case tok::kw___unknown_anytype:
44494458
isInvalid = DS.SetTypeSpecType(TST_unknown_anytype, Loc,
44504459
PrevSpec, DiagID, Policy);
@@ -5958,6 +5967,10 @@ bool Parser::isDeclarationSpecifier(
59585967
case tok::kw___read_only:
59595968
case tok::kw___read_write:
59605969
case tok::kw___write_only:
5970+
#define NEON_VECTOR_TYPE(Name, BaseType, ElBits, NumEls, VectorKind) \
5971+
case tok::kw_##Name:
5972+
#define SVE_TYPE(Name, Id, SingletonId)
5973+
#include "clang/Basic/AArch64SVEACLETypes.def"
59615974
#define GENERIC_IMAGE_TYPE(ImgType, Id) case tok::kw_##ImgType##_t:
59625975
#include "clang/Basic/OpenCLImageTypes.def"
59635976
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) case tok::kw_##Name:

clang/lib/Parse/ParseTentative.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,6 +1473,10 @@ Parser::isCXXDeclarationSpecifier(ImplicitTypenameContext AllowImplicitTypename,
14731473
case tok::kw__Fract:
14741474
case tok::kw__Sat:
14751475
case tok::annot_pack_indexing_type:
1476+
#define NEON_VECTOR_TYPE(Name, BaseType, ElBits, NumEls, VectorKind) \
1477+
case tok::kw_##Name:
1478+
#define SVE_TYPE(Name, Id, SingletonId)
1479+
#include "clang/Basic/AArch64SVEACLETypes.def"
14761480
#define GENERIC_IMAGE_TYPE(ImgType, Id) case tok::kw_##ImgType##_t:
14771481
#include "clang/Basic/OpenCLImageTypes.def"
14781482
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) case tok::kw_##Name:
@@ -1601,6 +1605,10 @@ bool Parser::isCXXDeclarationSpecifierAType() {
16011605
case tok::kw__Accum:
16021606
case tok::kw__Fract:
16031607
case tok::kw__Sat:
1608+
#define NEON_VECTOR_TYPE(Name, BaseType, ElBits, NumEls, VectorKind) \
1609+
case tok::kw_##Name:
1610+
#define SVE_TYPE(Name, Id, SingletonId)
1611+
#include "clang/Basic/AArch64SVEACLETypes.def"
16041612
#define GENERIC_IMAGE_TYPE(ImgType, Id) case tok::kw_##ImgType##_t:
16051613
#include "clang/Basic/OpenCLImageTypes.def"
16061614
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) case tok::kw_##Name:

clang/lib/Sema/DeclSpec.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,10 @@ bool Declarator::isDeclarationOfFunction() const {
374374
case TST_typename_pack_indexing:
375375
#define GENERIC_IMAGE_TYPE(ImgType, Id) case TST_##ImgType##_t:
376376
#include "clang/Basic/OpenCLImageTypes.def"
377+
#define NEON_VECTOR_TYPE(Name, BaseType, ElBits, NumEls, VectorKind) \
378+
case TST_##Name:
379+
#define SVE_TYPE(Name, Id, SingletonId)
380+
#include "clang/Basic/AArch64SVEACLETypes.def"
377381
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) case TST_##Name:
378382
#include "clang/Basic/HLSLIntangibleTypes.def"
379383
return false;
@@ -607,6 +611,11 @@ const char *DeclSpec::getSpecifierName(DeclSpec::TST T,
607611
case DeclSpec::TST_##ImgType##_t: \
608612
return #ImgType "_t";
609613
#include "clang/Basic/OpenCLImageTypes.def"
614+
#define NEON_VECTOR_TYPE(Name, BaseType, ElBits, NumEls, VectorKind) \
615+
case DeclSpec::TST_##Name: \
616+
return #Name;
617+
#define SVE_TYPE(Name, Id, SingletonId)
618+
#include "clang/Basic/AArch64SVEACLETypes.def"
610619
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) \
611620
case DeclSpec::TST_##Name: \
612621
return #Name;

clang/lib/Sema/SemaTemplateVariadic.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,10 @@ bool Sema::containsUnexpandedParameterPacks(Declarator &D) {
10561056
case TST_BFloat16:
10571057
#define GENERIC_IMAGE_TYPE(ImgType, Id) case TST_##ImgType##_t:
10581058
#include "clang/Basic/OpenCLImageTypes.def"
1059+
#define NEON_VECTOR_TYPE(Name, BaseType, ElBits, NumEls, VectorKind) \
1060+
case TST_##Name:
1061+
#define SVE_TYPE(Name, Id, SingletonId)
1062+
#include "clang/Basic/AArch64SVEACLETypes.def"
10591063
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) case TST_##Name:
10601064
#include "clang/Basic/HLSLIntangibleTypes.def"
10611065
case TST_unknown_anytype:

clang/lib/Sema/SemaType.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,6 +1365,13 @@ static QualType ConvertDeclSpecToType(TypeProcessingState &state) {
13651365
break;
13661366
#include "clang/Basic/OpenCLImageTypes.def"
13671367

1368+
#define NEON_VECTOR_TYPE(Name, BaseType, ElBits, NumEls, VectorKind) \
1369+
case DeclSpec::TST_##Name: \
1370+
Result = Context.getVectorType(Context.BaseType, NumEls, VectorKind); \
1371+
break;
1372+
#define SVE_TYPE(Name, Id, SingletonId)
1373+
#include "clang/Basic/AArch64SVEACLETypes.def"
1374+
13681375
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) \
13691376
case DeclSpec::TST_##Name: \
13701377
Result = Context.SingletonId; \
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
// Test that NEON types are defined, even when arm_neon.h is not included.
2+
// as required by AAPCS64 "Support for Advanced SIMD Extensions".
3+
4+
// RUN: %clang_cc1 -ast-dump -triple arm-linux-gnu -D A32 %s -x c | FileCheck --check-prefixes=CHECK %s
5+
// RUN: %clang_cc1 -ast-dump -triple arm-linux-gnu -D A32 %s -x c++ | FileCheck --check-prefixes=CHECK %s
6+
// RUN: %clang_cc1 -ast-dump -triple aarch64-linux-gnu %s -x c | FileCheck --check-prefixes=CHECK,A64 %s
7+
// RUN: %clang_cc1 -ast-dump -triple aarch64-linux-gnu %s -x c++ | FileCheck --check-prefixes=CHECK,A64 %s
8+
// RUN: %clang_cc1 -verify -verify-ignore-unexpected=note -triple x86_64 %s -x c
9+
// RUN: %clang_cc1 -verify -verify-ignore-unexpected=note -triple x86_64 %s -x c++
10+
11+
__Int8x8_t Int8x8;
12+
// CHECK: Int8x8 '__attribute__((neon_vector_type(8))) char'
13+
// expected-error@-2{{unknown type name '__Int8x8_t'}}
14+
15+
__Int16x4_t Int16x4;
16+
// CHECK: Int16x4 '__attribute__((neon_vector_type(16))) short'
17+
// expected-error@-2{{unknown type name '__Int16x4_t'}}
18+
19+
__Int32x2_t Int32x2;
20+
// CHECK: Int32x2 '__attribute__((neon_vector_type(32))) int'
21+
// expected-error@-2{{unknown type name '__Int32x2_t'}}
22+
23+
__Uint8x8_t Uint8x8;
24+
// CHECK: Uint8x8 '__attribute__((neon_vector_type(8))) char'
25+
// expected-error@-2{{unknown type name '__Uint8x8_t'}}
26+
27+
__Uint16x4_t Uint16x4;
28+
// CHECK: Uint16x4 '__attribute__((neon_vector_type(16))) unsigned short'
29+
// expected-error@-2{{unknown type name '__Uint16x4_t'}}
30+
31+
__Uint32x2_t Uint32x2;
32+
// CHECK: Uint32x2 '__attribute__((neon_vector_type(32))) unsigned int'
33+
// expected-error@-2{{unknown type name '__Uint32x2_t'}}
34+
35+
__Float16x4_t Float16x4;
36+
// CHECK: Float16x4 '__attribute__((neon_vector_type(16))) _Float16'
37+
// expected-error@-2{{unknown type name '__Float16x4_t'}}
38+
39+
__Float32x2_t Float32x2;
40+
// CHECK: Float32x2 '__attribute__((neon_vector_type(32))) float'
41+
// expected-error@-2{{unknown type name '__Float32x2_t'}}
42+
43+
__Poly8x8_t Poly8x8;
44+
// CHECK: Poly8x8 '__attribute__((neon_polyvector_type(8))) char'
45+
// expected-error@-2{{unknown type name '__Poly8x8_t'}}
46+
47+
__Poly16x4_t Poly16x4;
48+
// CHECK: Poly16x4 '__attribute__((neon_polyvector_type(16))) unsigned short'
49+
// expected-error@-2{{unknown type name '__Poly16x4_t'}}
50+
51+
__Bfloat16x4_t Bfloat16x4;
52+
// CHECK: Bfloat16x4 '__attribute__((neon_vector_type(16))) __bf16'
53+
// expected-error@-2{{unknown type name '__Bfloat16x4_t'}}
54+
55+
__Int8x16_t Int8x16;
56+
// CHECK: Int8x16 '__attribute__((neon_vector_type(8))) char'
57+
// expected-error@-2{{unknown type name '__Int8x16_t'}}
58+
59+
__Int16x8_t Int16x8;
60+
// CHECK: Int16x8 '__attribute__((neon_vector_type(16))) short'
61+
// expected-error@-2{{unknown type name '__Int16x8_t'}}
62+
63+
__Int32x4_t Int32x4;
64+
// CHECK: Int32x4 '__attribute__((neon_vector_type(32))) int'
65+
// expected-error@-2{{unknown type name '__Int32x4_t'}}
66+
67+
__Int64x2_t Int64x2;
68+
// CHECK: Int64x2 '__attribute__((neon_vector_type(64))) long long'
69+
// expected-error@-2{{unknown type name '__Int64x2_t'}}
70+
71+
__Uint8x16_t Uint8x16;
72+
// CHECK: Uint8x16 '__attribute__((neon_vector_type(8))) char'
73+
// expected-error@-2{{unknown type name '__Uint8x16_t'}}
74+
75+
__Uint16x8_t Uint16x8;
76+
// CHECK: Uint16x8 '__attribute__((neon_vector_type(16))) unsigned short'
77+
// expected-error@-2{{unknown type name '__Uint16x8_t'}}
78+
79+
__Uint32x4_t Uint32x4;
80+
// CHECK: Uint32x4 '__attribute__((neon_vector_type(32))) unsigned int'
81+
// expected-error@-2{{unknown type name '__Uint32x4_t'}}
82+
83+
__Uint64x2_t Uint64x2;
84+
// CHECK: Uint64x2 '__attribute__((neon_vector_type(64))) unsigned long long'
85+
// expected-error@-2{{unknown type name '__Uint64x2_t'}}
86+
87+
__Float16x8_t Float16x8;
88+
// CHECK: Float16x8 '__attribute__((neon_vector_type(16))) _Float16'
89+
// expected-error@-2{{unknown type name '__Float16x8_t'}}
90+
91+
__Float32x4_t Float32x4;
92+
// CHECK: Float32x4 '__attribute__((neon_vector_type(32))) float'
93+
// expected-error@-2{{unknown type name '__Float32x4_t'}}
94+
95+
__Float64x2_t Float64x2;
96+
// CHECK: Float64x2 '__attribute__((neon_vector_type(64))) double'
97+
// expected-error@-2{{unknown type name '__Float64x2_t'}}
98+
99+
__Poly8x16_t Poly8x16;
100+
// CHECK: Poly8x16 '__attribute__((neon_polyvector_type(8))) char'
101+
// expected-error@-2{{unknown type name '__Poly8x16_t'}}
102+
103+
__Poly16x8_t Poly16x8;
104+
// CHECK: Poly16x8 '__attribute__((neon_polyvector_type(16))) unsigned short'
105+
// expected-error@-2{{unknown type name '__Poly16x8_t'}}
106+
107+
__Poly64x2_t Poly64x2;
108+
// CHECK: Poly64x2 '__attribute__((neon_polyvector_type(64))) unsigned long long'
109+
// expected-error@-2{{unknown type name '__Poly64x2_t'}}
110+
111+
__Bfloat16x8_t Bfloat16x8;
112+
// CHECK: Bfloat16x8 '__attribute__((neon_vector_type(16))) __bf16'
113+
// expected-error@-2{{unknown type name '__Bfloat16x8_t'}}
114+
115+
116+
#ifndef A32
117+
__mfp8 mfp8;
118+
// A64: mfp8 '__mfp8'
119+
// expected-error@-2{{unknown type name '__mfp8'}}
120+
121+
__Mfloat8x8_t Mfloat8x8;
122+
// A64: Mfloat8x8 '__attribute__((neon_vector_type(8))) __mfp8'
123+
// expected-error@-2{{unknown type name '__Mfloat8x8_t'}}
124+
125+
__Mfloat8x16_t Mfloat8x16;
126+
// A64: Mfloat8x16 '__attribute__((neon_vector_type(16))) __mfp8'
127+
// expected-error@-2{{unknown type name '__Mfloat8x16_t'}}
128+
#endif

0 commit comments

Comments
 (0)