From: Bernd Schmidt <bernds@codesourcery.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Richard Henderson <rth@redhat.com>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fix __bultin_clrsb* (PR middle-end/49489)
Date: Tue, 21 Jun 2011 16:46:00 -0000 [thread overview]
Message-ID: <4E00C3AC.2060902@codesourcery.com> (raw)
In-Reply-To: <20110621161058.GJ16443@tyan-ft48-01.lab.bos.redhat.com>
On 06/21/2011 06:10 PM, Jakub Jelinek wrote:
> gcc.c-torture/execute/builtin-bitops-1.c fails on x86_64-linux, because
> there is no SImode libcall, only DImode, and it was zero-extending instead
> of sign-extending the argument, and not subtracting the mode difference
> afterwards. So int foo (int x) { return __builtin_clrsb (x); }
> expanded the same as
> int foo (int x) { return __builtin_clrsbl ((unsigned) x); }
> instead of the correct
> int foo (int x) { return __builtin_clrsbl (x) - 32; }
>
> Fixed thusly, I've also added folding of constant arguments
> during tree optimizations for it.
>
> Ok for trunk?
Ok.
> (fold_builtin_bitop): Fix masking for width > HOST_BITS_PER_WIDE_INT
> and < 2 * HOST_BITS_PER_WIDE_INT. Optimize BUILT_IN_CLRSB*.
Oh that's where the folders were hiding? I thought we didn't have any
for this family of builtins.
Bernd
next prev parent reply other threads:[~2011-06-21 16:16 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-16 13:06 Add __builtin_clrsb, similar to clz/ctz Bernd Schmidt
2011-06-16 13:10 ` Georg-Johann Lay
2011-06-16 13:56 ` Laurent Desnogues
2011-06-16 13:59 ` Bernd Schmidt
2011-06-16 17:03 ` Richard Henderson
2011-06-20 20:32 ` Bernd Schmidt
2011-06-20 20:48 ` Richard Henderson
2011-06-21 16:39 ` [PATCH] Fix __bultin_clrsb* (PR middle-end/49489) Jakub Jelinek
2011-06-21 16:46 ` Bernd Schmidt [this message]
2011-06-23 6:23 ` Add __builtin_clrsb, similar to clz/ctz H.J. Lu
2011-07-12 3:50 ` Hans-Peter Nilsson
2011-08-23 10:07 ` Jakub Jelinek
2011-08-23 10:08 ` Bernd Schmidt
2011-08-23 10:19 ` Richard Guenther
2011-08-23 10:25 ` Jakub Jelinek
2011-08-23 10:34 ` Bernd Schmidt
2011-08-23 13:43 ` [PATCH] For FFS/CLZ/CTZ/CLRSB/POPCOUNT/PARITY/BSWAP require operand mode equal to operation mode (or VOIDmode) (PR middle-end/50161) Jakub Jelinek
2011-08-23 14:54 ` Georg-Johann Lay
2011-08-23 15:58 ` Jakub Jelinek
2011-08-23 16:16 ` Bernd Schmidt
2011-08-23 10:45 ` Add __builtin_clrsb, similar to clz/ctz Richard Sandiford
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=4E00C3AC.2060902@codesourcery.com \
--to=bernds@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=rth@redhat.com \
/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).