This is the mail archive of the gcc-patches@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]

Re: [lno] fix division by zero


I wrote:

Ah, OK, I was hoping that that was the problem - that the current implementation didn't support broadcasting scalars to arrays.

[next version]:

DIMENSION A(1000000), B(1000000), C(1000000)
READ*, X, Y
A = LOG(X); B = LOG(Y); C = A + B
PRINT*, C(500000)
END

Now that I bootstrapped the lno branch again, and found the right flags to supply:


/usr/lno/bin/gfortran -static -g -O2 -S -fdump-tree-vect-details -fscalar-evolutions -ftree-vectorize -maltivec vector.f95

I get, in vector.f95.t34.vect:

<<<<<<< analyze_loop_nest >>>>>>>

<<vect_analyze_loop_form>>

<<get_loop_niters>>
Complicated exit condition.
loop_analyzer: bad loop form.

3 times, with the last loop being:

<L6>:;
  if (S.10_18 > 1000000) goto L.3; else goto <L7>;

<L7>:;
  T.16_112 = (*T.1_64)[S.10_18];
  T.17_113 = (*T.4_69)[S.10_18];
  T.18_114 = T.16_112 + T.17_113;
  (*T.9_78)[S.10_18] = T.18_114;
  S.10_120 = S.10_18 + 1;
  goto <bb 7> (<L6>);

Now the 64K question is: should the vectorization pass recognize these loop constructs, or should another loop pass simplify them to forms that the vectorizer can recognize ?

Cheers,

--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://gcc.gnu.org/fortran/ (under construction)


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