http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56920
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-12 09:13:15 UTC --- Author: jakub Date: Fri Apr 12 08:18:59 2013 New Revision: 197846 URL: http://gcc.gnu.org/viewcvs?rev=197846&root=gcc&view=rev Log: PR tree-optimization/56918 PR tree-optimization/56920 * fold-const.c (int_const_binop_1): Use op1.mul_with_sign (op2, ...) instead of op1 - op2. Pass 2 * TYPE_PRECISION (type) as second argument to rshift method. For 2 * HOST_BITS_PER_WIDE_INT precision use wide_mul_with_sign method. * gcc.dg/vect/pr56918.c: New test. * gcc.dg/vect/pr56920.c: New test. Added: trunk/gcc/testsuite/gcc.dg/vect/pr56918.c trunk/gcc/testsuite/gcc.dg/vect/pr56920.c Modified: trunk/gcc/ChangeLog trunk/gcc/fold-const.c trunk/gcc/testsuite/ChangeLog Author: jakub Date: Fri Apr 12 08:38:29 2013 New Revision: 197847 URL: http://gcc.gnu.org/viewcvs?rev=197847&root=gcc&view=rev Log: PR tree-optimization/56918 PR tree-optimization/56920 * fold-const.c (int_const_binop_1): Use op1.mul_with_sign (op2, ...) instead of op1 - op2. Pass 2 * TYPE_PRECISION (type) as second argument to rshift method. * gcc.dg/vect/pr56918.c: New test. * gcc.dg/vect/pr56920.c: New test. Added: branches/gcc-4_8-branch/gcc/testsuite/gcc.dg/vect/pr56918.c branches/gcc-4_8-branch/gcc/testsuite/gcc.dg/vect/pr56920.c Modified: branches/gcc-4_8-branch/gcc/ChangeLog branches/gcc-4_8-branch/gcc/fold-const.c branches/gcc-4_8-branch/gcc/testsuite/ChangeLog