https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68376
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Thu Feb 11 09:11:58 2016 New Revision: 233323 URL: https://gcc.gnu.org/viewcvs?rev=233323&root=gcc&view=rev Log: Backported from mainline 2015-12-10 Jakub Jelinek <ja...@redhat.com> PR rtl-optimization/68376 PR rtl-optimization/68670 * ifcvt.c (noce_try_abs): For one_cmpl allow < 0, >= 0 or > -1 conditions regardless of negate, and disallow all other conditions. * gcc.c-torture/execute/pr68376-2.c (f5, f6, f7, f8): New tests. (main): Call them. * gcc.dg/pr68670-1.c: New test. * gcc.dg/pr68670-2.c: New test. 2015-11-19 Jakub Jelinek <ja...@redhat.com> PR rtl-optimization/68376 * ifcvt.c (noce_try_abs): Disable one_cmpl optimization if encountering x <= 0 ? ~x : x or x > 0 ? ~x : x. * gcc.c-torture/execute/pr68376-1.c: New test. * gcc.c-torture/execute/pr68376-2.c: New test. Added: branches/gcc-4_9-branch/gcc/testsuite/gcc.c-torture/execute/pr68376-1.c branches/gcc-4_9-branch/gcc/testsuite/gcc.c-torture/execute/pr68376-2.c branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/pr68670-1.c branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/pr68670-2.c Modified: branches/gcc-4_9-branch/gcc/ChangeLog branches/gcc-4_9-branch/gcc/ifcvt.c branches/gcc-4_9-branch/gcc/testsuite/ChangeLog