public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/46847] New: Missed optimization for variant of Duff's device
@ 2010-12-08  9:09 jjk at acm dot org
  2010-12-08  9:12 ` [Bug other/46847] " jjk at acm dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: jjk at acm dot org @ 2010-12-08  9:09 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Missed optimization for variant of Duff's device
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jjk@acm.org


The attached file contains a function that implements a variant of
"Duff's device" to zero out part of an array.  GCC 4.3.2 (Red Hat 4.3.2-7)
with -O3 generates rather bad code for x86-64; the code it produces for i386
might also be improved.

Generated code for -m32 and -m64 is in the attached file. The -m64 version
contains multiple copies of a redundant load for %esi (and corresponding
jumps).
Both versions move the computation of 'end' inside the loop, which seems
unnecessary to me.


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

end of thread, other threads:[~2010-12-08 12:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-08  9:09 [Bug other/46847] New: Missed optimization for variant of Duff's device jjk at acm dot org
2010-12-08  9:12 ` [Bug other/46847] " jjk at acm dot org
2010-12-08 12:02 ` rguenth at gcc dot gnu.org
2010-12-08 12:10 ` jjk at acm dot org
2010-12-08 12:27 ` [Bug tree-optimization/46847] " rguenth 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).