https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127552
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Artemiy Volkov <[email protected]>: https://gcc.gnu.org/g:b70a80cfff503060f48a12c090e5b4983d3c6156 commit r17-4640-gb70a80cfff503060f48a12c090e5b4983d3c6156 Author: Artemiy Volkov <[email protected]> Date: Thu Sep 24 10:21:42 2026 +0000 match.pd: fix comparison in the ((X >> C1) & C2) << C3 pattern [PR127552] In this simplification rule added in r17-4511-g885ad73e630ca2, we assume that C1 and C3 are of the same type and call wi::leu_p () with those constants converted to wide_int. This leads to a triggered assert on wide-int.h:1049 whenever C1 and C3 have different precision, which causes an ICE reported in PR127552. Fix this by converting to widest_int instead. To test the change, amend the original match-bit-extract-shift.c file to use constants of various types in the existing testcases. Bootstrapped and regtested on aarch64-linux-gnu and x86_64-linux-gnu. PR tree-optimization/127552 gcc/ChangeLog: * match.pd: Fix constant comparison in ((X >> C1) & C2) << C3. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/match-bit-extract-shift.c: Adjust testcases.
