linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: Ramsay Jones <ramsay@ramsayjones.plus.com>
Cc: linux-sparse@vger.kernel.org
Subject: Re: [PATCH v2 2/3] add more testcases for existing AND/OR simplifications
Date: Tue, 8 Sep 2020 00:28:33 +0200	[thread overview]
Message-ID: <20200907222833.tsbptcqsvk4lzikx@ltop.local> (raw)
In-Reply-To: <5ba9625b-4670-ea6a-c59d-d795406b9c39@ramsayjones.plus.com>

On Sun, Sep 06, 2020 at 10:54:25PM +0100, Ramsay Jones wrote:
> > 
> > diff --git a/validation/optim/and-shl-or-and0.c b/validation/optim/and-shl-or-and0.c
> > new file mode 100644
> > index 000000000000..298dcb434fc7
> > --- /dev/null
> > +++ b/validation/optim/and-shl-or-and0.c
> > @@ -0,0 +1,15 @@
> > +// =>	(b << 12) & 0xfff00000
> > +unsigned and_shl_or_and0(unsigned a, unsigned b)
> > +{
> > +	return (((a & 0xfff00000) | b) << 12) & 0xfff00000;
> > +}
> > +
> > +/*
> > + * check-name: and-shl-or-and0
> > + * check-command: test-linearize -Wno-decl $file
> > + *
> > + * check-output-ignore
> > + * check-output-excludes: or\\.
> > + * check-output-excludes: lsr\\.
> 
> Hmm, this still doesn't sit right - have you discovered the
> reason for this?

Sorry, I don't understand what I can add.
Such expressions are simplified into something where the OR and
the LSR are absent. This is what is checked by the test.
 
-- Luc

  reply	other threads:[~2020-09-07 22:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-06 21:16 [PATCH v2 0/3] fix & extend mask related testcases Luc Van Oostenryck
2020-09-06 21:16 ` [PATCH v2 1/3] optim: fix some testcases related to bitfield manipulation Luc Van Oostenryck
2020-09-06 21:16 ` [PATCH v2 2/3] add more testcases for existing AND/OR simplifications Luc Van Oostenryck
2020-09-06 21:54   ` Ramsay Jones
2020-09-07 22:28     ` Luc Van Oostenryck [this message]
2020-09-06 21:16 ` [PATCH v2 3/3] add more testcases for AND/OR simplification Luc Van Oostenryck
2020-09-07  0:15   ` Ramsay Jones
2020-09-07 22:21     ` Luc Van Oostenryck
2020-09-08 15:39       ` Ramsay Jones

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=20200907222833.tsbptcqsvk4lzikx@ltop.local \
    --to=luc.vanoostenryck@gmail.com \
    --cc=linux-sparse@vger.kernel.org \
    --cc=ramsay@ramsayjones.plus.com \
    /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 NNTP newsgroup(s).