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 d/110359] d: Suboptimal codegen for __builtin_expect(cond, false) since PR96435 Date: Mon, 26 Jun 2023 01:28:57 +0000 [thread overview] Message-ID: <bug-110359-4-f7nOJ8jGOe@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-110359-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110359 --- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Iain Buclaw <ibuclaw@gcc.gnu.org>: https://gcc.gnu.org/g:ab98db1e8c1b997414539f41b7fb814019497d8d commit r14-2082-gab98db1e8c1b997414539f41b7fb814019497d8d Author: Iain Buclaw <ibuclaw@gdcproject.org> Date: Mon Jun 26 03:24:27 2023 +0200 d: Suboptimal codegen for __builtin_expect(cond, false) Since PR96435, both boolean objects and expressions have been evaluated in the following way. (*(ubyte*)&obj_or_expr) & 1 It has been noted that sometimes this can cause the back-end to optimize in non-obvious ways - in particular with __builtin_expect. This @safe feature is now restricted to just when reading the value of a bool field that comes from a union. PR d/110359 gcc/d/ChangeLog: * d-convert.cc (convert_for_rvalue): Only apply the @safe boolean conversion to boolean fields of a union. (convert_for_condition): Call convert_for_rvalue in the default case. gcc/testsuite/ChangeLog: * gdc.dg/pr110359.d: New test.
next prev parent reply other threads:[~2023-06-26 1:29 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-06-21 18:44 [Bug d/110359] New: " ibuclaw at gcc dot gnu.org 2023-06-26 1:28 ` cvs-commit at gcc dot gnu.org [this message] 2023-06-26 1:40 ` [Bug d/110359] " cvs-commit at gcc dot gnu.org 2023-06-26 2:07 ` cvs-commit at gcc dot gnu.org 2023-06-26 2:09 ` cvs-commit at gcc dot gnu.org 2023-06-26 2:10 ` cvs-commit at gcc dot gnu.org 2023-06-26 2:13 ` ibuclaw 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-110359-4-f7nOJ8jGOe@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).