Landing: 5e933bd275f0
Project / Subsystem
gcc / gcc/match
Date
2026-05-08
Author
Andrew Pinski
Commit
5e933bd275f0e6eef18692ef351cb5d617f48d51
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc/match
- patch_id
- —
- commit_hash
- 5e933bd275f0e6eef18692ef351cb5d617f48d51
- source_type
- github
- headline
- Match: Corrected merged patterns for a!=b implying a and b are not zero.
- tldr
- Fixes a bug in pattern matching that caused incorrect boolean results when comparing variables against zero.
- author
- Andrew Pinski
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • bugfix
- • pattern matching
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-05-08T00:00:00.000Z
This commit fixes an issue in GCC’s pattern matching that caused the wrong constant to be generated for expressions like (a != b) & ((a | b) == 0). The bug was introduced in a previous commit and resulted in swapped true/false values. A new test case ensures this doesn’t regress.