Landing: 0ebadbad7c92

Project / Subsystem

gcc / gcc

Date

2026-08-17

Author

Aldy Hernandez

Commit

0ebadbad7c92133c467f7aed6f3c16a9e3b55774

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc
patch_id
—
commit_hash
0ebadbad7c92133c467f7aed6f3c16a9e3b55774
source_type
github
headline
Path solver: Compute ranges only at current path position
tldr
Fixes a path solver issue by restricting range computations to the current block in the control flow graph.
author
Aldy Hernandez
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • optimization
  • • path analysis
  • • compiler
discussion_id_link
—
bugzilla_pr
—
date
2026-08-17T00:00:00.000Z

This commit corrects the path solver’s range computation logic to only consider the current block’s position in the control flow graph. Previously, range queries could occur with contexts from arbitrary blocks, leading to incorrect results when folding statements. The fix ensures that range calculations are confined to the relevant path position, falling back to global ranges otherwise, and adds an assertion to maintain this invariant.