public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/106060] Inefficient constant broadcast on x86_64
Date: Thu, 23 Jun 2022 15:46:36 +0000	[thread overview]
Message-ID: <bug-106060-4-10gIg9U4kn@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106060-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 53196
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53196&action=edit
A patch

This generates:

0000000000000000 <shouldnt_have_movabs>:
   0:   b8 7b 00 00 00          mov    $0x7b,%eax
   5:   c5 f9 6e c0             vmovd  %eax,%xmm0
   9:   c4 e2 7d 78 c0          vpbroadcastb %xmm0,%ymm0
   e:   c3                      ret
   f:   90                      nop

0000000000000010 <should_be_cmpeq_abs>:
  10:   b8 01 00 00 00          mov    $0x1,%eax
  15:   c5 f9 6e c0             vmovd  %eax,%xmm0
  19:   c4 e2 7d 78 c0          vpbroadcastb %xmm0,%ymm0
  1e:   c3                      ret
  1f:   90                      nop

0000000000000020 <should_be_cmpeq_add>:
  20:   b8 fe ff ff ff          mov    $0xfffffffe,%eax
  25:   c5 f9 6e c0             vmovd  %eax,%xmm0
  29:   c4 e2 7d 78 c0          vpbroadcastb %xmm0,%ymm0
  2e:   c3                      ret

  parent reply	other threads:[~2022-06-23 15:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-23  1:59 [Bug target/106060] New: " goldstein.w.n at gmail dot com
2022-06-23  7:05 ` [Bug target/106060] " crazylht at gmail dot com
2022-06-23 15:46 ` hjl.tools at gmail dot com [this message]
2023-05-17 23:15 ` pinskia at gcc dot gnu.org
2023-05-17 23:15 ` pinskia at gcc dot gnu.org
2024-01-14 11:57 ` roger at nextmovesoftware dot com
2024-02-16  9:41 ` roger at nextmovesoftware dot com
2024-05-07  6:19 ` cvs-commit at gcc dot gnu.org
2024-05-12  9:13 ` roger at nextmovesoftware dot com

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-106060-4-10gIg9U4kn@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).