[lno] fix division by zero

Daniel Berlin dberlin@dberlin.org
Tue Jan 6 21:43:00 GMT 2004


On Jan 6, 2004, at 4:33 PM, Toon Moene wrote:

> 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>;


It considers anything but LE_EXPR to be a complicated exit condition.
> 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 ?

The evolution analyzer should be able to figure out the number of 
iterations, for example.

We're gonna need to put a higher level veneer over various loop 
modifications, or we will end up duplicating the same code everywhere.



More information about the Gcc-patches mailing list