Landing: 7da4eb256f16

Project / Subsystem

gcc / tree-optimization

Date

2026-07-28

Author

Philipp Tomsich

Commit

7da4eb256f169fdc6bf3849b247d81f2e9404eb3

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
tree-optimization
patch_id
—
commit_hash
7da4eb256f169fdc6bf3849b247d81f2e9404eb3
source_type
github
headline
Perform inverse converted +- lookup in Value Numbering
tldr
Fixes incorrect code generation for arithmetic operations in Value Numbering.
author
Philipp Tomsich
outcome
committed
performance_win
true
breaking_change
false
series_id
—
series_parts
[]
tags
  • • optimization
  • • compiler bug
discussion_id_link
—
bugzilla_pr
—
date
2026-07-28T00:00:00.000Z

This commit corrects an issue in Value Numbering where an arithmetic operation was assumed to not overflow, leading to incorrect code generation for certain conversions. The fix adjusts how these operations are processed to ensure they are handled correctly, regardless of the order they appear in the intermediate representation. This change also broadens the applicability of the optimization to include sign changes and targets like ILP32.