public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/110202] _mm512_ternarylogic_epi64 generates unnecessary operations
Date: Sat, 10 Jun 2023 21:10:24 +0000	[thread overview]
Message-ID: <bug-110202-4-eOEdlr5L5A@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-110202-4@http.gcc.gnu.org/bugzilla/>

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-06-10
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #3)
> Well, there is nothing magic on exactly 0x55 immediate, there are 256
> possible immediates, most of them use all of A, B, C, some of them use just
> A, B, others just B, C, others just A, C, others just A, others just B,
> others just C, others none of them.
> And I must say I don't immediately see easy rules how to find out from the
> immediate value which set is which, so unless we find some easy rule for
> that, we'd need to hardcode the mapping between the 256 values to a bitmask
> which inputs are actually used.
> And then the question is how to represent that in RTL to make it clear that
> some operands are mentioned but their value isn't really used.

In the case of 0x55, an idea might be to split (or expand) it into how ~ is
represented.

That is:
(insn:TI 6 3 12 2 (set (reg:V8DI 20 xmm0 [85])
        (xor:V8DI (mem:V8DI (reg/v/f:DI 5 di [orig:84 a ] [84]) [0 *a_3(D)+0
S64 A512])
            (const_vector:V8DI [
                    (const_int -1 [0xffffffffffffffff]) repeated x8
                ]))) "/app/example.cpp":21:14 6764 {*one_cmplv8di2}
     (expr_list:REG_DEAD (reg/v/f:DI 5 di [orig:84 a ] [84])
        (nil)))

  parent reply	other threads:[~2023-06-10 21:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-10 10:37 [Bug c++/110202] New: " fabio at cannizzo dot net
2023-06-10 16:07 ` [Bug target/110202] " pinskia at gcc dot gnu.org
2023-06-10 16:14 ` [Bug rtl-optimization/110202] " pinskia at gcc dot gnu.org
2023-06-10 18:36 ` jakub at gcc dot gnu.org
2023-06-10 21:10 ` pinskia at gcc dot gnu.org [this message]
2023-06-12 17:14 ` fabio at cannizzo dot net
2023-06-12 19:04 ` amonakov at gcc dot gnu.org
2023-06-27 17:59 ` amonakov at gcc dot gnu.org
2023-06-28  0:47 ` crazylht at gmail dot com
2023-06-28  5:07 ` amonakov at gcc dot gnu.org
2023-07-12  7:51 ` cvs-commit at gcc dot gnu.org
2023-08-04 16:44 ` [Bug target/110202] " cvs-commit at gcc dot gnu.org
2023-08-05 15:32 ` amonakov 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-110202-4-eOEdlr5L5A@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).