[Bug target/81516] Wrong code with -m32 -O2 on x86_64-linux-gnu

2017-07-23 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81516 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug target/81516] Wrong code with -m32 -O2 on x86_64-linux-gnu

2017-07-23 Thread davmac at davmac dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81516 --- Comment #8 from Davin McCall --- This problem disappears when I apply the fix for #80706 (as applied to GCC 7 branch). Possibly this is a duplicate of that issue.

[Bug target/81516] Wrong code with -m32 -O2 on x86_64-linux-gnu

2017-07-22 Thread davmac at davmac dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81516 --- Comment #7 from Davin McCall --- (In reply to Uroš Bizjak from comment #6) > > Works OK for me with: > > .ident "GCC: (GNU) 7.1.1 20170718 [gcc-7-branch revision 250314]" Reported against 7.1.0. It may well be fixed already on the

[Bug target/81516] Wrong code with -m32 -O2 on x86_64-linux-gnu

2017-07-22 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81516 --- Comment #6 from Uroš Bizjak --- (In reply to mednafen from comment #2) > Created attachment 41811 [details] > alternate, further reduced test case Works OK for me with: -O2 -m32 -march=i686 -msse2 -mfpmath=387 a: subl$20, %esp

[Bug target/81516] Wrong code with -m32 -O2 on x86_64-linux-gnu

2017-07-22 Thread mednafen at sent dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81516 --- Comment #5 from mednafen at sent dot com --- Generated assembly looks like it's grabbing garbage off the stack and writing it to b: a: subl$20, %esp fildl 24(%esp) movsd (%esp), %xmm1 movsd %xmm1, b

[Bug target/81516] Wrong code with -m32 -O2 on x86_64-linux-gnu

2017-07-22 Thread davmac at davmac dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81516 --- Comment #4 from Davin McCall --- (In reply to Andrew Pinski from comment #3) > Most likely a dup of bug 323. I don't think so, unless I'm misunderstanding something. There's no rounding in the test case, just a store of an int value to a dou

[Bug target/81516] Wrong code with -m32 -O2 on x86_64-linux-gnu

2017-07-22 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81516 --- Comment #3 from Andrew Pinski --- Most likely a dup of bug 323.

[Bug target/81516] Wrong code with -m32 -O2 on x86_64-linux-gnu

2017-07-22 Thread mednafen at sent dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81516 mednafen at sent dot com changed: What|Removed |Added CC||mednafen at sent dot com --- C

[Bug target/81516] Wrong code with -m32 -O2 on x86_64-linux-gnu

2017-07-22 Thread davmac at davmac dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81516 --- Comment #1 from Davin McCall --- (triggers with -march=prescott|haswell, not with -march=i686)