Landing: 7306944cffc4

Project / Subsystem

gcc / gcc/tree-optimization

Date

2026-07-16

Author

Andrew MacLeod

Commit

7306944cffc49249c4947e6f9b13130986f24f5a

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
gcc/tree-optimization
patch_id
commit_hash
7306944cffc49249c4947e6f9b13130986f24f5a
source_type
github
headline
Logical AND and OR operations now better infer operand ranges.
tldr
Improved range analysis for logical AND/OR operations to infer more precise constraints on operands.
author
Andrew MacLeod
outcome
committed
performance_win
true
breaking_change
false
series_id
series_parts
[]
tags
  • gcc
  • optimization
discussion_id_link
bugzilla_pr
date
2026-07-16T00:00:00.000Z

This update enhances GCC’s rangeops to more accurately infer value ranges for operands involved in logical AND and OR operations. For example, it now recognizes that if op1 & TRUE results in [0, 0], then op1 must be [0, 0]. Similarly, for op1 | FALSE resulting in [1, 1], op1 must be [1, 1]. These improvements allow for tighter value range propagation, potentially enabling further optimizations.