[clang] [Clang] Prevent null pointer dereferences in SVE tuple functions (PR #94267)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 28 10:54:14 PDT 2024
================
@@ -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());
----------------
smanna12 wrote:
Thanks @CarolineConcatto for reviews. I have updated patch to be consistent with SVETuple functions.
https://github.com/llvm/llvm-project/pull/94267
More information about the cfe-commits
mailing list