This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/57328] Missed optimization: Unable to vectorize Fortran min and max intrinsics
- From: "bdavis at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 21 May 2013 01:03:52 +0000
- Subject: [Bug fortran/57328] Missed optimization: Unable to vectorize Fortran min and max intrinsics
- Auto-submitted: auto-generated
- References: <bug-57328-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57328
Bud Davis <bdavis at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bdavis at gcc dot gnu.org
--- Comment #1 from Bud Davis <bdavis at gcc dot gnu.org> ---
subroutine max_in_loop(rin, rout)
integer :: rin(1000), rout(1000), tmp
!real :: rin(1000), rout(1000), tmp
integer :: i
do i = 2, 1000
tmp = min(rin(i-1), rin(i))
rout(i) = tmp
end do
end subroutine
Is vectorized.
The floating point number makes it special in some way.
Looking in trans-intrinic.c , it is special.
/* FIXME: When the IEEE_ARITHMETIC module is implemented, the call to
__builtin_isnan might be made dependent on that module being loaded,
to help performance of programs that don't rely on IEEE semantics. */