Landing: 573600a8073b

Project / Subsystem

gcc / bitintlower

Date

2026-06-05

Author

Jakub Jelinek

Commit

573600a8073b413ba3946fd0362150690eee1d59

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
bitintlower
patch_id
commit_hash
573600a8073b413ba3946fd0362150690eee1d59
source_type
github
headline
Bitintlower: Improve `__builtin_` lowering for bit operations on `_BitInt` types
tldr
GCC now generates more efficient code for bit manipulation and byte-swapping built-in functions when used with `_BitInt` types, avoiding unnecessary memory cop…
author
Jakub Jelinek
outcome
committed
performance_win
true
breaking_change
false
series_id
series_parts
[]
tags
  • optimization
  • bitint
  • builtins
  • performance
  • code-generation
discussion_id_link
bugzilla_pr
date
2026-06-05T00:00:00.000Z

GCC’s bitintlower pass has been enhanced to produce more optimized code for built-in functions like __builtin_bswapg and __builtin_clz when they operate on _BitInt types. Previously, the compiler would often copy _BitInt values to temporary storage before performing these operations. The updated lowering logic now allows direct operations on values in memory and can merge bswap/bitreverse results with subsequent store operations, significantly reducing unnecessary memory movements and improving performance, especially for larger _BitInt values.