public inbox for
 help / color / mirror / Atom feed
From: Jeff Law <>
To: Philipp Tomsich <>
	Christoph Muellner <>,
	Kito Cheng <>,
	Vineet Gupta <>,
	Jeff Law <>,
	Palmer Dabbelt <>
Subject: Re: [PATCH] RISC-V: Handle "(a & twobits) == singlebit" in branches using Zbs
Date: Thu, 17 Nov 2022 09:39:49 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 11/17/22 08:12, Philipp Tomsich wrote:
> This serves as an assertion only, as that case is non-sensical and
> will be optimized away by earlier passes (as "a & C == T" with C and T
> sharing no bits will always be false).
> IFAIK the preceding transforms should always clean such a check up,
> but we can't exclude the possibility that with enough command line
> overrides and params we might see such a non-sensical test making it
> all the way to the backend.

Good!  I was thinking in the back of my mind that the no-sharing-bits 
case should have been handled in the generic optimizers.  Thanks for 

> What would you recommend? Adding this to the pattern's condition feels
> a bit redundant.

We can leave it in the splitter.

> In fact, I am leaning towards hiding the !SMALL_OPERAND check in yet
> another predicate that combines const_twobits_operand with a
> match_test for !SMALL_OPERAND.



  reply	other threads:[~2022-11-17 16:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-13 20:48 Philipp Tomsich
2022-11-17 14:58 ` Jeff Law
2022-11-17 15:12   ` Philipp Tomsich
2022-11-17 16:39     ` Jeff Law [this message]
2022-11-17 16:46       ` Philipp Tomsich
2022-11-17 18:25 ` Andrew Pinski
2022-11-17 18:27   ` Andrew Pinski
2022-11-17 18:57     ` Philipp Tomsich
2022-11-17 18:33 ` Andrew Waterman
2022-11-17 18:51   ` Philipp Tomsich
2022-11-17 18:56     ` Andrew Waterman
2022-11-17 18:59       ` Philipp Tomsich

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:

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

  git send-email \ \ \ \ \ \ \ \ \ \

* 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).