This is the mail archive of the
mailing list for the GCC project.
Re: Bit twiddling builtins
> Date: Mon, 3 Feb 2003 14:49:21 -0800
> From: Richard Henderson <firstname.lastname@example.org>
> Cc: Falk Hueffner <email@example.com>,
> On Mon, Feb 03, 2003 at 01:54:49PM -0800, Geoff Keating wrote:
> > On powerpc, one of the most important uses of clz is that you can write
> > __builtin_clz(x) >> 5
> > instead of
> > x == 0
> > which allows removal of the branch; but this doesn't work if clz
> > doesn't return 32 at 0.
> So what? How do you plan on communicating this to the user program?
I don't really care about the user program; I'm much more interested
in communicating with the middle-end of the compiler so it can apply
the above transformation itself and the user program doesn't have to know.
- Geoffrey Keating <firstname.lastname@example.org>