This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/78812] [5/6/7 Regression] Wrong code generation due to hoisting memory load across function call
- From: "law at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 04 Jan 2017 23:33:21 +0000
- Subject: [Bug rtl-optimization/78812] [5/6/7 Regression] Wrong code generation due to hoisting memory load across function call
- Auto-submitted: auto-generated
- References: <bug-78812-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78812
--- Comment #12 from Jeffrey A. Law <law at redhat dot com> ---
I'm mostly concerned about other places where we assume that a memory reference
is supposed to show up at the toplevel of a source/dest.
For example, it looks like we don't properly handle the case where we have a
REG_EQUAL note of the form (any_extend (mem (...)).
THankfully, most of gcse.c will DTRT with such an rtx and the cases for
REG_EQUAL notes don't appear to be correctness issues. The only correctness
issue so far is prune_expressions.
I need to look at postreload-gcse.c as well.
All those cases will need to use a helper of some sort to look inside the rtx.
The mechanics of that (such as using contains_mem_rtx_p) aren't terribly
concerning/interesting at this stage.