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

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2020-02-03
                 CC|                            |law at redhat dot com
     Ever confirmed|0                           |1

--- Comment #1 from Jeffrey A. Law <law at redhat dot com> ---
So there's a few issues at play here.

First forwardprop propagates the address computation into the memory
references.  This should generally be considered a good thing.  The downside is
our address lowering pass only handles a very small subset of addresses, in
particular it doesn't handle the MEM_REFs that we get from forward propagation.
 Of course this hints at a workaround, -fno-tree-forwprop.

If we add support for these MEM_REF expressions to the address lowering pass,
we still generate the address in a suboptimal way which inhibits CSE on the
addresses in gimple -- and even though the later RTL CSE passes will clean
things up.

Finally, RTL CSE should be handling the code as currently presented by the
gimple optimizers.  For reasons I haven't dug into yet, we're not CSE-ing the
libcall.

Anyway, just recording thoughts here so they're not lost.

Reply via email to