https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70429
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Thu Jul 7 21:50:41 2016 New Revision: 238141 URL: https://gcc.gnu.org/viewcvs?rev=238141&root=gcc&view=rev Log: Backported from mainline 2016-03-29 Jakub Jelinek <ja...@redhat.com> PR rtl-optimization/70429 * combine.c (simplify_shift_const_1): For ASHIFTRT don't optimize (cst1 >> count) >> cst2 into (cst1 >> cst2) >> count if mode != result_mode. * gcc.c-torture/execute/pr70429.c: New test. Added: branches/gcc-4_9-branch/gcc/testsuite/gcc.c-torture/execute/pr70429.c Modified: branches/gcc-4_9-branch/gcc/ChangeLog branches/gcc-4_9-branch/gcc/combine.c branches/gcc-4_9-branch/gcc/testsuite/ChangeLog