[clang] [clang][RISCV] Fix crash on VLS calling convention (PR #145489)

Craig Topper via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 24 07:27:07 PDT 2025


================
@@ -1329,6 +1329,19 @@ static llvm::Value *CreateCoercedLoad(Address Src, llvm::Type *Ty,
   llvm::TypeSize DstSize = CGF.CGM.getDataLayout().getTypeAllocSize(Ty);
 
   if (llvm::StructType *SrcSTy = dyn_cast<llvm::StructType>(SrcTy)) {
+    if (Ty->isScalableTy() || Ty->isRISCVVectorTupleTy()) {
+      // In RISCV VLS calling convention, struct of fixed vector might be
----------------
topperc wrote:

```suggestion
      // In RISC-V VLS calling convention, struct of fixed vector might be
```

https://github.com/llvm/llvm-project/pull/145489


More information about the cfe-commits mailing list