This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/31040] New: unroll/peel loops not aggressive enough
- From: "jv244 at cam dot ac dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Mar 2007 09:11:31 -0000
- Subject: [Bug tree-optimization/31040] New: unroll/peel loops not aggressive enough
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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