[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


================
@@ -1412,6 +1425,21 @@ void CodeGenFunction::CreateCoercedStore(llvm::Value *Src, Address Dst,
   if (SrcTy != Dst.getElementType()) {
     if (llvm::StructType *DstSTy =
             dyn_cast<llvm::StructType>(Dst.getElementType())) {
+      if (SrcTy->isScalableTy() || SrcTy->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