public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Jakub Jelinek <jakub@redhat.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 10:38:28 -0700	[thread overview]
Message-ID: <83e0e930-222d-28f9-9e78-a8d8a11c8525@gmail.com> (raw)
In-Reply-To: <Y7MS199zNr35xGj2@tucnak>



On 1/2/23 10:22, Jakub Jelinek wrote:
> 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}."
M is the mode on the insn (ie clzsi2).  I don't see a reference to
                                  ^^
@var{x}.  Weird.

jeff

  reply	other threads:[~2023-01-02 17:38 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
2023-01-02 17:38         ` Jeff Law [this message]
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=83e0e930-222d-28f9-9e78-a8d8a11c8525@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.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).