Landing: ed9f5bf1c128
Project / Subsystem
gcc / match
Date
2026-09-20
Author
Samarth Tandale
Commit
ed9f5bf1c1288168b14edd3e35f4d32330bef66d
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- match
- patch_id
- —
- commit_hash
- ed9f5bf1c1288168b14edd3e35f4d32330bef66d
- source_type
- github
- headline
- Simplify value-range guarded min/max expressions.
- tldr
- Optimizes MIN_EXPR and MAX_EXPR by simplifying expressions involving type limits and constant values.
- author
- Samarth Tandale
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • tree-ssa
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-20T00:00:00.000Z
This change simplifies MIN_EXPR and MAX_EXPR in the match module. When one operand is at the maximum or minimum value for its type, the expression can be reduced. The optimization is extended to handle constant values that fall within specific ranges, improving code generation by avoiding unnecessary conditional checks and min/max operations.