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/94962] Suboptimal AVX2 code for _mm256_zextsi128_si256(_mm_set1_epi8(-1))
Date: Mon, 18 May 2020 08:41:45 +0000	[thread overview]
Message-ID: <bug-94962-4-oW47mR6ZaU@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94962-4@http.gcc.gnu.org/bugzilla/>

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

Hongtao.liu <crazylht at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |crazylht at gmail dot com

--- Comment #1 from Hongtao.liu <crazylht at gmail dot com> ---
redudant vmovdaq xmm0, xmm0 is generated by 
----
(insn:TI 7 6 14 2 (set (reg:V8SI 20 xmm0 [84])
        (vec_concat:V8SI (reg:V4SI 20 xmm0 [86])
            (const_vector:V4SI [
                    (const_int 0 [0]) repeated x4
                ])))
"/export/users2/liuhongt/install/gcc10_trunk/lib/gcc/x86_64-pc-linux-gnu/10.0.1/include/avxintrin.h":770:20
5296 {avx_vec_concatv8si}
     (expr_list:REG_EQUIV (const_vector:V8SI [
                (const_int -1 [0xffffffffffffffff]) repeated x4
                (const_int 0 [0]) repeated x4
            ])
        (nil)))
-----

could be eliminated if src operand has same regno as dest operand.

---
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index 7a7ecd4be87..4ff4cf55f74 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -21123,6 +21123,9 @@
        }
     case 2:
     case 3:
+      if (register_operand (operands[1], <ssehalfvecmode>MODE)
+         && REGNO (operands[1]) == REGNO (operand[0]))
+       return "";
       switch (get_attr_mode (insn))
        {
        case MODE_V16SF:
---

  reply	other threads:[~2020-05-18  8:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05 21:41 [Bug tree-optimization/94962] New: " nemo@self-evident.org
2020-05-18  8:41 ` crazylht at gmail dot com [this message]
2020-05-18  9:37 ` [Bug target/94962] " jakub at gcc dot gnu.org
2020-05-18  9:55 ` crazylht at gmail dot com
2020-05-18 10:01 ` crazylht at gmail dot com
2020-05-18 15:43 ` nemo@self-evident.org
2020-05-19  6:14 ` crazylht at gmail dot com
2020-05-19 16:39 ` nemo@self-evident.org
2022-09-23  5:29 ` cvs-commit at gcc dot gnu.org
2022-09-23  5:32 ` crazylht at gmail dot com
2022-09-26  5:30 ` cvs-commit 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-94962-4-oW47mR6ZaU@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).