mbox series

[PATCHv2,0/2] Fix PR 111972: Missed vectorization due to phiopt changes

Message ID 20231210195650.1772459-1-quic_apinski@quicinc.com
Headers show
Series Fix PR 111972: Missed vectorization due to phiopt changes | expand

Message

Andrew Pinski Dec. 10, 2023, 7:56 p.m. UTC
This patch set fixes PR 111972 and the fallout from it.

The first patch is a fix for -fanalyzer which I had implemented with
a different version of the 2nd patch while I was working at Marvell.

And the 2nd 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)`).

Andrew Pinski (2):
  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/fold-const.cc                          | 27 -----------------
 gcc/match.pd                               | 16 ++++++++++
 gcc/testsuite/gcc.dg/fold-even-1.c         | 32 --------------------
 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 ++++++++--
 10 files changed, 103 insertions(+), 66 deletions(-)
 delete mode 100644 gcc/testsuite/gcc.dg/fold-even-1.c
 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