public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jv244 at cam dot ac dot uk" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/31040]  New: unroll/peel loops not aggressive enough
Date: Mon, 05 Mar 2007 09:11:00 -0000	[thread overview]
Message-ID: <bug-31040-6642@http.gcc.gnu.org/bugzilla/> (raw)

Looking at the asm for the program below, there plenty of loops left after
compiling with

> gfortran  -S -march=native -O3 -funroll-loops -funroll-all-loops -fpeel-loops test.f90

or any combination of these options. A full unrolling (and in that case a
return of the value 3) would be possible and much faster.

> cat test.f90

INTEGER FUNCTION lxy()
   lxy=0
   DO lxa=0,1
   DO lxb=0,0
     DO lya=0,1-lxa
     DO lyb=0,0-lxb
       lxy=lxy+1
     ENDDO
     ENDDO
   ENDDO
   ENDDO
END FUNCTION
write(6,*) lxy()
END


-- 
           Summary: unroll/peel loops not aggressive enough
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jv244 at cam dot ac dot uk


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


             reply	other threads:[~2007-03-05  9:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-05  9:11 jv244 at cam dot ac dot uk [this message]
2007-03-05 10:18 ` [Bug tree-optimization/31040] " rguenth at gcc dot gnu dot org
2007-03-05 11:47 ` jv244 at cam dot ac dot uk
2007-03-05 11:50 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2007-03-05 12:22 ` rguenth at gcc dot gnu dot org
2007-07-03 18:21 ` jv244 at cam dot ac dot uk
2007-07-21  8:59 ` pinskia at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-31040-6642@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).