Landing: 7b3563c38b7b

Project / Subsystem

gcc / range-op

Date

2026-10-03

Author

Aldy Hernandez

Commit

7b3563c38b7b1e7b611ae90152cd35a1a2e3ca47

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
range-op
patch_id
—
commit_hash
7b3563c38b7b1e7b611ae90152cd35a1a2e3ca47
source_type
github
headline
range-op: Implement relation handling for AND, OR, MIN, and MAX.
tldr
Range operations now support relation handling for AND, OR, MIN, and MAX, enabling new simplifications when operands are equal or ordered.
author
Aldy Hernandez
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • optimization
  • • compiler
discussion_id_link
—
bugzilla_pr
—
date
2026-10-03T00:00:00.000Z

The range-operation library has been extended to implement relation handling for bitwise AND, OR, MIN, and MAX operations. When operands are equal, AND and OR operations simplify to the operand itself. When x <= y, MIN(x,y) simplifies to x, and when x >= y, MAX(x,y) simplifies to x. These improvements, identified during an audit of the DOM pass, will enable further simplifications by moving logic into range-ops.