================
@@ -8058,7 +8057,14 @@ bool Sema::CheckVectorCast(SourceRange R, QualType
VectorTy, QualType Ty,
}
ExprResult Sema::prepareVectorSplat(QualType VectorTy, Expr *SplattedExpr) {
- QualType DestElemTy = VectorTy->castAs<VectorType>()->getElementType();
+ QualType DestElemTy =
+ VectorTy->isSizelessVectorType()
+ ? VectorTy->isSveVLSBuiltinType() || VectorTy->isRVVVLSBuiltinType()
+ ? Context
+
.getBuiltinVectorTypeInfo(VectorTy->castAs<BuiltinType>())
+ .ElementType
+ : VectorTy->getSizelessVectorEltType(Context)
+ : VectorTy->castAs<VectorType>()->getElementType();
----------------
pawosm-arm wrote:
> This would be much easier to read as a helper like:
Ok, I've prepared a helper function, but I've also extended it with the special
treatment for SVE/RVV quirks, and added a comment about it.
https://github.com/llvm/llvm-project/pull/205432
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits