This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/78812] [5/6/7 Regression] Wrong code generation due to hoisting memory load across function call


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]