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/101175] builtin_clz generates wrong bsr instruction
Date: Thu, 24 Jun 2021 06:17:54 +0000	[thread overview]
Message-ID: <bug-101175-4-NGAewFf7wa@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101175-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Uros Bizjak <uros@gcc.gnu.org>:

https://gcc.gnu.org/g:9b997caa72498bc3a14a064648b721fe0f11945e

commit r9-9603-g9b997caa72498bc3a14a064648b721fe0f11945e
Author: Uros Bizjak <ubizjak@gmail.com>
Date:   Wed Jun 23 12:50:53 2021 +0200

    i386: Prevent unwanted combine from LZCNT to BSR [PR101175]

    The current RTX pattern for BSR allows combine pass to convert LZCNT insn
    to BSR. Note that the LZCNT has a defined behavior to return the operand
    size when operand is zero, where BSR has not.

    Add a BSR specific setting of zero-flag to RTX pattern of BSR insn
    in order to avoid matching unwanted combinations.

    2021-06-23  Uroš Bizjak  <ubizjak@gmail.com>

    gcc/
            PR target/101175
            * config/i386/i386.md (bsr_rex64): Add zero-flag setting RTX.
            (bsr): Ditto.
            (*bsrhi): Remove.
            (clz<mode>2): Update RTX pattern for additions.

    gcc/testsuite/

            PR target/101175
            * gcc.target/i386/pr101175.c: New test.

    (cherry picked from commit 1e16f2b472c7d253d564556a048dc4ae16119c00)

  parent reply	other threads:[~2021-06-24  6:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-23  5:56 [Bug target/101175] New: " mytbk920423 at gmail dot com
2021-06-23  7:33 ` [Bug target/101175] " ubizjak at gmail dot com
2021-06-23  8:33 ` mikpelinux at gmail dot com
2021-06-23  8:35 ` ubizjak at gmail dot com
2021-06-23  8:38 ` mikpelinux at gmail dot com
2021-06-23 10:51 ` cvs-commit at gcc dot gnu.org
2021-06-23 18:11 ` cvs-commit at gcc dot gnu.org
2021-06-24  6:17 ` cvs-commit at gcc dot gnu.org
2021-06-24  6:17 ` cvs-commit at gcc dot gnu.org [this message]
2021-06-24  6:18 ` ubizjak at gmail 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-101175-4-NGAewFf7wa@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).