Re: [PATCH] Fix memmove to memcpy folding (PR middle-end/71874)

2016-07-19 Thread Richard Biener
On July 19, 2016 6:52:55 PM GMT+02:00, Jakub Jelinek wrote: >Hi! > >As mentioned in the PR and discussed on IRC, get_ref_base_and_extent >can return size != maxsize or maxsize -1 and then we really can't trust >the offset for the purposes we want. So this patch instead uses a

[PATCH] Fix memmove to memcpy folding (PR middle-end/71874)

2016-07-19 Thread Jakub Jelinek
Hi! As mentioned in the PR and discussed on IRC, get_ref_base_and_extent can return size != maxsize or maxsize -1 and then we really can't trust the offset for the purposes we want. So this patch instead uses a different function that just computes the base and offset if the offset is constant;