This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Add __builtin_clrsb, similar to clz/ctz
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Bernd Schmidt <bernds at codesourcery dot com>
- Cc: Eric Botcazou <ebotcazou at adacore dot com>, Richard Sandiford <richard dot sandiford at linaro dot org>, Richard Henderson <rth at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 23 Aug 2011 11:52:43 +0200
- Subject: Re: Add __builtin_clrsb, similar to clz/ctz
- References: <4DF9FA9A.8040505@codesourcery.com> <4DFA2E85.2030601@redhat.com> <4DFFA1AE.7070405@codesourcery.com> <20110823090549.GC2687@tyan-ft48-01.lab.bos.redhat.com> <4E53744B.6040502@codesourcery.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Aug 23, 2011 at 11:35:07AM +0200, Bernd Schmidt wrote:
> > cse_process_notes_1
> > perhaps could be changed for VOIDmode new_rtx to try to
> > simplify_replace_rtx it...
>
> Is this where the problem came from? Sounds like it's worth a try.
In this case, yes. But there are many other places all around the
compiler that need to disallow unary op with VOIDmode operand.
In cse.c alone e.g. fold_rtx (twice), in combine.c e.g. in do_SUBST,
subst, etc. Do we want to special case all those 7 unary ops there too?
Is it really worth it to save one subreg or truncate in the md patterns
for rarely used rtxes?
> Wasn't Richard S. working on a patch to give constants modes?
I don't think this is achievable for 4.7...
Jakub