https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104515

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think not re-emitting the clobber on the exit might be OK semantically - it's
at most a missed optimization for a store.  I think it's also OK for the
stack slot sharing logic as any object becoming live after a clobber
would need to have a mention inbetween the clobber and the exit.  I'll note
that if that's not OK then duplicating the clobber wouldn't either.
As we don't know whether the object we store to ends its lifetime (it's only
a may-alias) we can't do both - extend its lifetime and preserve the
original one.

We could maybe move the clobber (duplicating it to each edge but removing
it from the loop body).

I'm testing a patch.

Reply via email to