This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/29538] Incorrect interpretation of floating-point unary minus
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Oct 2006 18:19:02 -0000
- Subject: [Bug target/29538] Incorrect interpretation of floating-point unary minus
- References: <bug-29538-7904@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from rguenth at gcc dot gnu dot org 2006-10-21 18:19 -------
Unary negation does not affect rounding, so I fail to see how it shall matter
what type the negation is done on.
It is true that for x87 math the -(float)x sequence is slower:
g:
pushl %ebp
movl %esp, %ebp
subl $4, %esp
fldl 8(%ebp)
fstps -4(%ebp)
flds -4(%ebp)
fchs
fstps 8(%ebp)
leave
jmp f
so, confirmed as missed-optimization.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Component|c |target
Ever Confirmed|0 |1
GCC target triplet| |i?86-*-*
Keywords| |missed-optimization
Last reconfirmed|0000-00-00 00:00:00 |2006-10-21 18:19:02
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29538