On 03/07/18 14:52, Richard Biener wrote:
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 ... ;)
Ok, I see that the stores have MEMs with different alias sets, indeed. I
can't quite work out if that means it's safe, or unsafe? Do I still need
to zero the set?
For masked stores, clearly the current DSE implementation must be
sub-optimal because it ignores the mask. Writing it as a
load/modify/write means that stores are not erroneously removed, but
also means that redundant writes (to masked vector destinations) are
never removed. Anyway, at least I know how to make that part safe now.
Thanks
Andrew