public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/106010] New: Miss vectorization for complex type copy.
@ 2022-06-17  4:37 crazylht at gmail dot com
  2022-06-20 10:10 ` [Bug middle-end/106010] " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: crazylht at gmail dot com @ 2022-06-17  4:37 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106010
           Summary: Miss vectorization for complex type copy.
           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: ---

This is from PR105923

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

gcc generates

foo(double _Complex*, double _Complex*):
        xor     eax, eax
.L2:
        vmovsd  xmm1, QWORD PTR [rsi+rax]
        vmovsd  xmm0, QWORD PTR [rsi+8+rax]
        vmovsd  QWORD PTR [rdi+rax], xmm1
        vmovsd  QWORD PTR [rdi+8+rax], xmm0
        add     rax, 16
        cmp     rax, 1600000
        jne     .L2
        ret

llvm generates:

foo(double _Complex*, double _Complex*):                           #
@foo(double _Complex*, double _Complex*)
        xor     eax, eax
.LBB0_1:                                # =>This Inner Loop Header: Depth=1
        movups  xmm0, xmmword ptr [rsi + rax]
        movups  xmmword ptr [rdi + rax], xmm0
        add     rax, 16
        cmp     rax, 1600000
        jne     .LBB0_1
        ret

vectorizer failed because get_related_vectype_for_scalar_type failed for
complex type.

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

end of thread, other threads:[~2022-07-22  3:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-17  4:37 [Bug tree-optimization/106010] New: Miss vectorization for complex type copy crazylht at gmail dot com
2022-06-20 10:10 ` [Bug middle-end/106010] " rguenth at gcc dot gnu.org
2022-06-23  6:44 ` crazylht at gmail dot com
2022-06-23  6:45 ` crazylht at gmail dot com
2022-07-11 17:32 ` pinskia at gcc dot gnu.org
2022-07-20  8:07 ` cvs-commit at gcc dot gnu.org
2022-07-20  8:15 ` crazylht at gmail dot com
2022-07-22  2:08 ` cvs-commit at gcc dot gnu.org
2022-07-22  3:23 ` linkw 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).