Improvements to RISC-V Vector code generation in LLVM
summary
LLVM adds middle-end and backend changes for RVV including VL tail folding and non-power-of-two SLP support, a pass to reduce VL to demanded, and backend tuning to avoid extra CSR switches and reduce spilling. Work uses Clang/LLVM, LLVM Exegesis and SPEC benchmarking and reports concrete gains: 12 of 16 SPEC benchmarks improve ≥5% and about 7 improve ≥10% versus Clang 18 months earlier, and LLVM is ahead of GCC on roughly 11–12 of 16.
AI-written summary · about
chapters (9)
- 0:00Introduction and context
- 1:39Codegen development stages
- 4:50RVV ISA challenges
- 7:41Vectorization improvements
- 9:30VL tail folding
- 11:15Inline expansions and extensions
- 12:40Performance improvements
- 13:45Testing infrastructure
- 14:46Future work and conclusion
related talks
19mGetting the Most out of the LLVM Auto Vectorizer for RISC-V Vectors (RVV)
18mPreview RISC-V GCC Features and Optimization Improvements for GCC-14
17mMaking LLVM RISC-V Compiler More Performant for Everyone
24mRISC V LLVM: Towards A Production-Ready LLVM-Based Toolchain
17mRISC-V LLVM State of the Union
28mLLVM for RISCV
17mUnlocking 15% More Performance: A Case Study in LLVM Optimization for RISC-V
17mRecent Developments in Optimizing Compilers for RISC-V
