This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/5739] "const" and "pure" function attributes pessimize code due to poor RA
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Sep 2008 04:18:49 -0000
- Subject: [Bug rtl-optimization/5739] "const" and "pure" function attributes pessimize code due to poor RA
- References: <bug-5739-1008@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from pinskia at gcc dot gnu dot org 2008-09-14 04:18 -------
Hmm, IRA for x87 produces worse code for even the non pure/const case.
before:
L2:
fstl (%eax)
leal -24(%ebp), %ecx
flds (%edx)
fstpl 8(%eax)
addl $16, %eax
cmpl %ecx, %eax
jne L2
After:
jmp L2
L11:
fxch %st(1)
L2:
fstl (%eax)
fxch %st(1)
leal -24(%ebp), %edx
fstl 8(%eax)
addl $16, %eax
cmpl %edx, %eax
jne L11
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5739