Landing: 1e5dca08d72f
Project / Subsystem
gcc / match.pd
Date
2026-07-30
Author
Jakub Jelinek
Commit
1e5dca08d72f83a6c4ea3bcd2f7cc80bdfd6fc0b
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- match.pd
- patch_id
- —
- commit_hash
- 1e5dca08d72f83a6c4ea3bcd2f7cc80bdfd6fc0b
- source_type
- github
- headline
- match.pd: Optimize parity of bit-reversed values.
- tldr
- Improves optimization for `parity(bitreverse(x))` by handling generic bit-reverses.
- author
- Jakub Jelinek
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • bit-manipulation
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-07-30T00:00:00.000Z
This commit enhances the match.pd pattern matching to correctly optimize the parity of bit-reversed values. Previously, certain bit-reversal operations, particularly for generic _BitInt types and all bit-reverse builtins, were not recognized. This update allows the compiler to simplify expressions like parity(bitreverse(x)) more effectively, similar to how it handles parity(bswap(x)).