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/98495] X86 _mm_extract_pi16 incorrectly sign extends result
Date: Tue, 05 Jan 2021 13:08:22 +0000	[thread overview]
Message-ID: <bug-98495-4-69Qx14dSsf@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-98495-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:

https://gcc.gnu.org/g:af60b0ec79e9c5d7116122b185e44927aca5aa07

commit r11-6464-gaf60b0ec79e9c5d7116122b185e44927aca5aa07
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Jan 1 05:30:34 2021 -0800

    x86: Cast to unsigned short first for _mm_extract_pi16

    _mm_extract_pi16 is intrinsic for pextrw, which should be zero-extended,
    not sign-extended.

    gcc/

            PR target/98495
            * config/i386/xmmintrin.h (_mm_extract_pi16): Cast to unsigned
            short first.

    gcc/testsuite/

            PR target/98495
            * gcc.target/i386/pr98495-1.c: New test.
            * gcc.target/i386/pr98495-2.c: New test.
            * gcc.target/i386/pr98495-3.c: New test.
            * gcc.target/i386/pr98495-4.c: New test.
            * gcc.target/i386/pr98495-5.c: New test.

  parent reply	other threads:[~2021-01-05 13:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-01  4:14 [Bug target/98495] New: " foom at fuhm dot net
2021-01-01 13:06 ` [Bug target/98495] " hjl.tools at gmail dot com
2021-01-01 13:35 ` hjl.tools at gmail dot com
2021-01-05 13:08 ` cvs-commit at gcc dot gnu.org [this message]
2021-01-05 19:23 ` cvs-commit at gcc dot gnu.org
2021-04-27 11:39 ` jakub at gcc dot gnu.org
2021-07-28  7:05 ` rguenth at gcc dot gnu.org
2022-04-21  7:48 ` rguenth at gcc dot gnu.org
2023-05-29 10:03 ` jakub 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-98495-4-69Qx14dSsf@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).