This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/29538] Incorrect interpretation of floating-point unary minus



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]