This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] teach emit_store_flag to use clz/ctz
- From: Paolo Bonzini <bonzini at gnu dot org>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Richard Guenther <richard dot guenther at gmail dot com>, Richard Guenther <rguenther at suse dot de>, gcc-patches at gcc dot gnu dot org, amodra at gmail dot com
- Date: Thu, 03 May 2012 17:23:47 +0200
- Subject: Re: [PATCH] teach emit_store_flag to use clz/ctz
- References: <1335520129-28934-1-git-send-email-bonzini@gnu.org> <Pine.LNX.4.64.1204271308530.23071@jbgna.fhfr.qr> <4F9A948A.1040903@gnu.org> <CAFiYyc20Cqah92yxsk8CNNpE=w4yWB6bC_b1E=y9ryf-_33TGA@mail.gmail.com> <4FA29FDB.8050203@redhat.com>
Il 03/05/2012 17:10, Richard Henderson ha scritto:
>>>
>>>
>>> ... except that no target sets the macros to 2, and all of them could
>>> (as far as I could see). Looks like the code trumps the documentation;
>>> how does this look?
>
> "No target sets to 2"? You mean like mips? You forgot to look at the
> corresponding CLZ_DEFINED_VALUE_AT_ZERO.
Yes, I missed that.
> I'll admit I hadn't been paying attention when sandra added the patch
> in question though...
>
>>> * optabs.c (expand_ffs): Check CTZ_DEFINED_VALUE_AT_ZERO
>>> against 1.
>>> * doc/tm.texi (Misc): Invert meaning of 1 and 2 for
>>> CLZ_DEFINED_VALUE_AT_ZERO and CTZ_DEFINED_VALUE_AT_ZERO.
>
> So... no, I don't think this is a good idea.
Yeah, not as I posted... of course config/mips/mips.h needs change, but
do you disagree that all targets _do_ have the same value at zero for
the optab as they have for RTL?
Paolo