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/100758] __builtin_cpu_supports does not (always) detect "sse2"
Date: Wed, 03 May 2023 15:21:40 +0000	[thread overview]
Message-ID: <bug-100758-4-qUUWLmGrvw@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100758-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #27 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:

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

commit r10-11367-gbe80a2e64a38540a371fa4f03513653d2741bc89
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Thu Feb 9 17:43:19 2023 +0100

    i386: Call get_available_features for all CPUs with max_level >= 1
[PR100758]

    get_available_features doesn't depend on cpu_model2->__cpu_{family,model}
    and just sets stuff up based on CPUID leaf 1, or some extended ones,
    so I wonder why are we calling it separately for Intel, AMD and Zhaoxin
    and not for all other CPUs too?  I think various programs in the wild
    which aren't using __builtin_cpu_{is,supports} just check the various CPUID
    leafs and query bits in there, without blacklisting unknown CPU vendors,
    so I think even __builtin_cpu_supports ("sse2") etc. should be reliable
    if those VENDOR_{CENTAUR,CYRIX,NSC,OTHER} CPUs set those bits in CPUID leaf
    1 or some extended ones.  Calling it for all CPUs also means it can be
    inlined because there will be just a single caller.

    I have tested it on Intel and Martin tested it on AMD, but can't test it
    on non-Intel/AMD; for Intel/AMD/Zhaoxin it should be really no change in
    behavior.

    2023-02-09  Jakub Jelinek  <jakub@redhat.com>

            PR target/100758
            * config/i386/cpuinfo.c (cpu_indicator_init): Call
            get_available_features for all CPUs with max_level >= 1, rather
            than just Intel or AMD.

    (cherry picked from commit b24e9c083093a9e1b1007933a184c02f7ff058db)

      parent reply	other threads:[~2023-05-03 15:21 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25 18:37 [Bug c/100758] New: " gcc at eckner dot net
2021-05-26  7:57 ` [Bug target/100758] " marxin at gcc dot gnu.org
2021-05-26  9:12 ` gcc at eckner dot net
2021-05-26  9:23 ` marxin at gcc dot gnu.org
2021-05-26  9:46 ` gcc at eckner dot net
2021-05-26  9:54 ` rguenth at gcc dot gnu.org
2021-05-26 10:09 ` marxin at gcc dot gnu.org
2021-05-26 10:13 ` gcc at eckner dot net
2021-06-01 13:26 ` marxin at gcc dot gnu.org
2023-01-27 20:48 ` iam at valdikss dot org.ru
2023-02-01 14:03 ` marxin at gcc dot gnu.org
2023-02-01 14:23 ` iam at valdikss dot org.ru
2023-02-01 14:32 ` marxin at gcc dot gnu.org
2023-02-09 10:50 ` cvs-commit at gcc dot gnu.org
2023-02-09 11:40 ` jakub at gcc dot gnu.org
2023-02-09 11:47 ` marxin at gcc dot gnu.org
2023-02-09 12:22 ` jakub at gcc dot gnu.org
2023-02-09 16:22 ` gcc at eckner dot net
2023-02-09 16:37 ` jakub at gcc dot gnu.org
2023-02-09 16:45 ` cvs-commit at gcc dot gnu.org
2023-02-09 20:37 ` gcc at eckner dot net
2023-02-09 21:35 ` iam at valdikss dot org.ru
2023-02-10  8:27 ` marxin at gcc dot gnu.org
2023-02-10  9:45 ` jakub at gcc dot gnu.org
2023-02-20  9:50 ` Mayshao-oc at zhaoxin dot com
2023-03-19  5:29 ` cvs-commit at gcc dot gnu.org
2023-05-02 20:14 ` cvs-commit at gcc dot gnu.org
2023-05-03 15:21 ` cvs-commit at gcc dot gnu.org [this message]

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-100758-4-qUUWLmGrvw@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).