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 <[email protected]>: https://gcc.gnu.org/g:7ca53f9d86ef5f4c6a49f414f3cdd88d2b8a0bad commit r17-549-g7ca53f9d86ef5f4c6a49f414f3cdd88d2b8a0bad Author: Jakub Jelinek <[email protected]> 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 <[email protected]> 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 <[email protected]>
