public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix PR 111972
@ 2023-12-02  6:37 Andrew Pinski
  2023-12-02  6:37 ` [PATCH 1/3] MATCH: Fix zero_one_valued_p's convert pattern Andrew Pinski
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Andrew Pinski @ 2023-12-02  6:37 UTC (permalink / raw)
  To: gcc-patches

This patch set fixes PR 111972 and the fallout from it.

The first patch is a fix to zero_one_valued_p's convert pattern
which I hit while running the testsuite with the last patch.

The second patch is a fix for -fanalyzer which I had implemented with
a different version of the 3rd patch while I was working at Marvell.

And the 3rd patch fixes the issue by having the following as
canonical forms:
* `a ^ 1` is the canonical form of `(convert_back)(zero_one == 0)` (and `(convert_back)(zero_one != 1)`).
* `(convert)a` is the canonical form of `(convert)(zero_one != 0)` (and `(convert)(zero_one == 1)`).

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>


Andrew Pinski (3):
  MATCH: Fix zero_one_valued_p's convert pattern
  Remove check of unsigned_char in
    maybe_undo_optimize_bit_field_compare.
  MATCH: (convert)(zero_one !=/== 0/1) for outer type and zero_one type
    are the same

 gcc/analyzer/region-model-manager.cc       |  3 --
 gcc/match.pd                               | 24 +++++++++++++++
 gcc/testsuite/gcc.dg/tree-ssa/pr110637-1.c | 10 +++++++
 gcc/testsuite/gcc.dg/tree-ssa/pr110637-2.c | 13 +++++++++
 gcc/testsuite/gcc.dg/tree-ssa/pr110637-3.c | 14 +++++++++
 gcc/testsuite/gcc.dg/tree-ssa/pr111972-1.c | 34 ++++++++++++++++++++++
 gcc/testsuite/gcc.dg/tree-ssa/pr69270.c    |  4 +--
 gcc/testsuite/gcc.target/i386/pr110790-2.c | 16 ++++++++--
 8 files changed, 111 insertions(+), 7 deletions(-)
 create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr110637-1.c
 create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr110637-2.c
 create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr110637-3.c
 create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr111972-1.c

-- 
2.34.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-12-04 21:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-02  6:37 [PATCH 0/3] Fix PR 111972 Andrew Pinski
2023-12-02  6:37 ` [PATCH 1/3] MATCH: Fix zero_one_valued_p's convert pattern Andrew Pinski
2023-12-04 14:21   ` Richard Biener
2023-12-02  6:37 ` [PATCH 2/3] Remove check of unsigned_char in maybe_undo_optimize_bit_field_compare Andrew Pinski
2023-12-02  6:37 ` [PATCH 3/3] MATCH: (convert)(zero_one !=/== 0/1) for outer type and zero_one type are the same Andrew Pinski
2023-12-04 14:21   ` Richard Biener
2023-12-04 21:14     ` Andrew Pinski (QUIC)

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