This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bit twiddling builtins


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]