linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: linux-sparse@vger.kernel.org
Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: [PATCH 0/3] remove early simplification of casts during evaluation
Date: Sun, 18 Apr 2021 13:56:32 +0200	[thread overview]
Message-ID: <20210418115635.40608-1-luc.vanoostenryck@gmail.com> (raw)

This series removes an early simplification of casts during evaluation
which was wrong in some contexts (for example when applied to a bool)
but adds the equivalent optimization back at simplification where it can
be safely done at IR level.


Luc Van Oostenryck (3):
  add testcases for simplification of casts.
  simplify TRUNC(NOT(x)) --> NOT(TRUNC(x))
  remove early simplification of casts during evaluation

 evaluate.c                       | 44 +-------------------------------
 simplify.c                       | 15 +++++++++++
 validation/eval/not-cast-bool.c  | 14 ++++++++++
 validation/eval/not-cast-float.c | 14 ++++++++++
 validation/optim/and-extendx.c   | 24 -----------------
 validation/optim/trunc-not0.c    | 20 +++++++++++++++
 6 files changed, 64 insertions(+), 67 deletions(-)
 create mode 100644 validation/eval/not-cast-bool.c
 create mode 100644 validation/eval/not-cast-float.c
 delete mode 100644 validation/optim/and-extendx.c
 create mode 100644 validation/optim/trunc-not0.c


base-commit: eb4cdd21b7d0cedbbeff7f70e24473706ccce5a6
-- 
2.31.1


             reply	other threads:[~2021-04-18 11:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-18 11:56 Luc Van Oostenryck [this message]
2021-04-18 11:56 ` [PATCH 1/3] add testcases for simplification of casts Luc Van Oostenryck
2021-04-18 11:56 ` [PATCH 2/3] simplify TRUNC(NOT(x)) --> NOT(TRUNC(x)) Luc Van Oostenryck
2021-04-18 11:56 ` [PATCH 3/3] remove early simplification of casts during evaluation Luc Van Oostenryck

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=20210418115635.40608-1-luc.vanoostenryck@gmail.com \
    --to=luc.vanoostenryck@gmail.com \
    --cc=linux-sparse@vger.kernel.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 NNTP newsgroup(s).