public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Jeff Law <jeffreyalaw@gmail.com>
Cc: Roger Sayle <roger@nextmovesoftware.com>,
	"'GCC Patches'" <gcc-patches@gcc.gnu.org>,
	"'Segher Boessenkool'" <segher@kernel.crashing.org>
Subject: Re: [PATCH] Fix RTL simplifications of FFS, POPCOUNT and PARITY.
Date: Mon, 2 Jan 2023 18:22:31 +0100	[thread overview]
Message-ID: <Y7MS199zNr35xGj2@tucnak> (raw)
In-Reply-To: <06fc4f7f-264c-7955-96a1-6e51be401818@gmail.com>

On Mon, Jan 02, 2023 at 09:20:33AM -0700, Jeff Law wrote:
> > > In fact Raphael and I were about to submit a patch which takes advantage of
> > > that capability to improve the code slightly for risc-v.
> > 
> > Just use a pattern with zero_extend or sign_extend around it or subreg of
> > it?
> If it were only that easy ;(  In the bowels of the simplifications the
> zero_extension turns into either a pair of shifts or an AND with a mask (I
> forget which offhand).  I'm sure we *can* work around this in the target,
> but it'll be ugly.
> 
> The documentation definitely needs to be updated.  I looked at the whole
> family a few weeks ago and my recollection was they all need to be fixed
> (ffs, clrsb, clz, ctz, popcount & parity) if the defined semantics are that
> the input and output operand modes must match.

When I look at the documentation of all the above, all of them have
"The mode of @var{x} must be @var{m} or @code{VOIDmode}."

	Jakub


  reply	other threads:[~2023-01-02 17:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-01 15:55 Roger Sayle
2023-01-01 21:03 ` Segher Boessenkool
2023-01-01 22:59   ` roger
2023-01-02 15:45 ` Jeff Law
2023-01-02 15:59   ` Jakub Jelinek
2023-01-02 16:20     ` Jeff Law
2023-01-02 17:22       ` Jakub Jelinek [this message]
2023-01-02 17:38         ` Jeff Law
2023-01-03 11:33       ` Segher Boessenkool
2023-01-02 17:30   ` roger
2023-01-02 17:47     ` Jeff Law
2023-02-21 15:39 ` Jakub Jelinek
2023-02-26 13:10   ` Roger Sayle
2023-02-27 16:47     ` Segher Boessenkool

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y7MS199zNr35xGj2@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=roger@nextmovesoftware.com \
    --cc=segher@kernel.crashing.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).