https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116128
--- Comment #6 from anlauf at gcc dot gnu.org ---
Guided by the dump-tree for the inlining code, I played a little to see
what kind of code the middle-end expects. To this end I used C code.
The reference for the sum over a rank-1 array (given
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116128
--- Comment #5 from mjr19 at cam dot ac.uk ---
I think in general using partial sums improves accuracy.
If one assumes that all of the data have the same sign and similar magnitude,
then by the time the sum is nearly complete one is adding a sin
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116128
--- Comment #4 from anlauf at gcc dot gnu.org ---
(In reply to mjr19 from comment #3)
> It seems that most of these are in-line expanded by gfortran-14.1, at least
> in some cases.
>
> function foo(a,n)
> real(kind(1d0))::a(*),foo
> integer:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116128
--- Comment #3 from mjr19 at cam dot ac.uk ---
It seems that most of these are in-line expanded by gfortran-14.1, at least in
some cases.
function foo(a,n)
real(kind(1d0))::a(*),foo
integer::n
foo=sum(a(1:n))
end function foo
and
funct
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116128
anlauf at gcc dot gnu.org changed:
What|Removed |Added
Priority|P3 |P5
--- Comment #2 from anlau
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116128
--- Comment #1 from mjr19 at cam dot ac.uk ---
The same comment applies to maxval and minval, which vectorise with -Ofast only
for -mavx2, although the answer will be independent of the ordering of the
scalar min/max operations.
In contrast, ial
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116128
Andrew Pinski changed:
What|Removed |Added
CC||pinskia at gcc dot gnu.org
Se