Skip to content

Commit 01ee70b

Browse files
[fixup] Add a comment about special case of mapping FP8 vectors to LLVM vector types
1 parent e8a216c commit 01ee70b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clang/lib/CodeGen/CodeGenTypes.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,9 @@ llvm::Type *CodeGenTypes::ConvertType(QualType T) {
512512
{
513513
ASTContext::BuiltinVectorTypeInfo Info =
514514
Context.getBuiltinVectorTypeInfo(cast<BuiltinType>(Ty));
515+
// The `__mfp8` type maps to `<1 x i8>` which can't be used to build
516+
// a <N x i8> vector type, hence bypass the call to `ConvertType` for
517+
// the element type and create the vector type directly.
515518
auto *EltTy = Info.ElementType->isMFloat8Type()
516519
? llvm::Type::getInt8Ty(getLLVMContext())
517520
: ConvertType(Info.ElementType);

0 commit comments

Comments
 (0)