Landing: 26238368615c
Project / Subsystem
gcc / middle-end
Date
2026-09-01
Author
Shreesh Adiga
Commit
26238368615c0a9e07a022da75bd90c26bc6a338
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- middle-end
- patch_id
- —
- commit_hash
- 26238368615c0a9e07a022da75bd90c26bc6a338
- source_type
- github
- headline
- Fold CRC builtins at compile time
- tldr
- GCC now computes CRC values at compile time if arguments are constant, avoiding runtime computation.
- author
- Shreesh Adiga
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- gcc:middle-end: add const fold for various crc builtins
- series_parts
- []
- tags
-
- • optimization
- • crc
- • compiler
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-01T00:00:00.000Z
GCC’s middle-end can now perform constant folding for various CRC (Cyclic Redundancy Check) built-in functions. This change computes CRC values at compile time when all arguments are compile-time constants, replacing runtime table-based computations with a simpler loop calculation. This optimization avoids runtime overhead for CRC operations, especially beneficial in performance-sensitive code. Future work will include architecture-specific CRC folding.