Landing: d428b0147e25

Project / Subsystem

gcc / gcc

Date

2026-08-05

Author

Aldy Hernandez

Commit

d428b0147e257e573f224d9230cd87d8ef89e934

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc
patch_id
—
commit_hash
d428b0147e257e573f224d9230cd87d8ef89e934
source_type
github
headline
Use !contains_zero_p for known nonzero tests.
tldr
Replaced `nonzero_p` with `!contains_zero_p` for clarity in nonzero range 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 updates several parts of the GCC compiler to use !contains_zero_p instead of the nonzero_p function for checks related to ranges that exclude zero. The nonzero_p function was not always precise, as it returned false for ranges like [1, 5], which do not contain zero but also do not represent all non-zero values. Using !contains_zero_p provides a more accurate and direct representation of the intended condition.