This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/81516] Wrong code with -m32 -O2 on x86_64-linux-gnu
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 22 Jul 2017 20:21:08 +0000
- Subject: [Bug target/81516] Wrong code with -m32 -O2 on x86_64-linux-gnu
- Auto-submitted: auto-generated
- References: <bug-81516-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81516
--- Comment #6 from Uroš Bizjak <ubizjak at gmail dot com> ---
(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
fildl 24(%esp)
cmpl $10, 24(%esp)
fstpl (%esp)
movq (%esp), %xmm0
movsd (%esp), %xmm1
movq %xmm0, 8(%esp)
movsd %xmm1, b
jg .L1
xorl %eax, %eax
movl %eax, 12(%esp)
movsd 8(%esp), %xmm2
movsd %xmm2, (%esp)
.L1:
fldl (%esp)
addl $20, %esp
ret
.ident "GCC: (GNU) 7.1.1 20170718 [gcc-7-branch revision 250314]"