This used to be 1-2043 elements, and recently regressed to a limit of 1023.
The new behavior is an almost-superset of GCC, which accepts powers of two up
to 2**62.
This change frees one further bit in VectorType in case Type grows again.
Paths
| Differential D77313
[AST] Allow VectorTypes of 1-256 elements, and powers of two up to 2**31. AbandonedPublic Authored by sammccall on Apr 2 2020, 8:26 AM.
Details
Summary This used to be 1-2043 elements, and recently regressed to a limit of 1023. This change frees one further bit in VectorType in case Type grows again.
Diff Detail
Unit TestsFailed
Event TimelineComment Actions I think I would rather just pay the extra 8 bytes per VectorType, and expand this to support all vector types supported by LLVM. It's not like we allocate enough VectorTypes for it to matter, anyway. Comment Actions
llvm::VectorType seems to accept arbitrary unsigned size, so IIUC you'd suggest putting just putting unsigned NumElements in VectorType, which would cost 4 bytes and another 4 in padding. Comment Actions
This alternative is in D77335, which is much simpler.
Revision Contents
Diff 254532 clang/include/clang/AST/Type.h
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/AST/Type.cpp
clang/lib/Sema/SemaType.cpp
clang/test/Sema/types.c
clang/test/SemaCXX/vector.cpp
|
clang-format-diff not found in user's PATH; not linting file.