public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/113682] Branches in branchless binary search rather than cmov/csel/csinc
Date: Fri, 02 Feb 2024 01:04:25 +0000	[thread overview]
Message-ID: <bug-113682-4-vG6uXTVCVl@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113682-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Mathias Stearn from comment #5)
> Do you know if that applies to any cores that support x86_64? I checked
> Agner Fog's tables, and only very very old cores (P4 era) had high
> reciprocal throughput, but even then it was less than latency. It looks like
> all AMD cores and intel cores newer than ivy bridge (ie everything from the
> last 10 years) are able to execute multiple CMOVs per cycle (reciprocal
> throughput < 1). From what I can see, it looks like bad CMOV was a
> particular problem of the Pentium 4 and Prescott cores, and possibly PPro,
> but I don't see the numbers for it. I don't think any of those cores should
> have an impact on the default cost model in 2024.

/* X86_TUNE_ONE_IF_CONV_INSNS: Restrict a number of cmov insns in
   if-converted sequence to one.  */
DEF_TUNE (X86_TUNE_ONE_IF_CONV_INSN, "one_if_conv_insn",
          m_SILVERMONT | m_KNL | m_KNM | m_INTEL | m_CORE_ALL | m_GOLDMONT
          | m_GOLDMONT_PLUS | m_TREMONT | m_CORE_HYBRID | m_CORE_ATOM
          | m_ZHAOXIN | m_GENERIC)


So it looks like it is the low power atom cores which still have this issue.
Tremont is from 2021 so you can't say those cores should not impact default
cost models ...

  parent reply	other threads:[~2024-02-02  1:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-31 13:48 [Bug other/113682] New: " redbeard0531 at gmail dot com
2024-01-31 14:16 ` [Bug rtl-optimization/113682] " rguenth at gcc dot gnu.org
2024-01-31 16:53 ` pinskia at gcc dot gnu.org
2024-01-31 18:00 ` [Bug middle-end/113682] " pinskia at gcc dot gnu.org
2024-02-01 10:30 ` tnfchris at gcc dot gnu.org
2024-02-01 13:52 ` redbeard0531 at gmail dot com
2024-02-02  1:04 ` pinskia at gcc dot gnu.org [this message]
2024-04-02 17:46 ` [Bug rtl-optimization/113682] " tnfchris at gcc dot gnu.org
2024-04-02 18:01 ` pinskia at gcc dot gnu.org
2024-04-03 11:10 ` tnfchris 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-113682-4-vG6uXTVCVl@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).