Landing: 9231e36eeff6

Project / Subsystem

gcc / gcc

Date

2026-08-05

Author

Aldy Hernandez

Commit

9231e36eeff6ec576e99f4c7c4b30e9fced44cd1

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc
patch_id
—
commit_hash
9231e36eeff6ec576e99f4c7c4b30e9fced44cd1
source_type
github
headline
Add contains_zero_p predicate to value range hierarchy.
tldr
Introduces `contains_zero_p` to value range types for clearer zero checks.
author
Aldy Hernandez
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • optimization
  • • refactor
discussion_id_link
—
bugzilla_pr
—
date
2026-08-05T00:00:00.000Z

This commit introduces a new pure virtual function, contains_zero_p(), to the GCC compiler’s value range analysis hierarchy. This predicate clearly indicates whether a given range includes the value zero. It serves as a more explicit replacement for the previously used nonzero_p() function, which had ambiguous behavior. The new function is implemented for various range types, improving the clarity and precision of range analysis.