[PATCH] Add some REG_POINTER flags during ix86 memcpy/memset expansion (PR target/65504)

2015-03-23 Thread Jakub Jelinek
Hi! As expand_set_or_movmem_prologue_epilogue_by_misaligned_moves uses src = src - (adjusted_dest - dest) without proper REG_POINTER flags the aliasing code is very easily confused on what is really a pointer and what is not - as REG_POINTER was used after forwprop only on dest, but not on

Re: [PATCH] Add some REG_POINTER flags during ix86 memcpy/memset expansion (PR target/65504)

2015-03-23 Thread Uros Bizjak
On Mon, Mar 23, 2015 at 4:07 PM, Jakub Jelinek ja...@redhat.com wrote: As expand_set_or_movmem_prologue_epilogue_by_misaligned_moves uses src = src - (adjusted_dest - dest) without proper REG_POINTER flags the aliasing code is very easily confused on what is really a pointer and what is not -

Re: [PATCH] Add some REG_POINTER flags during ix86 memcpy/memset expansion (PR target/65504)

2015-03-23 Thread Jeff Law
On 03/23/2015 03:33 PM, Eric Botcazou wrote: FWIW, you have to be very careful depending on REG_POINTER. I believe Ada can still set REG_POINTER on things that are not pointers (via virtual origins) and cross jumping can cause problems too where one arm has x + y with X as the pointer and the

Re: [PATCH] Add some REG_POINTER flags during ix86 memcpy/memset expansion (PR target/65504)

2015-03-23 Thread Jeff Law
On 03/23/2015 09:07 AM, Jakub Jelinek wrote: Hi! As expand_set_or_movmem_prologue_epilogue_by_misaligned_moves uses src = src - (adjusted_dest - dest) without proper REG_POINTER flags the aliasing code is very easily confused on what is really a pointer and what is not - as REG_POINTER was used

Re: [PATCH] Add some REG_POINTER flags during ix86 memcpy/memset expansion (PR target/65504)

2015-03-23 Thread Eric Botcazou
FWIW, you have to be very careful depending on REG_POINTER. I believe Ada can still set REG_POINTER on things that are not pointers (via virtual origins) and cross jumping can cause problems too where one arm has x + y with X as the pointer and the other arm has x + y with Y as the pointer.

Re: [PATCH] Add some REG_POINTER flags during ix86 memcpy/memset expansion (PR target/65504)

2015-03-23 Thread Jan Hubicka
On 03/23/2015 09:07 AM, Jakub Jelinek wrote: Hi! As expand_set_or_movmem_prologue_epilogue_by_misaligned_moves uses src = src - (adjusted_dest - dest) without proper REG_POINTER flags the aliasing code is very easily confused on what is really a pointer and what is not - as REG_POINTER was