Landing: ccd787ce79a0
Project / Subsystem
gcc / riscv
Date
2026-09-19
Author
Milan Tripkovic
Commit
ccd787ce79a0ed6ee2c0881821076773048dd334
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- riscv
- patch_id
- —
- commit_hash
- ccd787ce79a0ed6ee2c0881821076773048dd334
- source_type
- github
- headline
- RISC-V: Improve conditional zero optimization with Zicond extension
- tldr
- Optimizes conditional zero operations for RISC-V by mapping greater-than comparisons to less-than-or-equal and using the Zicond extension.
- author
- Milan Tripkovic
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • risc-v
- • optimization
- • compiler
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-19T00:00:00.000Z
This change enhances RISC-V optimization by improving how conditional zeroes are generated for comparisons against immediate values. It introduces new split patterns and maps greater-than conditions to less-than-or-equal, allowing them to be efficiently handled by the Zicond extension. This results in replacing redundant immediate loads with instructions like slti or sltiu followed by czero.nez or czero.eqz, producing more compact and efficient code.