public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/33675] Badly optimized negations on x86 with -frounding-math
       [not found] <bug-33675-4@http.gcc.gnu.org/bugzilla/>
@ 2021-10-27 12:09 ` rguenth at gcc dot gnu.org
  0 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-27 12:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33675

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
As said, we try to honor volatile automatic variables as such and they get a
stack slot assigned for this reason.  Without the volatile but with
-frounding-math -O2 we get

        fldl    20(%esp)
        movl    16(%esp), %eax
        fchs
        fstps   4(%esp)
        flds    4(%esp)
        fchs
        fstps   (%eax)

which is what you expect.  Fixed (or wontfix with the volatile).

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug middle-end/33675] Badly optimized negations on x86 with -frounding-math
  2007-10-06  9:49 [Bug c/33675] New: " bagnara at cs dot unipr dot it
  2007-10-06 11:45 ` [Bug middle-end/33675] " pinskia at gcc dot gnu dot org
  2007-10-06 13:04 ` bagnara at cs dot unipr dot it
@ 2007-10-08  8:53 ` rguenth at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-10-08  8:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2007-10-08 08:53 -------
The first store is for the truncation to float, the second store is because
of the volatile.  Now we could combine the first into the second, but in
general we don't care too much to try optimize code which uses volatile.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |missed-optimization
   Last reconfirmed|0000-00-00 00:00:00         |2007-10-08 08:53:42
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33675


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug middle-end/33675] Badly optimized negations on x86 with -frounding-math
  2007-10-06  9:49 [Bug c/33675] New: " bagnara at cs dot unipr dot it
  2007-10-06 11:45 ` [Bug middle-end/33675] " pinskia at gcc dot gnu dot org
@ 2007-10-06 13:04 ` bagnara at cs dot unipr dot it
  2007-10-08  8:53 ` rguenth at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: bagnara at cs dot unipr dot it @ 2007-10-06 13:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from bagnara at cs dot unipr dot it  2007-10-06 13:03 -------
I don't understand.  Do you mean that what I consider the natural compilation
of that piece of code (the shorter assembly listing) is incorrect?  In other
words: do you think that the shorter assembly listing does not properly honor
the volatile qualifier?
If so, why?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33675


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug middle-end/33675] Badly optimized negations on x86 with -frounding-math
  2007-10-06  9:49 [Bug c/33675] New: " bagnara at cs dot unipr dot it
@ 2007-10-06 11:45 ` pinskia at gcc dot gnu dot org
  2007-10-06 13:04 ` bagnara at cs dot unipr dot it
  2007-10-08  8:53 ` rguenth at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-10-06 11:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2007-10-06 11:45 -------
That is becasue there is a cast to volatile float which causes an extra store.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
          Component|c                           |middle-end


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33675


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-27 12:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-33675-4@http.gcc.gnu.org/bugzilla/>
2021-10-27 12:09 ` [Bug middle-end/33675] Badly optimized negations on x86 with -frounding-math rguenth at gcc dot gnu.org
2007-10-06  9:49 [Bug c/33675] New: " bagnara at cs dot unipr dot it
2007-10-06 11:45 ` [Bug middle-end/33675] " pinskia at gcc dot gnu dot org
2007-10-06 13:04 ` bagnara at cs dot unipr dot it
2007-10-08  8:53 ` rguenth at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).