Landing: 9e391103a9fc

Project / Subsystem

gcc / gcc

Date

2026-07-30

Author

Aldy Hernandez

Commit

9e391103a9fcc140584193ca7f75e5e64181d632

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
gcc
patch_id
—
commit_hash
9e391103a9fcc140584193ca7f75e5e64181d632
source_type
github
headline
Enable sub-ranges for frange optimization.
tldr
GCC's frange optimization now supports two sub-ranges, improving range representation and enabling new optimizations.
author
Aldy Hernandez
outcome
committed
performance_win
true
breaking_change
false
series_id
—
series_parts
[]
tags
  • • optimization
  • • gcc
discussion_id_link
—
bugzilla_pr
—
date
2026-07-30T00:00:00.000Z

GCC’s frange optimization pass has been enhanced to support two sub-ranges, up from one. This change allows for better representation of inequalities such as non-zero values, which were previously missed. With two sub-ranges, the optimization now captures 99.63% of ranges encountered in a Fortran corpus, significantly closing the gap with internal tables used by DOM. This improvement is expected to fix several open PRs related to nonzero folding and signed zero optimizations, while also yielding modest gains in jump threading and constant propagation opportunities.