DSE and maskstore trouble
Richard Biener
richard.guenther@gmail.com
Tue Jul 3 13:52:00 GMT 2018
On Tue, Jul 3, 2018 at 2:46 PM Andrew Stubbs <andrew_stubbs@mentor.com> wrote:
>
> On 03/07/18 13:21, Richard Biener wrote:
> > Ok, so if we vectorize the above with 64 element masked stores
> > then indeed the RTL representation is _not_ safe. That is because
> > while the uses in the masked stores should prevent things from
> > going bad there is also TBAA to consider which means those
> > uses might not actually _be_ uses (TBAA-wise) of the earlier
> > stores. In the above case rtattr * doesn't alias int (or whatever
> > types rta_type or rta_len have). That means to DSE the earlier
> > stores are dead.
>
> I managed to get it to generate maskstore without the unspec, and the
> code now runs correctly.
OK, that is good.
> I don't follow your AA reasoning. You say the use stops it being bad,
> and then you say the stores are dead, which sounds bad, yet it's not
> deleting them now.
If you look at RTL dumps (with -fstrict-aliasing, thus -O2+) you should
see MEM_ALIAS_SETs differing for the earlier stores and the masked
store uses.
Now I'm of course assuming DSE is perfect, maybe it isn't ... ;)
Richard.
>
> Confused. :-(
>
> Andrew
More information about the Gcc
mailing list