public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/50135] New: Loop optimization.
@ 2011-08-20  5:50 bratsinot at gmail dot com
  2011-08-21  9:22 ` [Bug target/50135] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: bratsinot at gmail dot com @ 2011-08-20  5:50 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50135
           Summary: Loop optimization.
    Classification: Unclassified
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: bratsinot@gmail.com


May be single-cycle should translate that:
C code:
for(unsigned int i=0; i<123456; i++)
or
for(unsigned int i=123456; i>0; i--)

Assembler code:
movq 123456, %rcx
L0:
   <some code there>
   loop LO


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

* [Bug target/50135] Loop optimization.
  2011-08-20  5:50 [Bug c/50135] New: Loop optimization bratsinot at gmail dot com
@ 2011-08-21  9:22 ` rguenth at gcc dot gnu.org
  2011-08-21 12:01   ` Jan Hubicka
  2011-08-21 10:48 ` ubizjak at gmail dot com
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-08-21  9:22 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86_64-*-*, i?86-*-*
          Component|c                           |target

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-21 09:20:40 UTC ---
I bet we have a duplicate report for not using the x86 loop instruction.


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

* [Bug target/50135] Loop optimization.
  2011-08-20  5:50 [Bug c/50135] New: Loop optimization bratsinot at gmail dot com
  2011-08-21  9:22 ` [Bug target/50135] " rguenth at gcc dot gnu.org
@ 2011-08-21 10:48 ` ubizjak at gmail dot com
  2011-08-21 12:02 ` hubicka at ucw dot cz
  2021-12-24  4:14 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 6+ messages in thread
From: ubizjak at gmail dot com @ 2011-08-21 10:48 UTC (permalink / raw)
  To: gcc-bugs

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

Uros Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |SUSPENDED
   Last reconfirmed|                            |2011-08-21
     Ever Confirmed|0                           |1

--- Comment #2 from Uros Bizjak <ubizjak at gmail dot com> 2011-08-21 10:25:31 UTC ---
Don't worry about loop insn, it is *SLOW* on every half-decent recent
processor, see instruction_tables.pdf at [1]. OTOH, the insn has only short
jump displacement, so you are out of luck for every loop larger than 128 bytes.

So, until x86 implements something like powerpc bdnz insn, there will be no
doloop_* patterns.

[1] http://agner.org/optimize/


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

* Re: [Bug target/50135] Loop optimization.
  2011-08-21  9:22 ` [Bug target/50135] " rguenth at gcc dot gnu.org
@ 2011-08-21 12:01   ` Jan Hubicka
  0 siblings, 0 replies; 6+ messages in thread
From: Jan Hubicka @ 2011-08-21 12:01 UTC (permalink / raw)
  To: rguenth at gcc dot gnu.org; +Cc: gcc-bugs

> I bet we have a duplicate report for not using the x86 loop instruction.
Well, we used to generate it until we concluded it is pointless...

Honza


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

* [Bug target/50135] Loop optimization.
  2011-08-20  5:50 [Bug c/50135] New: Loop optimization bratsinot at gmail dot com
  2011-08-21  9:22 ` [Bug target/50135] " rguenth at gcc dot gnu.org
  2011-08-21 10:48 ` ubizjak at gmail dot com
@ 2011-08-21 12:02 ` hubicka at ucw dot cz
  2021-12-24  4:14 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 6+ messages in thread
From: hubicka at ucw dot cz @ 2011-08-21 12:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jan Hubicka <hubicka at ucw dot cz> 2011-08-21 12:01:20 UTC ---
> I bet we have a duplicate report for not using the x86 loop instruction.
Well, we used to generate it until we concluded it is pointless...

Honza


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

* [Bug target/50135] Loop optimization.
  2011-08-20  5:50 [Bug c/50135] New: Loop optimization bratsinot at gmail dot com
                   ` (2 preceding siblings ...)
  2011-08-21 12:02 ` hubicka at ucw dot cz
@ 2021-12-24  4:14 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-24  4:14 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WONTFIX
             Status|SUSPENDED                   |RESOLVED

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
As mentioned the loop instruction is not very useful at on any modern processor
so closing as won't fix.

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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-20  5:50 [Bug c/50135] New: Loop optimization bratsinot at gmail dot com
2011-08-21  9:22 ` [Bug target/50135] " rguenth at gcc dot gnu.org
2011-08-21 12:01   ` Jan Hubicka
2011-08-21 10:48 ` ubizjak at gmail dot com
2011-08-21 12:02 ` hubicka at ucw dot cz
2021-12-24  4:14 ` 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).