https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125790
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Andrew Pinski <[email protected]>: https://gcc.gnu.org/g:256d683ac8ed30459b81b1498390252057e314a9 commit r17-1559-g256d683ac8ed30459b81b1498390252057e314a9 Author: Andrew Pinski <[email protected]> Date: Sun Jun 14 13:19:47 2026 -0700 match: Fix up `(~x) >> (type)x` pattern for truncation [PR125790] I missed this during the review and when I suggest adding support for the cast. But a truncation of the shifter operand the value could be defined. Since the front-end adds a cast to unsigned int, we need to split pr125707.c into two and xfail the long case and change it to `long long` so it would xfail for ilp32 [and llp64il32] targets. PR tree-optimization/125790 gcc/ChangeLog: * match.pd (`(~x)>>x`): Reject truncation of shifter. gcc/testsuite/ChangeLog: * gcc.dg/pr125707.c: Move the long over to pr125707-1.c. * gcc.dg/pr125707-1.c: New test; xfailed. * gcc.dg/pr125790-1.c: New test. Signed-off-by: Andrew Pinski <[email protected]>
