public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/110638] New: [13 regression] memcpy should be inlined with sve loop
@ 2023-07-12  7:42 zhongyunde at huawei dot com
  2023-07-12  7:53 ` [Bug target/110638] " pinskia at gcc dot gnu.org
  2023-07-12  7:55 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: zhongyunde at huawei dot com @ 2023-07-12  7:42 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110638
           Summary: [13 regression] memcpy should be inlined with sve loop
           Product: gcc
           Version: 13.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zhongyunde at huawei dot com
  Target Milestone: ---

* test:https://gcc.godbolt.org/z/39KddjbE4
```
void va(struct args_t * func_args)
{
    for (int nl = 0; nl < iterations; nl++) {
        for (int i = 0; i < LEN_1D; i++) {
            a[i] = b[i];
        }
        dummy(a, b);
    }
    return ;
}
```

* gcc12: don't transform the loop into a memcpy call, so it can make use of the
new sve feature.

* gcc13: use a normal 'bl      memcpy'

The above regression start from gcc13.

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

* [Bug target/110638] [13 regression] memcpy should be inlined with sve loop
  2023-07-12  7:42 [Bug c/110638] New: [13 regression] memcpy should be inlined with sve loop zhongyunde at huawei dot com
@ 2023-07-12  7:53 ` pinskia at gcc dot gnu.org
  2023-07-12  7:55 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-12  7:53 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
          Component|c                           |target

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I don't see how this is an issue because memcpy in glibc already uses SVE too
...

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

* [Bug target/110638] [13 regression] memcpy should be inlined with sve loop
  2023-07-12  7:42 [Bug c/110638] New: [13 regression] memcpy should be inlined with sve loop zhongyunde at huawei dot com
  2023-07-12  7:53 ` [Bug target/110638] " pinskia at gcc dot gnu.org
@ 2023-07-12  7:55 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-12  7:55 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Actually this is the correct thing to do. memcpy in glibc has used SVE since
glibc commit 9f298bfe1f183804bb54b54ff9071afc0494906c .

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

end of thread, other threads:[~2023-07-12  7:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-12  7:42 [Bug c/110638] New: [13 regression] memcpy should be inlined with sve loop zhongyunde at huawei dot com
2023-07-12  7:53 ` [Bug target/110638] " pinskia at gcc dot gnu.org
2023-07-12  7:55 ` pinskia 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).