]> git.ipfire.org Git - thirdparty/gcc.git/commit
backport: re PR rtl-optimization/68376 (wrong code at -O1 and above on x86_64-linux...
authorJakub Jelinek <jakub@redhat.com>
Thu, 11 Feb 2016 09:11:58 +0000 (10:11 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 11 Feb 2016 09:11:58 +0000 (10:11 +0100)
commite292ca0e5fe24156aa4a96b03e7a1aed4967f665
treeb474c0fd2aedf2e4f5801ba10c4044826ad82e59
parent2f5dd203e0ee48d1e0e57eab25d8aad0f2206504
backport: re PR rtl-optimization/68376 (wrong code at -O1 and above on x86_64-linux-gnu)

Backported from mainline
2015-12-10  Jakub Jelinek  <jakub@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  <jakub@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.

From-SVN: r233323
gcc/ChangeLog
gcc/ifcvt.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr68376-1.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/pr68376-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr68670-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr68670-2.c [new file with mode: 0644]