public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "crazylht at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/98218] New: [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander for 64bit vector
Date: Thu, 10 Dec 2020 01:56:09 +0000	[thread overview]
Message-ID: <bug-98218-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 98218
           Summary: [TARGET_MMX_WITH_SSE] Miss vec_cmpmn/vcondmn expander
                    for 64bit vector
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: crazylht at gmail dot com
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-*-* i?86-*-*

Refer to https://godbolt.org/z/sYE88f

cat test.c

typedef char v8qi __attribute__ ((vector_size(8)));
v8qi f1(v8qi a, v8qi b) {
  return a == b;
}

gcc -O2 -msse4.1 -S

f1(char __vector(8), char __vector(8)):
        pextrb  edx, xmm0, 0
        pextrb  eax, xmm1, 0
        pextrb  ecx, xmm0, 1
        cmp     dl, al
        pextrb  eax, xmm1, 1
        pextrb  esi, xmm0, 2
        setne   dl
        pextrb  edi, xmm0, 3
        pextrb  r8d, xmm0, 4
        sub     edx, 1
        cmp     cl, al
        pextrb  eax, xmm1, 2
        setne   cl
        pextrb  r9d, xmm0, 5
        movzx   edx, dl
        sub     ecx, 1
        cmp     sil, al
        pextrb  eax, xmm1, 3
        setne   sil
        pextrb  r10d, xmm0, 6
        pextrb  r11d, xmm0, 7
        movzx   ecx, cl
        sub     esi, 1
        cmp     dil, al
        pextrb  eax, xmm1, 4
        setne   dil
        movzx   esi, sil
        sub     edi, 1
        cmp     r8b, al
        pextrb  eax, xmm1, 5
        setne   r8b
        movzx   edi, dil
        sub     r8d, 1
        cmp     r9b, al
        pextrb  eax, xmm1, 6
        setne   r9b
        movzx   r8d, r8b
        sub     r9d, 1
        cmp     r10b, al
        pextrb  eax, xmm1, 7
        setne   r10b
        movzx   r9d, r9b
        sub     r10d, 1
        cmp     r11b, al
        setne   al
        movzx   r10d, r10b
        sub     eax, 1
        movzx   eax, al
        sal     rax, 8
        or      rax, r10
        sal     rax, 8
        or      rax, r9
        sal     rax, 8
        or      rax, r8
        sal     rax, 8
        or      rax, rdi
        sal     rax, 8
        or      rax, rsi
        sal     rax, 8
        or      rax, rcx
        sal     rax, 8
        or      rax, rdx
        movq    xmm0, rax
        ret

It should be better with

f1(char __vector(8), char __vector(8)):                           # @f1(char
__vector(8), char __vector(8))
        pcmpeqb xmm0, xmm1
        ret

             reply	other threads:[~2020-12-10  1:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-10  1:56 crazylht at gmail dot com [this message]
2020-12-10  7:34 ` [Bug target/98218] " rguenth at gcc dot gnu.org
2020-12-18 13:23 ` ubizjak at gmail dot com
2020-12-18 13:28 ` ubizjak at gmail dot com
2020-12-18 13:29 ` ubizjak at gmail dot com
2021-05-05 13:11 ` cvs-commit at gcc dot gnu.org
2021-05-05 13:28 ` ubizjak at gmail dot com
2021-05-07 15:15 ` cvs-commit at gcc dot gnu.org
2021-05-12  6:16 ` cvs-commit at gcc dot gnu.org
2021-05-12  6:24 ` [Bug target/98218] [TARGET_MMX_WITH_SSE] Implement 64bit vector compares (AVX512 masked compares missing) ubizjak at gmail dot com
2021-05-12  6:25 ` ubizjak at gmail dot com
2021-05-12  6:54 ` crazylht at gmail dot com
2021-05-12 17:39 ` dcb314 at hotmail dot com
2021-05-12 18:38 ` ubizjak at gmail dot com
2021-05-12 18:57 ` ubizjak at gmail dot com
2021-05-12 19:05 ` dcb314 at hotmail dot com
2021-05-12 19:47 ` dcb314 at hotmail dot com
2021-05-13  9:23 ` ubizjak at gmail dot com
2022-05-06  8:30 ` jakub at gcc dot gnu.org
2023-05-08 12:21 ` rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-98218-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).