================
@@ -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:

Now I seriously think about disabling the entire feature for the bool type. The 
`getSizelessVectorEltType()` returns i8 for bool for a reason, maybe part of 
the reason is that such operations (like splat) should not be attempted on the 
bool-typed vectors?

https://github.com/llvm/llvm-project/pull/205432
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to