[clang] [clang][RISCV] Fix crash on VLS calling convention (PR #145489)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 10 14:55:09 PDT 2025
https://github.com/efriedma-quic commented:
I'm not really happy with the way the code is organized for "coerced" load/store involving scalable types.
At the point where we're analyzing the calling convention; we have a bunch of information: exactly what kind of coercion we're doing, whether the sizes match, whether there are any unusual types involved. We're throwing away that information, and then trying to re-derive it later.
So I think:
- The target code should compute whether the sizes are guaranteed to match. If they do, "coerced" load/store simplifies to just a plain load/store, and we can skip all these complicated computations involving the sizes of the source/destination.
- If some types need target-specific code to lower arguments, that should be its own ABIArgInfo::Kind, and the target-independent code should call into a target-specific implementation in clang/lib/CodeGen/Targets/RISCV.cpp.
https://github.com/llvm/llvm-project/pull/145489
More information about the cfe-commits
mailing list