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][2/3] Fix PR54733 Optimize endian independent load/store


On Wed, Apr 2, 2014 at 9:04 AM, Thomas Preud'homme
<thomas.preudhomme@arm.com> wrote:
>> From: Marc Glisse [mailto:marc.glisse@inria.fr]
>>
>> Uh? It does fold a+1-a for me. What it doesn't do is look through the
>> definition of b in b-a. Richard+GSoC will supposedly soon provide a
>> function that does that.
>
> Oh right, it's a bit more complex here since the array index is converted
> to an offset first. So the operation is more like:  ((a+1)*cst) - (a*cst).
> Any chances this might be handled at some point? Note that this might
> not be very frequent so it's not very important for this patch.

"More like" isn't enough to answer this - do you have a testcase?  (usually
these end up in undefined-overflow and/or conversion-to-sizetype issues)

Richard.

> Thanks for the comment.
>
> Best regards,
>
> Thomas
>
>


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