public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "glisse at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/95926] Failure to optimize xor pattern when using temporary variable Date: Sat, 27 Jun 2020 11:59:23 +0000 [thread overview] Message-ID: <bug-95926-4-URa7PuxbUU@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-95926-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95926 --- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> --- It is different to gcc because in the first case, tmp is used twice, while in the second case, each a&b is only used once, and gcc only transforms (a&b)^b to b&~a if this is the only use of a&b. Yes, this heuristic often backfires, but as long as we consider &~ as 2 operations, not restricting the transformation could generate worse code in some cases.
next prev parent reply other threads:[~2020-06-27 11:59 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-27 2:08 [Bug tree-optimization/95926] New: Failure to optimize xor pattern when gabravier at gmail dot com 2020-06-27 11:59 ` glisse at gcc dot gnu.org [this message] 2020-06-29 9:45 ` [Bug tree-optimization/95926] Failure to optimize xor pattern when using temporary variable rguenth at gcc dot gnu.org 2021-08-15 0:07 ` pinskia 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-95926-4-URa7PuxbUU@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: linkBe 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).