public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "arjan at linux dot intel.com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/101891] Adjust -fzero-call-used-regs to always use XOR
Date: Tue, 24 May 2022 18:55:23 +0000	[thread overview]
Message-ID: <bug-101891-4-qMegRdUHcp@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101891-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #9 from Arjan van de Ven <arjan at linux dot intel.com> ---
I don't have recent measurements since we did this work quite some time ago.

basically on the CPU level (speaking for Intel style cpus at least), a CPU can
eliminate (meaning: no execution resources used) 1 to 3 (depending on
generation) register to register per clock cycle.. There's ALSO a path in the
hardware for optimizing XOR <reg><reg> sequences to avoid execution
resources... when we did both we maximized the total number of these
eliminations...
while only XOR you can get bottlenecked on execution if you have too many.
(all the mov's should have no other instructions depending on them, so even
though they depend on the XOR, they're still fully 'orphan' for the out of
order engine)

      parent reply	other threads:[~2022-05-24 18:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-12 19:47 [Bug middle-end/101891] New: " kees at outflux dot net
2021-08-12 20:08 ` [Bug target/101891] " pinskia at gcc dot gnu.org
2022-01-28 20:29 ` qinzhao at gcc dot gnu.org
2022-05-05 13:35 ` qinzhao at gcc dot gnu.org
2022-05-09 15:37 ` cvs-commit at gcc dot gnu.org
2022-05-09 15:43 ` qinzhao at gcc dot gnu.org
2022-05-24 15:04 ` cvs-commit at gcc dot gnu.org
2022-05-24 15:55 ` cvs-commit at gcc dot gnu.org
2022-05-24 15:55 ` qinzhao at gcc dot gnu.org
2022-05-24 16:42 ` arjan at linux dot intel.com
2022-05-24 18:47 ` qing.zhao at oracle dot com
2022-05-24 18:55 ` arjan at linux dot intel.com [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-101891-4-qMegRdUHcp@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).