On 1/7/19 3:51 PM, Jakub Jelinek wrote:
> Hi!
> 
> As mentioned in that PR, we have a SI->DImode zero extension and RA happens
> to choose to zero extend from a SImode memory slot which is the low part of
> the DImode memory slot into which the zero extension is to be stored. 
> Unfortunately, the RTL DSE part really doesn't have infrastructure to
> remember and, if needed, invalidate loads, it just remembers stores, so
> handling this generically is quite unlikely at least for GCC9.
> 
> This patch just handles that through a peephole2 (other option would be to
> handle it in the define_split for the zero extension, but the peephole2 is
> likely to catch more things).
> 
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
> 
> 2019-01-07  Jakub Jelinek  <ja...@redhat.com>
> 
>       PR rtl-optimization/79593
>       * config/i386/i386.md (reg = mem; mem = reg): New define_peephole2.
Note I'd hacked up a POC in DSE and it caught something like 10
instances across a bootstrap.  In the end I don't think this matters
much in practice (peephole vs optimizing at the split point).

Jeff

Reply via email to