public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/110235] [14 Regression] Wrong use of us_truncate in SSE and AVX RTL representation
Date: Mon, 19 Jun 2023 01:34:44 +0000	[thread overview]
Message-ID: <bug-110235-4-LahZ4rNaOA@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-110235-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by hongtao Liu <liuhongt@gcc.gnu.org>:

https://gcc.gnu.org/g:58e61a3ab1c13b6d5b07d86a30cf48a46e0345c8

commit r14-1916-g58e61a3ab1c13b6d5b07d86a30cf48a46e0345c8
Author: liuhongt <hongtao.liu@intel.com>
Date:   Wed Jun 14 10:34:32 2023 +0800

    Reimplement packuswb/packusdw with UNSPEC_US_TRUNCATE instead of original
us_truncate.

    packuswb/packusdw does unsigned saturation for signed source, but rtl
    us_truncate means does unsigned saturation for unsigned source.
    So for value -1, packuswb will produce 0, but us_truncate produces
    255. The patch reimplement those related patterns and functions with
    UNSPEC_US_TRUNCATE instead of us_truncate.

    gcc/ChangeLog:

            PR target/110235
            * config/i386/i386-expand.cc (ix86_split_mmx_pack): Use
            UNSPEC_US_TRUNCATE instead of original us_truncate for
            packusdw/packuswb.
            * config/i386/mmx.md (mmx_pack<s_trunsuffix>swb): Substitute
            with ..
            (mmx_packsswb): .. this and ..
            (mmx_packuswb): .. this.
            (mmx_packusdw): Use UNSPEC_US_TRUNCATE instead of original
            us_truncate.
            (s_trunsuffix): Removed code iterator.
            (any_s_truncate): Ditto.
            * config/i386/sse.md (<sse2_avx2>_packuswb<mask_name>): Use
            UNSPEC_US_TRUNCATE instead of original us_truncate.
            (<sse4_1_avx2>_packusdw<mask_name>): Ditto.
            * config/i386/i386.md (UNSPEC_US_TRUNCATE): New unspec_c_enum.

  parent reply	other threads:[~2023-06-19  1:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-13  9:02 [Bug target/110235] New: " ktkachov at gcc dot gnu.org
2023-06-13 14:00 ` [Bug target/110235] " rguenth at gcc dot gnu.org
2023-06-14  4:54 ` [Bug target/110235] [14 Regression] " pinskia at gcc dot gnu.org
2023-06-14  6:25 ` crazylht at gmail dot com
2023-06-14  8:43 ` crazylht at gmail dot com
2023-06-15  8:48 ` ktkachov at gcc dot gnu.org
2023-06-15 23:01 ` pinskia at gcc dot gnu.org
2023-06-19  1:34 ` cvs-commit at gcc dot gnu.org [this message]
2023-06-19  1:34 ` cvs-commit at gcc dot gnu.org
2023-06-19  1:40 ` crazylht at gmail dot com
2023-07-15  6:04 ` pinskia 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-110235-4-LahZ4rNaOA@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).