https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86627
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Thu Jul 26 16:38:11 2018 New Revision: 263017 URL: https://gcc.gnu.org/viewcvs?rev=263017&root=gcc&view=rev Log: Backported from mainline 2018-07-24 Jakub Jelinek <ja...@redhat.com> PR middle-end/86627 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT and abs_d == d, do the power of two handling if profitable. * gcc.target/i386/pr86627.c: New test. Added: branches/gcc-8-branch/gcc/testsuite/gcc.target/i386/pr86627.c Modified: branches/gcc-8-branch/gcc/ChangeLog branches/gcc-8-branch/gcc/expmed.c branches/gcc-8-branch/gcc/testsuite/ChangeLog