Skip to content

Commit b65c5bf

Browse files
Address review comments
1 parent 0074b75 commit b65c5bf

File tree

7 files changed

+8
-16
lines changed

7 files changed

+8
-16
lines changed

clang/include/clang/Basic/TargetBuiltins.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,7 @@ namespace clang {
198198
Float16,
199199
Float32,
200200
Float64,
201-
BFloat16,
202-
MFloat8
201+
BFloat16
203202
};
204203

205204
NeonTypeFlags(unsigned F) : Flags(F) {}
@@ -221,8 +220,7 @@ namespace clang {
221220
switch (getEltType()) {
222221
case Int8:
223222
case Poly8:
224-
case MFloat8:
225-
return 8;
223+
return 16;
226224
case Int16:
227225
case Float16:
228226
case Poly16:

clang/include/clang/Serialization/ASTBitCodes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,7 @@ enum PredefinedTypeIDs {
11491149
///
11501150
/// Type IDs for non-predefined types will start at
11511151
/// NUM_PREDEF_TYPE_IDs.
1152-
const unsigned NUM_PREDEF_TYPE_IDS = 509;
1152+
const unsigned NUM_PREDEF_TYPE_IDS = 511;
11531153

11541154
// Ensure we do not overrun the predefined types we reserved
11551155
// in the enum PredefinedTypeIDs above.

clang/lib/AST/ASTContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2242,7 +2242,7 @@ TypeInfo ASTContext::getTypeInfoImpl(const Type *T) const {
22422242
#define AARCH64_VECTOR_TYPE_MFLOAT(Name, MangledName, Id, SingletonId, NumEls, \
22432243
ElBits, NF) \
22442244
case BuiltinType::Id: \
2245-
Width = 0; \
2245+
Width = NumEls * ElBits * NF; \
22462246
Align = NumEls * ElBits; \
22472247
break;
22482248
#include "clang/Basic/AArch64SVEACLETypes.def"

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6432,8 +6432,6 @@ static llvm::FixedVectorType *GetNeonType(CodeGenFunction *CGF,
64326432
case NeonTypeFlags::Int8:
64336433
case NeonTypeFlags::Poly8:
64346434
return llvm::FixedVectorType::get(CGF->Int8Ty, V1Ty ? 1 : (8 << IsQuad));
6435-
case NeonTypeFlags::MFloat8:
6436-
return llvm::FixedVectorType::get(CGF->Int8Ty, V1Ty ? 1 : (8 << IsQuad));
64376435
case NeonTypeFlags::Int16:
64386436
case NeonTypeFlags::Poly16:
64396437
return llvm::FixedVectorType::get(CGF->Int16Ty, V1Ty ? 1 : (4 << IsQuad));

clang/lib/CodeGen/CodeGenTypes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,9 +505,9 @@ llvm::Type *CodeGenTypes::ConvertType(QualType T) {
505505
case BuiltinType::Id:
506506
#define SVE_PREDICATE_TYPE(Name, MangledName, Id, SingletonId) \
507507
case BuiltinType::Id:
508-
#define SVE_OPAQUE_TYPE(Name, MangledName, Id, SingletonId)
509508
#define AARCH64_VECTOR_TYPE(Name, MangledName, Id, SingletonId) \
510509
case BuiltinType::Id:
510+
#define SVE_OPAQUE_TYPE(Name, MangledName, Id, SingletonId)
511511
#include "clang/Basic/AArch64SVEACLETypes.def"
512512
{
513513
ASTContext::BuiltinVectorTypeInfo Info =

clang/lib/Sema/SemaARM.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,6 @@ static QualType getNeonEltType(NeonTypeFlags Flags, ASTContext &Context,
323323
switch (Flags.getEltType()) {
324324
case NeonTypeFlags::Int8:
325325
return Flags.isUnsigned() ? Context.UnsignedCharTy : Context.SignedCharTy;
326-
case NeonTypeFlags::MFloat8:
327-
return Context.UnsignedCharTy;
328326
case NeonTypeFlags::Int16:
329327
return Flags.isUnsigned() ? Context.UnsignedShortTy : Context.ShortTy;
330328
case NeonTypeFlags::Int32:

clang/utils/TableGen/NeonEmitter.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ enum EltType {
101101
Float16,
102102
Float32,
103103
Float64,
104-
BFloat16,
105-
MFloat8,
104+
BFloat16
106105
};
107106

108107
} // end namespace NeonTypeFlags
@@ -150,8 +149,7 @@ class Type {
150149
SInt,
151150
UInt,
152151
Poly,
153-
BFloat16,
154-
MFloat8,
152+
BFloat16
155153
};
156154
TypeKind Kind;
157155
bool Immediate, Constant, Pointer;
@@ -781,7 +779,7 @@ Type Type::fromTypedefName(StringRef Name) {
781779
T.Kind = Poly;
782780
} else if (Name.consume_front("bfloat")) {
783781
T.Kind = BFloat16;
784-
}else {
782+
} else {
785783
assert(Name.starts_with("int"));
786784
Name = Name.drop_front(3);
787785
}

0 commit comments

Comments
 (0)