public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/111280] CLZ(0) generated when CLZ_DEFINED_VALUE_AT_ZERO is false Date: Tue, 12 Sep 2023 11:07:52 +0000 [thread overview] Message-ID: <bug-111280-4-N4Zu0xnGcn@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-111280-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111280 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Note, in PR111309 we briefly discussed adding __builtin_{clz,ctz,popcount,ffs,clrsb} builtin type-generic variants which would be well defined for clz/ctz cases. I think the best representation of that would be to lower those builtins (dunno what suffix to use for them yet) to .CLZ/.CTZ ifns with 2 arguments where the second argument would be the value to be returned if the first argument is zero. Then at expansion time we could compare that value against C?Z_VALUE_DEFINED_AT_ZERO, if it is the same, don't do anything special, otherwise add a test against 0.
prev parent reply other threads:[~2023-09-12 11:07 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-09-03 23:26 [Bug tree-optimization/111280] New: " kristerw at gcc dot gnu.org 2023-09-04 1:10 ` [Bug tree-optimization/111280] " pinskia at gcc dot gnu.org 2023-09-04 1:11 ` pinskia at gcc dot gnu.org 2023-09-12 11:02 ` rguenth at gcc dot gnu.org 2023-09-12 11:07 ` jakub 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-111280-4-N4Zu0xnGcn@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).