Landing: 0cfd3de946ce

Project / Subsystem

gcc / gcc/riscv

Date

2026-08-14

Author

Jeff Law

Commit

0cfd3de946cedafc0948fe4fde5a015c63b8993c

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
gcc/riscv
patch_id
—
commit_hash
0cfd3de946cedafc0948fe4fde5a015c63b8993c
source_type
github
headline
RISC-V cost model adjusted for LO_SUM expressions
tldr
RISC-V backend increases cost of LO_SUM expressions to improve code generation.
author
Jeff Law
outcome
committed
performance_win
true
breaking_change
false
series_id
—
series_parts
[]
tags
  • • risc-v
  • • optimization
  • • cost model
discussion_id_link
—
bugzilla_pr
—
date
2026-08-14T00:00:00.000Z

The RISC-V GCC backend has slightly increased the cost associated with LO_SUM expressions. This adjustment aims to prevent the Common Subexpression Elimination (CSE) pass from unnecessarily preserving LO_SUM forms when alternative, equivalent values exist. By making LO_SUM costlier, the compiler is encouraged to eliminate them along with associated HIGH expressions, potentially leading to more optimized code.