[Bug tree-optimization/65391] missed store motion for conditionally updated pointer in loop
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 12 11:11:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65391
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
CC| |rguenth at gcc dot gnu.org
Component|middle-end |tree-optimization
Summary|unnecessary load of |missed store motion for
|conditionally updated |conditionally updated
|pointer in loop |pointer in loop
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
The issue is that invariant/store motion doesn't see the unconditional store
to *o_ptr before the loop and thus thinks that the conditional one may trap.
LIM doesn't consider stores/loads in blocks that are post-dominated by
the loop header to alter that loops "effectively accessed" set of references.
I think considering only the loop preheader is good enough - but we also do not
analyze memory references in non-loop areas (loop preheaders would need to be
added here as well).
More information about the Gcc-bugs
mailing list