[Bug target/84172] option "-O3" create slower code

2018-02-05 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84172

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #10 from Richard Biener  ---
Indeed fixed in GCC 7.

[Bug target/84172] option "-O3" create slower code

2018-02-01 Thread aotto1...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84172

--- Comment #9 from Andreas Otto  ---
after morning "boot" it seems OK… BUT the bug come back

→ star without "-g" option

#:~/test> make test
for t in test.0 test.1 test.2 test.3; do ./$t; done
./test.0 → T1 = 663.640015 ms → HI = 0x1, LO = 0
./test.0 → T2 = 490.407990 ms → HI = 0x1, LO = 0
./test.1 → T1 = 137.326996 ms → HI = 0x1, LO = 0
./test.1 → T2 = 133.870010 ms → HI = 0x1, LO = 0
./test.2 → T1 = 138.035995 ms → HI = 0x1, LO = 0
./test.2 → T2 = 135.183014 ms → HI = 0x1, LO = 0
./test.3 → T1 = 137.481003 ms → HI = 0x1, LO = 0
./test.3 → T2 = 134.893997 ms → HI = 0x1, LO = 0
#:~/test> make test
for t in test.0 test.1 test.2 test.3; do ./$t; done
./test.0 → T1 = 656.669983 ms → HI = 0x1, LO = 0
./test.0 → T2 = 490.566986 ms → HI = 0x1, LO = 0
./test.1 → T1 = 134.537994 ms → HI = 0x1, LO = 0
./test.1 → T2 = 132.356003 ms → HI = 0x1, LO = 0
./test.2 → T1 = 144.015991 ms → HI = 0x1, LO = 0
./test.2 → T2 = 134.715012 ms → HI = 0x1, LO = 0
./test.3 → T1 = 137.255997 ms → HI = 0x1, LO = 0
./test.3 → T2 = 134.914001 ms → HI = 0x1, LO = 0

add "-g" option again

#:~/test> make test
gcc-5 -march=native -mtune=native -g -static -O0 -o test.0 main.c
gcc-5 -march=native -mtune=native -g -static -O1 -o test.1 main.c
gcc-5 -march=native -mtune=native -g -static -O2 -o test.2 main.c
gcc-5 -march=native -mtune=native -g -static -O3 -o test.3 main.c
for t in test.0 test.1 test.2 test.3; do ./$t; done
./test.0 → T1 = 655.403992 ms → HI = 0x1, LO = 0
./test.0 → T2 = 490.989014 ms → HI = 0x1, LO = 0
./test.1 → T1 = 132.431000 ms → HI = 0x1, LO = 0
./test.1 → T2 = 133.049988 ms → HI = 0x1, LO = 0
./test.2 → T1 = 141.020004 ms → HI = 0x1, LO = 0
./test.2 → T2 = 135.460999 ms → HI = 0x1, LO = 0
./test.3 → T1 = 211.210999 ms → HI = 0x1, LO = 0
./test.3 → T2 = 225.455002 ms → HI = 0x1, LO = 0
#:~/test> make test
for t in test.0 test.1 test.2 test.3; do ./$t; done
./test.0 → T1 = 662.700989 ms → HI = 0x1, LO = 0
./test.0 → T2 = 490.704010 ms → HI = 0x1, LO = 0
./test.1 → T1 = 146.843994 ms → HI = 0x1, LO = 0
./test.1 → T2 = 133.729996 ms → HI = 0x1, LO = 0
./test.2 → T1 = 140.351990 ms → HI = 0x1, LO = 0
./test.2 → T2 = 134.825012 ms → HI = 0x1, LO = 0
./test.3 → T1 = 213.688995 ms → HI = 0x1, LO = 0
./test.3 → T2 = 225.066010 ms → HI = 0x1, LO = 0

disable "-g" option

#:~/test> make test
gcc-5 -march=native -mtune=native -static -O0 -o test.0 main.c 
gcc-5 -march=native -mtune=native -static -O1 -o test.1 main.c 
gcc-5 -march=native -mtune=native -static -O2 -o test.2 main.c 
gcc-5 -march=native -mtune=native -static -O3 -o test.3 main.c 
for t in test.0 test.1 test.2 test.3; do ./$t; done
./test.0 → T1 = 652.817017 ms → HI = 0x1, LO = 0
./test.0 → T2 = 490.574005 ms → HI = 0x1, LO = 0
./test.1 → T1 = 139.962006 ms → HI = 0x1, LO = 0
./test.1 → T2 = 134.207001 ms → HI = 0x1, LO = 0
./test.2 → T1 = 134.936005 ms → HI = 0x1, LO = 0
./test.2 → T2 = 135.485001 ms → HI = 0x1, LO = 0
./test.3 → T1 = 217.895004 ms → HI = 0x1, LO = 0
./test.3 → T2 = 224.744003 ms → HI = 0x1, LO = 0
#:~/test> make test
for t in test.0 test.1 test.2 test.3; do ./$t; done
./test.0 → T1 = 660.490967 ms → HI = 0x1, LO = 0
./test.0 → T2 = 490.671997 ms → HI = 0x1, LO = 0
./test.1 → T1 = 141.137009 ms → HI = 0x1, LO = 0
./test.1 → T2 = 133.236008 ms → HI = 0x1, LO = 0
./test.2 → T1 = 136.444000 ms → HI = 0x1, LO = 0
./test.2 → T2 = 135.473999 ms → HI = 0x1, LO = 0
./test.3 → T1 = 256.563019 ms → HI = 0x1, LO = 0
./test.3 → T2 = 225.742996 ms → HI = 0x1, LO = 0

do som additional testing

#:~/test> rm test.
test.0  test.1  test.2  test.3  
#:~/test> rm test.*
#:~/test> make test
gcc-5 -march=native -mtune=native -static -O0 -o test.0 main.c 
gcc-5 -march=native -mtune=native -static -O1 -o test.1 main.c 
gcc-5 -march=native -mtune=native -static -O2 -o test.2 main.c 
gcc-5 -march=native -mtune=native -static -O3 -o test.3 main.c 
for t in test.0 test.1 test.2 test.3; do ./$t; done
./test.0 → T1 = 652.343994 ms → HI = 0x1, LO = 0
./test.0 → T2 = 490.720978 ms → HI = 0x1, LO = 0
./test.1 → T1 = 132.760010 ms → HI = 0x1, LO = 0
./test.1 → T2 = 132.718994 ms → HI = 0x1, LO = 0
./test.2 → T1 = 135.055008 ms → HI = 0x1, LO = 0
./test.2 → T2 = 135.212997 ms → HI = 0x1, LO = 0
./test.3 → T1 = 221.292007 ms → HI = 0x1, LO = 0
./test.3

[Bug target/84172] option "-O3" create slower code

2018-02-01 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84172

Marc Glisse  changed:

   What|Removed |Added

  Known to work||7.2.0
  Known to fail||5.5.0, 6.4.0

--- Comment #8 from Marc Glisse  ---
As far as I can tell, this is already fixed in gcc-7.

[Bug target/84172] option "-O3" create slower code

2018-02-01 Thread aotto1...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84172

--- Comment #7 from Andreas Otto  ---
Created attachment 43321
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43321=edit
cat /proc/cpuinfo

[Bug target/84172] option "-O3" create slower code

2018-02-01 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84172

--- Comment #6 from Andrew Pinski  ---
Can you also send the output of:
cat /proc/cpuinfo
?

[Bug target/84172] option "-O3" create slower code

2018-02-01 Thread aotto1...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84172

--- Comment #5 from Andreas Otto  ---
Created attachment 43320
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43320=edit
output of command you requested…

gcc-5 -march=native -mtune=native -g -static -O3 -o test.3 main.c -v

[Bug target/84172] option "-O3" create slower code

2018-02-01 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84172

--- Comment #4 from Andrew Pinski  ---
(In reply to Andreas Otto from comment #3)
> send me the command that I should run…

I did:
(In reply to Andrew Pinski from comment #2)
> gcc-5 -march=native -mtune=native -g -static -O3 -o test.3 main.c -v

[Bug target/84172] option "-O3" create slower code

2018-02-01 Thread aotto1...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84172

--- Comment #3 from Andreas Otto  ---
send me the command that I should run…

[Bug target/84172] option "-O3" create slower code

2018-02-01 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84172

Andrew Pinski  changed:

   What|Removed |Added

 Target||x86_64-suse-linux
  Component|c   |target

--- Comment #2 from Andrew Pinski  ---
Can you provide the output of the following command:
gcc-5 -march=native -mtune=native -g -static -O3 -o test.3 main.c -v

We need to know what -march=native expands to.