public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/101293] New: LIM ref canonicalization incomplete
@ 2021-07-02  9:56 rguenth at gcc dot gnu.org
  2021-07-02  9:57 ` [Bug tree-optimization/101293] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-02  9:56 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101293
           Summary: LIM ref canonicalization incomplete
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

We fail to apply store-motion to

struct X { int i; int j; };

void foo(struct X *x, int n)
{
  for (int i = 0; i < n; ++i)
    {
      int *p = &x->j;
      int tem = *p;
      x->j += tem * i;
    }
}

because we end up with two distinct memory references:

Memory reference 1: MEM[(int *)x_7(D) + 4B]
Memory reference 2: x_7(D)->j

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-02 11:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-02  9:56 [Bug tree-optimization/101293] New: LIM ref canonicalization incomplete rguenth at gcc dot gnu.org
2021-07-02  9:57 ` [Bug tree-optimization/101293] " rguenth at gcc dot gnu.org
2021-07-02 11:54 ` cvs-commit at gcc dot gnu.org
2021-07-02 11:55 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).