Landing: 253c4edd1d5d

Project / Subsystem

gcc / bitintlower

Date

2026-10-01

Author

Jakub Jelinek

Commit

253c4edd1d5d20d562ca89329d9664812538f0a5

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
bitintlower
patch_id
—
commit_hash
253c4edd1d5d20d562ca89329d9664812538f0a5
source_type
github
headline
Fix lowering of bswapg/bitreverseg for _BitInt types
tldr
GCC fixes miscompilation of _BitInt types in bswapg/bitreverseg operations by correcting how partial limbs are handled.
author
Jakub Jelinek
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • optimization
  • • compiler bug
discussion_id_link
—
bugzilla_pr
—
date
2026-10-01T00:00:00.000Z

This commit addresses a miscompilation issue in GCC related to the lowering of bswapg and bitreverseg operations for _BitInt types. The problem stemmed from incorrect handling of partial limbs during the lowering process, where optimizations intended for constant indices failed to account for the full bit-reversal logic. The fix ensures that all necessary bits, including those in partial limbs, are correctly processed, preventing incorrect results.