re PR target/85756 (wrong code at -Os on x86-64-linux-gnu in 32-bit mode)
authorJakub Jelinek <jakub@redhat.com>
Mon, 14 May 2018 15:53:58 +0000 (17:53 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Mon, 14 May 2018 15:53:58 +0000 (17:53 +0200)
commit9c1326aa5f8031cb37fc6efb9a1e373aa50ffd48
treee01d8b22bf6a56b33c93e5ee0f9722121e54ff3d
parentcd2f262b2fa4292a39b97ab590b46e79d349817c
re PR target/85756 (wrong code at -Os on x86-64-linux-gnu in 32-bit mode)

PR target/85756
* config/i386/i386.md: Disallow non-commutative arithmetics in
last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
in the peephole2 before it.

testsuite/ChangeLog:

* gcc.c-torture/execute/pr85756.c: New test.

From-SVN: r260231
gcc/ChangeLog
gcc/config/i386/i386.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr85756.c [new file with mode: 0644]