This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/43829] Scalarization of reductions


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

--- Comment #46 from Mikael Morin <mikael at gcc dot gnu.org> 2011-10-09 16:44:19 UTC ---
(In reply to comment #45)
> Are these numbers misleading, or once again compiling for size does not give
> the smallest size?

Well, to begin with, I don't think the test is close to a real world case.
It initializes a couple of arrays, and then applies to them various
computations involving sum which it basically throws away afterwards. I
wouldn't be surprised if some of the computations could be optimized away or
shared between the different checks. I'm purely speculating here, but that
would explain the size difference between inlined and then removed code vs kept
around library call.

Checks like this (for example) are good candidates for removal:
  if (any(sum(sum(a,1),1) /= sum(sum(a,2),1))) call abort


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]