================
@@ -10226,7 +10229,7 @@ Value *CodeGenFunction::EmitSVETupleCreate(const 
SVETypeFlags &TypeFlags,
                                              ArrayRef<Value *> Ops) {
   assert(TypeFlags.isTupleCreate() && "Expects TypleFlag isTupleCreate");
 
-  auto *SrcTy = dyn_cast<llvm::ScalableVectorType>(Ops[0]->getType());
+  auto *SrcTy = cast<llvm::ScalableVectorType>(Ops[0]->getType());
----------------
CarolineConcatto wrote:

I believe we should have some consistency in here between EmitSVETupleSetOrGet 
and EmitSVETupleCreate.
Or both we do :
 auto *SrcTy/SingleVecTy) = cast<llvm::ScalableVectorType>
or 
auto *SrcTy/SingleVecTy) = dyn_cast<llvm::ScalableVectorType>(
 if (!ScrTy/SingleVecTy))
   return 

Maybe is fine to cast directly to ScalableVectorType. I can see this being done 
is the other EmitSVE.

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

Reply via email to