This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Bit twiddling builtins
- From: Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 27 Jan 2003 19:08:43 +0100
- Subject: Re: Bit twiddling builtins
- References: <10BCDB75-0648-11D7-AA5B-00039372607E@physics.uc.edu><200212022339.SAA29028@makai.watson.ibm.com><20030120114128.GA8612@safelogic.se><874r82l0bo.fsf@student.uni-tuebingen.de><20030121232416.GA21849@redhat.com><87lm1d4f47.fsf@student.uni-tuebingen.de><20030123015624.GA23039@redhat.com><874r7zlezl.fsf_-_@student.uni-tuebingen.de><20030124025718.GA24139@redhat.com><20030124083900.GI24139@redhat.com>
Richard Henderson <rth@redhat.com> writes:
> Oh, I see what you mean. Counting from the top, DImode has 32
> more zeros than SImode.
>
> There are two ways we could handle this:
>
> (1) Refuse to widen CLZ, no matter what. This requires all targets
> to implement CLZ in all sizes they want to use it in.
>
> (2) Have optabs account for this by transforming:
>
> (clz:narrow x)
> to
> (clz:wide (zero_extend:wide x)) - ((width wide) - (width narrow))
I would like to do this, but I can't find the proper place to put
it. Can you give me a hint?
--
Falk