https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86627
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Fri Oct 12 14:53:11 2018 New Revision: 265109 URL: https://gcc.gnu.org/viewcvs?rev=265109&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-7-branch/gcc/testsuite/gcc.target/i386/pr86627.c Modified: branches/gcc-7-branch/gcc/ChangeLog branches/gcc-7-branch/gcc/expmed.c branches/gcc-7-branch/gcc/testsuite/ChangeLog