https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126462
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-16 branch has been updated by Jeff Law <[email protected]>: https://gcc.gnu.org/g:4520a26b9ba46a7f7c59265c8d26f9d2ed761ecd commit r16-9801-g4520a26b9ba46a7f7c59265c8d26f9d2ed761ecd Author: Jeff Law <[email protected]> Date: Sun Sep 27 08:54:33 2026 -0600 [PATCH][PR tree-optimization/126462] Fix reassociation exposing rotate+xor to work correctly for int128 and BitInt This has been pending in my queue for a while. Just keeps getting pushed down. As the PR notes, I added a patch a while back that could reassociate an xor operation out of certain sequences which in turn would allow the sequence to be recognized as rotate+xor. That patch did not handle 128 bit integers as I used the HOST_WIDE_INT interfaces. Similarly it didn't handle BitInt. This patch changes it to use the wi:: interfaces which fix the code generation issue on aarch64 with int128 and allow the sequence to safely fire for BitInt. The recommendations for adjustment were Jakub's. Bootstrapped and regression tested on x86, aarch64 and riscv. Crosses also tested without regressions, though I don't think they provide meaningfully more coverage for int128 and BitInt. PR tree-optimization/126462 gcc/ * match.pd (reassociate xor to expose rotate patterns): Rewrite using wi:: interfaces for the xor constant operand. gcc/testsuite/ * gcc.dg/torture/pr126462.c: New test. (cherry picked from commit 55867c37ec0dd0c4f1872183a6e43ea7dc16d479)
