Compared Analysis of GCC Codegen for AArch64 and RISC-V
summary
Collected SPEC CPU2017 dynamic instruction count data on a Banana Pi F3–class config using fixed GCC builds and user‑mode QEMU with a hotspot plugin, comparing AArch64 (DSV2) vs RISC‑V (V). Key findings: a tight PARZ loop shows ~54–56% more dynamic instructions on RISC‑V because of missing scaled addressing mode (extra add then load), GCC generates extra moves instead of using the VFMA scalar form (patch cuts DIC ~4.7% but hardware timing only ~0.3%), memset calls cost ~21% of runtime on RISC‑V vs <1% on AArch64 (generic 46‑ins scalar fallbacks), and libm lacks target vector exps so RISC‑V sees ~32% instruction penalty.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 0:15Motivation and context
- 1:40Dynamic instruction count metric
- 2:24Experimental setup
- 3:06Benchmark results overview
- 4:09ISA-related addressing issue
- 5:56Compiler vector instruction issue
- 7:41Library function performance gap
- 9:50AI-enhanced library optimization
- 10:55Future improvements
- 11:39Ongoing analysis updates
- 12:00Conclusion and Q&A
related talks
17mRecent Developments in Optimizing Compilers for RISC-V
18mPreview RISC-V GCC Features and Optimization Improvements for GCC-14
23mCode Size of RISC V versus ARM using the Embench™ 0 5 Benchmark Suite
20mAnalysis for Code Size Opportunities in RISC V
38mOptimized String Processing in RISC-V: How Toolchain Improvements Can Boost Performance
19mGCC Compiler Code Size Density
17mUnlocking 15% More Performance: A Case Study in LLVM Optimization for RISC-V
10mRISC-V Instruction Set Explorer (RISE)
