[Bug middle-end/50481] builtin to reverse the bit order
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat May 16 08:52:22 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50481
--- Comment #22 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:7ca53f9d86ef5f4c6a49f414f3cdd88d2b8a0bad
commit r17-549-g7ca53f9d86ef5f4c6a49f414f3cdd88d2b8a0bad
Author: Jakub Jelinek <jakub@redhat.com>
Date: Sat May 16 10:50:00 2026 +0200
tree-ssa-ccp: Fix up __builtin_bitreverse* handling [PR50481]
The committed __builtin_bitreverse* patch mishandled the
bitwise CCP handling, it is true that BUILT_IN_BITREVERSE* can be
handled there similarly to BUILT_IN_BSWAP*, but not exactly, for
the latter we need (and do) bswap the value and mask constants,
while for the former we obviously need to bitreverse them instead.
2026-05-16 Jakub Jelinek <jakub@redhat.com>
PR target/50481
* tree-ssa-ccp.cc (evaluate_stmt): Fix up
BUILT_IN_BITREVERSE{8,16,32,64} handling.
* gcc.dg/builtin-bitreverse-3.c: New test.
Reviewed-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
More information about the Gcc-bugs
mailing list