================
@@ -4374,15 +4379,18 @@ ASTContext::getBuiltinVectorTypeInfo(const BuiltinType 
*Ty) const {
                                ElBits, NF)                                     
\
   case BuiltinType::Id:                                                        
\
     return {BFloat16Ty, llvm::ElementCount::getScalable(NumEls), NF};
+#define SVE_VECTOR_TYPE_MFLOAT(Name, MangledName, Id, SingletonId, NumEls,     
\
+                               ElBits, NF)                                     
\
+  case BuiltinType::Id:                                                        
\
+    return {MFloat8Ty, llvm::ElementCount::getScalable(NumEls), NF};
----------------
momchil-velikov wrote:

> Why are you returning MFloat8Ty it should be SingletonId, no?

This inside the definition of `SVE_VECTOR_TYPE_MFLOAT`. The vector element type 
is `__mfp8`.
Very similar to the case for `__bf16` just above.

> At least it should have an explanation to why this is different. Is it 
> because of AArrch64.cpp to build the scalable vector.

This function is described as
```    
/// Returns the element type, element count and number of vectors
/// (in case of tuple) for a builtin vector type.
  BuiltinVectorTypeInfo
  getBuiltinVectorTypeInfo(const BuiltinType *VecTy) const;
```

I don't think properly implementing it for any builtin vector type needs 
special explanation.
A special explanation would be needed if some type was an exception.


https://github.com/llvm/llvm-project/pull/118969
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to