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

Re: more on fortran array indexing


I wrote:

>> Please try the following patch:
>>
>> 	* fold-const (fold): Also simplify FLOOR_DIV_EXPR
>> 	  iff dividend is a multiple of divisor

Richard:

>  No good.  The problem being, I believe, that n*64 is
>  wrapped in a save_expr, and so we can't get rid of it.
>  I'd actually already tried making the ARRAY_REF expansion
>  use EXACT_DIV_EXPR..

After some testing, I'm less and less convinced that this is the  
problem.  There are still "subreg ... sign_extend"'s lying around in  
the -dL (resid.f.loop) output, which means that there are  
"unnecessary" conversions being done.

Note that fold-const.c knows how to get rid of divisions within  
SAVE_EXPR's (at least in principle).

IMHO, there's nothing wrong with the division.

Unfortunately, I haven't been able to track the real problem down.

Cheers,
Toon.


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