public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/112525] New: fail to eliminate unused store
@ 2023-11-14  6:40 guojiufu at gcc dot gnu.org
  2023-11-14  6:48 ` [Bug rtl-optimization/112525] " guojiufu at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: guojiufu at gcc dot gnu.org @ 2023-11-14  6:40 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 112525
           Summary: fail to eliminate unused store
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: guojiufu at gcc dot gnu.org
  Target Milestone: ---

For below code:
```
typedef struct teststruct
{
  double d;
  int arr[15]; /* for ppc64le example foo1, 14: foo is just blr. 15: foo has 8
'std's */
} teststruct;

int
foo (int a, teststruct p)
{
  if (a > 0)
    return 1;
  return 2;
}

void
foo1 (teststruct p)
{
}
```

Some instructions are generated to store "p" to stack (stored to areas of arg
pointer/virtual_incoming_pointer).
But those stores are not eliminated.

For example, on ppc64le, below code is generated:
```
foo1:
.LFB1:
        .cfi_startproc
        std 3,32(1)
        std 4,40(1)
        std 5,48(1)
        std 6,56(1)
        std 7,64(1)
        std 8,72(1)
        std 9,80(1)
        std 10,88(1)
        blr
```
Those 'std's are dead actually.

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

end of thread, other threads:[~2024-01-04  0:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-14  6:40 [Bug rtl-optimization/112525] New: fail to eliminate unused store guojiufu at gcc dot gnu.org
2023-11-14  6:48 ` [Bug rtl-optimization/112525] " guojiufu at gcc dot gnu.org
2023-11-14  6:49 ` pinskia at gcc dot gnu.org
2023-11-14  7:01 ` guojiufu at gcc dot gnu.org
2023-11-14  7:44 ` rguenth at gcc dot gnu.org
2023-11-14  7:45 ` rguenth at gcc dot gnu.org
2023-11-15  1:49 ` guojiufu at gcc dot gnu.org
2023-12-19  5:18 ` cvs-commit at gcc dot gnu.org
2024-01-04  0:47 ` guojiufu 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).