https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122991
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Jakub Jelinek <[email protected]>: https://gcc.gnu.org/g:10932131fd133554ecd92f792e48f1015229dac6 commit r15-10586-g10932131fd133554ecd92f792e48f1015229dac6 Author: Jakub Jelinek <[email protected]> Date: Thu Dec 4 20:37:00 2025 +0100 aarch64: Fix crc{,_rev}<SWI124:mode>si4 expanders [PR122991] The newly added gcc.dg/pr122991.c test fails also on aarch64. The problem is the same as on x86 which has been fixed in r16-5882, while the last operand is guaranteed to be a CONST_INT of the right mode initially, maybe_legitimize_operands can change that if some earlier operand has the same value and e.g. register_operand predicate has been used, that operand is forced into a pseudo and maybe_legitimize_operands then checks if that satisfies the predicate of the other operand. As on x86 and aarch64 it didn't have any predicate, it happily used a pseudo in those cases instead of the expected CONST_INT. The following patch fixes that. 2025-12-04 Jakub Jelinek <[email protected]> PR target/122991 * config/aarch64/aarch64.md (crc_rev<ALLI:mode><ALLX:mode>4, crc<ALLI:mode><ALLX:mode>4): Use const_int_operand predicate for the last operand. (cherry picked from commit 8d36603b8501b33525ebf583f0bb6ca489fee000)
