> 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
> >after forwprop only on dest, but not on anything else, aliasing code thinks
> >that the memcpy reads dest based memory, when it really reads src based
> >memory (in the testcase frame pointer based in the end, but CSE did not see
> >it through).
> >
> >Fixed by marking pseudos that must hold pointers with REG_POINTER during
> >the expansion.  Bootstrapped/regtested on x86_64-linux and i686-linux, ok
> >for trunk?
> 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.
> 
> But yes, in general, if we're marking things that must be pointers
> with REG_POINTER, that is a good thing.

Yep, the patch is OK.  Even if Ada gets things partly wrong it seems independent
issue.

Honza
> 
> jeff
> 

Reply via email to