public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/106375] New: [13 regreesion] Lowering complex type mov regressed loop distribution for memset/memcpy/memmov.
@ 2022-07-21  3:21 crazylht at gmail dot com
  2022-07-21  7:51 ` [Bug tree-optimization/106375] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: crazylht at gmail dot com @ 2022-07-21  3:21 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106375
           Summary: [13 regreesion] Lowering complex type mov regressed
                    loop distribution for memset/memcpy/memmov.
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: crazylht at gmail dot com
  Target Milestone: ---

void
foo (_Complex double* p, _Complex double* __restrict q)
{
  for (int i = 0; i != 1000; i++)
    p[i] = q[i];
}

before lowering complex type move


  <bb 2> [local count: 10737416]:
  __builtin_memcpy (p_10(D), q_9(D), 16000);
  return;


After r13-1762-gf9d4c3b45c5ed5f45c8089c990dbd4e181929c3d, it's 

18  <bb 3> [local count: 1063004409]:
19  # i_15 = PHI <i_12(5), 0(2)>
20  # ivtmp_13 = PHI <ivtmp_5(5), 1000(2)>
21  _1 = (long unsigned int) i_15;
22  _2 = _1 * 16;
23  _3 = q_9(D) + _2;
24  _4 = p_10(D) + _2;
25  _7 = REALPART_EXPR <*_3>;
26  _6 = IMAGPART_EXPR <*_3>;
27  REALPART_EXPR <*_4> = _7;
28  IMAGPART_EXPR <*_4> = _6;
29  i_12 = i_15 + 1;
30  ivtmp_5 = ivtmp_13 - 1;
31  if (ivtmp_5 != 0)
32    goto <bb 5>; [99.00%]
33  else

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

* [Bug tree-optimization/106375] [13 regreesion] Lowering complex type mov regressed loop distribution for memset/memcpy/memmov.
  2022-07-21  3:21 [Bug tree-optimization/106375] New: [13 regreesion] Lowering complex type mov regressed loop distribution for memset/memcpy/memmov crazylht at gmail dot com
@ 2022-07-21  7:51 ` rguenth at gcc dot gnu.org
  2022-07-22  2:08 ` crazylht at gmail dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-07-21  7:51 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |13.0
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
           Keywords|                            |missed-optimization
   Last reconfirmed|                            |2022-07-21

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.  Note it was a latent issue, if there was any _Complex lowered op in
the fn the copy would already have been lowered.

The memcpy pattern detection needs to be extended to "unrolled" copying to
cover this again (there might be a duplicate bug about this).

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

* [Bug tree-optimization/106375] [13 regreesion] Lowering complex type mov regressed loop distribution for memset/memcpy/memmov.
  2022-07-21  3:21 [Bug tree-optimization/106375] New: [13 regreesion] Lowering complex type mov regressed loop distribution for memset/memcpy/memmov crazylht at gmail dot com
  2022-07-21  7:51 ` [Bug tree-optimization/106375] " rguenth at gcc dot gnu.org
@ 2022-07-22  2:08 ` crazylht at gmail dot com
  2022-07-22  2:32 ` crazylht at gmail dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: crazylht at gmail dot com @ 2022-07-22  2:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Hongtao.liu <crazylht at gmail dot com> ---
Related failed testcase

FAIL: gcc.dg/pr56837.c scan-tree-dump-times optimized "memset ..c, 68, 16384.;"
1

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

* [Bug tree-optimization/106375] [13 regreesion] Lowering complex type mov regressed loop distribution for memset/memcpy/memmov.
  2022-07-21  3:21 [Bug tree-optimization/106375] New: [13 regreesion] Lowering complex type mov regressed loop distribution for memset/memcpy/memmov crazylht at gmail dot com
  2022-07-21  7:51 ` [Bug tree-optimization/106375] " rguenth at gcc dot gnu.org
  2022-07-22  2:08 ` crazylht at gmail dot com
@ 2022-07-22  2:32 ` crazylht at gmail dot com
  2022-07-27  7:11 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: crazylht at gmail dot com @ 2022-07-22  2:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Hongtao.liu <crazylht at gmail dot com> ---
Similar case for scalar types.

void
foo1 (double* p, double* __restrict q)
{
  for (int i = 0; i != 1000; i+=2)
    {
      p[i] = q[i];
      p[i+1] = q[i+1];
    }
}

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

* [Bug tree-optimization/106375] [13 regreesion] Lowering complex type mov regressed loop distribution for memset/memcpy/memmov.
  2022-07-21  3:21 [Bug tree-optimization/106375] New: [13 regreesion] Lowering complex type mov regressed loop distribution for memset/memcpy/memmov crazylht at gmail dot com
                   ` (2 preceding siblings ...)
  2022-07-22  2:32 ` crazylht at gmail dot com
@ 2022-07-27  7:11 ` rguenth at gcc dot gnu.org
  2023-04-26  6:56 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-07-27  7:11 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |seurer at gcc dot gnu.org

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
*** Bug 106451 has been marked as a duplicate of this bug. ***

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

* [Bug tree-optimization/106375] [13 regreesion] Lowering complex type mov regressed loop distribution for memset/memcpy/memmov.
  2022-07-21  3:21 [Bug tree-optimization/106375] New: [13 regreesion] Lowering complex type mov regressed loop distribution for memset/memcpy/memmov crazylht at gmail dot com
                   ` (3 preceding siblings ...)
  2022-07-27  7:11 ` rguenth at gcc dot gnu.org
@ 2023-04-26  6:56 ` rguenth at gcc dot gnu.org
  2023-07-27  9:23 ` rguenth at gcc dot gnu.org
  2024-05-21  9:11 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-04-26  6:56 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|13.0                        |13.2

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 13.1 is being released, retargeting bugs to GCC 13.2.

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

* [Bug tree-optimization/106375] [13 regreesion] Lowering complex type mov regressed loop distribution for memset/memcpy/memmov.
  2022-07-21  3:21 [Bug tree-optimization/106375] New: [13 regreesion] Lowering complex type mov regressed loop distribution for memset/memcpy/memmov crazylht at gmail dot com
                   ` (4 preceding siblings ...)
  2023-04-26  6:56 ` rguenth at gcc dot gnu.org
@ 2023-07-27  9:23 ` rguenth at gcc dot gnu.org
  2024-05-21  9:11 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-27  9:23 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|13.2                        |13.3

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 13.2 is being released, retargeting bugs to GCC 13.3.

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

* [Bug tree-optimization/106375] [13 regreesion] Lowering complex type mov regressed loop distribution for memset/memcpy/memmov.
  2022-07-21  3:21 [Bug tree-optimization/106375] New: [13 regreesion] Lowering complex type mov regressed loop distribution for memset/memcpy/memmov crazylht at gmail dot com
                   ` (5 preceding siblings ...)
  2023-07-27  9:23 ` rguenth at gcc dot gnu.org
@ 2024-05-21  9:11 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-05-21  9:11 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|13.3                        |13.4

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 13.3 is being released, retargeting bugs to GCC 13.4.

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

end of thread, other threads:[~2024-05-21  9:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-21  3:21 [Bug tree-optimization/106375] New: [13 regreesion] Lowering complex type mov regressed loop distribution for memset/memcpy/memmov crazylht at gmail dot com
2022-07-21  7:51 ` [Bug tree-optimization/106375] " rguenth at gcc dot gnu.org
2022-07-22  2:08 ` crazylht at gmail dot com
2022-07-22  2:32 ` crazylht at gmail dot com
2022-07-27  7:11 ` rguenth at gcc dot gnu.org
2023-04-26  6:56 ` rguenth at gcc dot gnu.org
2023-07-27  9:23 ` rguenth at gcc dot gnu.org
2024-05-21  9:11 ` jakub 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).