public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/48227] New: "rep ret" generated for -march=core2
@ 2011-03-22  9:10 zuxy.meng at gmail dot com
  2011-04-01 19:21 ` [Bug target/48227] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: zuxy.meng at gmail dot com @ 2011-03-22  9:10 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: "rep ret" generated for -march=core2
           Product: gcc
           Version: 4.5.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zuxy.meng@gmail.com


gcc 4.5 will use "rep; ret" for K8, Athlon, AMDFam10, Core2, and
generic.  Looking into the change history, we can see that gcc has padded
returns for Core2 ever since Core2 support was added here:
http://gcc.gnu.org/ml/gcc-patches/2006-11/msg00860.html

It is suspected
that Vlad just copied the generic tunings for Core2, and didn't notice
that there was no particular reason to pad returns for Core2.


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

* [Bug target/48227] "rep ret" generated for -march=core2
  2011-03-22  9:10 [Bug target/48227] New: "rep ret" generated for -march=core2 zuxy.meng at gmail dot com
@ 2011-04-01 19:21 ` pinskia at gcc dot gnu.org
  2011-04-02  0:55 ` ian at airs dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-04-01 19:21 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86_64-linux-gnu

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-04-01 19:20:52 UTC ---
A good question is does it make a difference in actual performance numbers, it
might still make a positive difference.  Until someone tries it out and sees
the difference in performance, I am going to say we should keep it.


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

* [Bug target/48227] "rep ret" generated for -march=core2
  2011-03-22  9:10 [Bug target/48227] New: "rep ret" generated for -march=core2 zuxy.meng at gmail dot com
  2011-04-01 19:21 ` [Bug target/48227] " pinskia at gcc dot gnu.org
@ 2011-04-02  0:55 ` ian at airs dot com
  2011-04-06 13:42 ` zuxy.meng at gmail dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ian at airs dot com @ 2011-04-02  0:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Ian Lance Taylor <ian at airs dot com> 2011-04-02 00:55:40 UTC ---
If it doesn't make a difference in performance, we should get rid of it, so
that we can save a byte of code.


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

* [Bug target/48227] "rep ret" generated for -march=core2
  2011-03-22  9:10 [Bug target/48227] New: "rep ret" generated for -march=core2 zuxy.meng at gmail dot com
  2011-04-01 19:21 ` [Bug target/48227] " pinskia at gcc dot gnu.org
  2011-04-02  0:55 ` ian at airs dot com
@ 2011-04-06 13:42 ` zuxy.meng at gmail dot com
  2011-12-15 23:23 ` pinskia at gcc dot gnu.org
  2021-12-29  4:12 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: zuxy.meng at gmail dot com @ 2011-04-06 13:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Zuxy <zuxy.meng at gmail dot com> 2011-04-06 13:42:21 UTC ---
(In reply to comment #1)
> A good question is does it make a difference in actual performance numbers, it
> might still make a positive difference.  Until someone tries it out and sees
> the difference in performance, I am going to say we should keep it.

Actually GCC since 4.6 has stopped generating 'rep ret' for all Intel CPUs.


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

* [Bug target/48227] "rep ret" generated for -march=core2
  2011-03-22  9:10 [Bug target/48227] New: "rep ret" generated for -march=core2 zuxy.meng at gmail dot com
                   ` (2 preceding siblings ...)
  2011-04-06 13:42 ` zuxy.meng at gmail dot com
@ 2011-12-15 23:23 ` pinskia at gcc dot gnu.org
  2021-12-29  4:12 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-15 23:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-15 23:18:35 UTC ---
  /* X86_TUNE_PAD_RETURNS */
  m_CORE2I7 | m_AMD_MULTIPLE | m_GENERIC,


So we still do it for Core2 i7.


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

* [Bug target/48227] "rep ret" generated for -march=core2
  2011-03-22  9:10 [Bug target/48227] New: "rep ret" generated for -march=core2 zuxy.meng at gmail dot com
                   ` (3 preceding siblings ...)
  2011-12-15 23:23 ` pinskia at gcc dot gnu.org
@ 2021-12-29  4:12 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-29  4:12 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |8.0
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=81616

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
/* X86_TUNE_PAD_RETURNS: Place NOP before every RET that is a destination
   of conditional jump or directly preceded by other jump instruction.
   This is important for AND K8-AMDFAM10 because the branch prediction
   architecture expect at most one jump per 2 byte window.  Failing to
   pad returns leads to misaligned return stack.  */
DEF_TUNE (X86_TUNE_PAD_RETURNS, "pad_returns",
          m_ATHLON_K8 | m_AMDFAM10)

Core2 issue was Fixed by r0-125351 for 4.9.0.

GCC 8 removed it even for generic by r8-5077.

So all fixed.

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

end of thread, other threads:[~2021-12-29  4:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-22  9:10 [Bug target/48227] New: "rep ret" generated for -march=core2 zuxy.meng at gmail dot com
2011-04-01 19:21 ` [Bug target/48227] " pinskia at gcc dot gnu.org
2011-04-02  0:55 ` ian at airs dot com
2011-04-06 13:42 ` zuxy.meng at gmail dot com
2011-12-15 23:23 ` pinskia at gcc dot gnu.org
2021-12-29  4:12 ` pinskia at gcc dot gnu.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).