Landing: 0e2e9e48ca56
Project / Subsystem
gcc / gcc/risc-v
Date
2026-09-04
Author
Robin Dapp
Commit
0e2e9e48ca5683e175ab842cc5e75fed6d69dcd2
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc/risc-v
- patch_id
- —
- commit_hash
- 0e2e9e48ca5683e175ab842cc5e75fed6d69dcd2
- source_type
- github
- headline
- Add scalar memset for RISC-V
- tldr
- RISC-V now includes a scalar memset implementation, avoiding library calls when vector expansion fails or is unsuitable.
- author
- Robin Dapp
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • risc-v
- • optimization
- • string-operations
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-04T00:00:00.000Z
This patch introduces a scalar memset implementation for RISC-V, improving code generation when vector memset expansion is not possible or efficient. It adds a test mode for expanders to check for support without emitting code and a new scalar memset expander for non-zero values and known lengths, preventing unnecessary libcalls.