================
@@ -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:
> Also, getSizelessVectorEltType looks like it already handles SVE and RVV
> builtins (so does not need additional handling here).
It also calls the functions (like `Type::getSveEltType()` quoted above) which
deliberately return i8 instead of i1 for the elements of the `bool` type
causing this code to crash. We're back to square one.
https://github.com/llvm/llvm-project/pull/205432
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits