[Bug tree-optimization/63537] [4.8/4.9/5 Regression] Missed optimization: Loop unrolling adds extra copy when returning aggregate
glisse at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Oct 15 20:37:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63537
--- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> Eventually a simple pass could handle
>
> <retval> = ret;
> ret ={v} {CLOBBER};
> return <retval>;
>
> and back-propagate <retval> into all stores/loads of ret.
Shouldn't tree-nrv.c already handle this, except that it currently bails out if
TREE_ADDRESSABLE (found)? (strangely enough it has (dead) code to handle the
addressable case further in the same function)
More information about the Gcc-bugs
mailing list