https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70429
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Wed Mar 30 12:45:39 2016 New Revision: 234567 URL: https://gcc.gnu.org/viewcvs?rev=234567&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-5-branch/gcc/testsuite/gcc.c-torture/execute/pr70429.c Modified: branches/gcc-5-branch/gcc/ChangeLog branches/gcc-5-branch/gcc/combine.c branches/gcc-5-branch/gcc/testsuite/ChangeLog