Landing: 7dab38c9d710

Project / Subsystem

gcc / phiopt

Date

2026-09-03

Author

Aldy Hernandez

Commit

7dab38c9d7104ea701a60ef71837695f24aec86b

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
phiopt
patch_id
—
commit_hash
7dab38c9d7104ea701a60ef71837695f24aec86b
source_type
github
headline
phiopt: clear the range info of hoisted adjacent loads
tldr
Fixes incorrect range information after hoisting adjacent loads, preventing bugs in subsequent optimizations.
author
Aldy Hernandez
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • optimization
  • • correctness
discussion_id_link
—
bugzilla_pr
—
date
2026-09-03T00:00:00.000Z

The hoist_adjacent_loads optimization in GCC moves loads from within a conditional block to its head. However, it previously retained the range information computed for those loads under the condition, leading to incorrect analysis for subsequent optimizations like range propagation. This change clears that stale range information, ensuring the optimizer uses accurate data and preventing potential bugs, especially when combined with future range analysis improvements.