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: [PATCH/RFC] Fix PR19807 (and more)


> This patch tries to fix PR19807 and related foldings by transforming
> the existing machinery to fold &a[i] +- c*j to &a[i+-j] to handle
> the cases of &a +- c*j, &a +- c and &a[i] +- c.  I try to be clever
> with the resulting index type to be able to fold comparisons as
> in the testcase.  This is mainly because we have ARRAY_REF trees with
> all sorts of types of the index, not just TYPE_DOMAIN type of the
> underlying ARRAY_TYPE.  Maybe this is not a so good idea and instead
> always honouring TYPE_DOMAIN would be better.
>
> Bootstrapped and regtested on x86_64-linux-gnu and i686-pc-linux-gnu
> with no regressions for C and C++.

It would really be nice to include Ada in your testing when you tweak the tree 
folder in non-trivial ways like that.  It is known to stretch this part 
of the middle-end quite a bit.

Thanks in advance.

-- 
Eric Botcazou


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