Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
CarolineConcatto committed Oct 22, 2024
1 parent 0074b75 commit b65c5bf
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 16 deletions.
6 changes: 2 additions & 4 deletions clang/include/clang/Basic/TargetBuiltins.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,7 @@ namespace clang {
Float16,
Float32,
Float64,
BFloat16,
MFloat8
BFloat16
};

NeonTypeFlags(unsigned F) : Flags(F) {}
Expand All @@ -221,8 +220,7 @@ namespace clang {
switch (getEltType()) {
case Int8:
case Poly8:
case MFloat8:
return 8;
return 16;
case Int16:
case Float16:
case Poly16:
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/Serialization/ASTBitCodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ enum PredefinedTypeIDs {
///
/// Type IDs for non-predefined types will start at
/// NUM_PREDEF_TYPE_IDs.
const unsigned NUM_PREDEF_TYPE_IDS = 509;
const unsigned NUM_PREDEF_TYPE_IDS = 511;

// Ensure we do not overrun the predefined types we reserved
// in the enum PredefinedTypeIDs above.
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/AST/ASTContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2242,7 +2242,7 @@ TypeInfo ASTContext::getTypeInfoImpl(const Type *T) const {
#define AARCH64_VECTOR_TYPE_MFLOAT(Name, MangledName, Id, SingletonId, NumEls, \
ElBits, NF) \
case BuiltinType::Id: \
Width = 0; \
Width = NumEls * ElBits * NF; \
Align = NumEls * ElBits; \
break;
#include "clang/Basic/AArch64SVEACLETypes.def"
Expand Down
2 changes: 0 additions & 2 deletions clang/lib/CodeGen/CGBuiltin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6432,8 +6432,6 @@ static llvm::FixedVectorType *GetNeonType(CodeGenFunction *CGF,
case NeonTypeFlags::Int8:
case NeonTypeFlags::Poly8:
return llvm::FixedVectorType::get(CGF->Int8Ty, V1Ty ? 1 : (8 << IsQuad));
case NeonTypeFlags::MFloat8:
return llvm::FixedVectorType::get(CGF->Int8Ty, V1Ty ? 1 : (8 << IsQuad));
case NeonTypeFlags::Int16:
case NeonTypeFlags::Poly16:
return llvm::FixedVectorType::get(CGF->Int16Ty, V1Ty ? 1 : (4 << IsQuad));
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/CodeGen/CodeGenTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,9 @@ llvm::Type *CodeGenTypes::ConvertType(QualType T) {
case BuiltinType::Id:
#define SVE_PREDICATE_TYPE(Name, MangledName, Id, SingletonId) \
case BuiltinType::Id:
#define SVE_OPAQUE_TYPE(Name, MangledName, Id, SingletonId)
#define AARCH64_VECTOR_TYPE(Name, MangledName, Id, SingletonId) \
case BuiltinType::Id:
#define SVE_OPAQUE_TYPE(Name, MangledName, Id, SingletonId)
#include "clang/Basic/AArch64SVEACLETypes.def"
{
ASTContext::BuiltinVectorTypeInfo Info =
Expand Down
2 changes: 0 additions & 2 deletions clang/lib/Sema/SemaARM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,6 @@ static QualType getNeonEltType(NeonTypeFlags Flags, ASTContext &Context,
switch (Flags.getEltType()) {
case NeonTypeFlags::Int8:
return Flags.isUnsigned() ? Context.UnsignedCharTy : Context.SignedCharTy;
case NeonTypeFlags::MFloat8:
return Context.UnsignedCharTy;
case NeonTypeFlags::Int16:
return Flags.isUnsigned() ? Context.UnsignedShortTy : Context.ShortTy;
case NeonTypeFlags::Int32:
Expand Down
8 changes: 3 additions & 5 deletions clang/utils/TableGen/NeonEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ enum EltType {
Float16,
Float32,
Float64,
BFloat16,
MFloat8,
BFloat16
};

} // end namespace NeonTypeFlags
Expand Down Expand Up @@ -150,8 +149,7 @@ class Type {
SInt,
UInt,
Poly,
BFloat16,
MFloat8,
BFloat16
};
TypeKind Kind;
bool Immediate, Constant, Pointer;
Expand Down Expand Up @@ -781,7 +779,7 @@ Type Type::fromTypedefName(StringRef Name) {
T.Kind = Poly;
} else if (Name.consume_front("bfloat")) {
T.Kind = BFloat16;
}else {
} else {
assert(Name.starts_with("int"));
Name = Name.drop_front(3);
}
Expand Down

0 comments on commit b65c5bf

Please sign in to comment.