[Bug target/85683] [8 Regression] GCC 8 stopped using RMW (Read Modify Write) instructions on x86[_64]

2018-05-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85683

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Jakub Jelinek  ---
Fixed for 8.2+.

[Bug target/85683] [8 Regression] GCC 8 stopped using RMW (Read Modify Write) instructions on x86[_64]

2018-05-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85683

--- Comment #7 from Jakub Jelinek  ---
Author: jakub
Date: Wed May 30 07:19:24 2018
New Revision: 260915

URL: https://gcc.gnu.org/viewcvs?rev=260915=gcc=rev
Log:
Backported from mainline
2018-05-08  Jakub Jelinek  

PR target/85683
* config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
after cmpelim optimization.

* gcc.target/i386/pr49095.c: Add -masm=att to dg-options.  Add
scan-assembler-times checking that except for [fh]*xor other functions
don't use any load instructions.

Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/config/i386/i386.md
branches/gcc-8-branch/gcc/testsuite/ChangeLog
branches/gcc-8-branch/gcc/testsuite/gcc.target/i386/pr49095.c

[Bug target/85683] [8 Regression] GCC 8 stopped using RMW (Read Modify Write) instructions on x86[_64]

2018-05-14 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85683
Bug 85683 depends on bug 85756, which changed state.

Bug 85756 Summary: [9 regression] wrong code at -Os on x86-64-linux-gnu in 
32-bit mode
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85756

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

[Bug target/85683] [8 Regression] GCC 8 stopped using RMW (Read Modify Write) instructions on x86[_64]

2018-05-08 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85683

Jakub Jelinek  changed:

   What|Removed |Added

Summary|[8/9 Regression] GCC 8  |[8 Regression] GCC 8
   |stopped using RMW (Read |stopped using RMW (Read
   |Modify Write) instructions  |Modify Write) instructions
   |on x86[_64] |on x86[_64]

--- Comment #6 from Jakub Jelinek  ---
Fixed for GCC9 so far, will backport to 8.2 after a while.

[Bug target/85683] [8 Regression] GCC 8 stopped using RMW (Read Modify Write) instructions on x86[_64]

2018-05-07 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85683

Alexander Monakov  changed:

   What|Removed |Added

   Keywords||missed-optimization
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-05-07
 CC||amonakov at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Alexander Monakov  ---
Smaller testcase:

void f(void);

void g(int *p)
{
if (!--*p)
f();
}

On gcc-7.3 this is optimized by the peephole2 pass so it doesn't really help
with register pressure (combine pass seems more suitable for that); don't know
why the peephole doesn't trigger on gcc-8.