[0/3] start of moving value replacement from phiopt to match

Message ID 20231029164049.994454-1-pinskia@gmail.com
Headers
Series start of moving value replacement from phiopt to match |

Message

Andrew Pinski Oct. 29, 2023, 4:40 p.m. UTC
  This set of 3 patches, copy what is being done in value replacement and
puts it into match-and-simplify form. I will be rewriting value_replacement
in phiopt to use match and simplify directly in the next few months but
I thought getting these into match form earlier on can help improve code
generation independently of that move.

Note this does not add the absorbing_element_p optimizations yet; I filed PR 112271
to record that move.

Andrew Pinski (3):
  MATCH: first of the value replacement moving from phiopt
  MATCH: Move jump_function_from_stmt support to match.pd
  MATCH: Add some more value_replacement simplifications to match

 gcc/match.pd                                  | 53 +++++++++++++++++++
 .../analyzer/inlining-3-multiline.c           |  5 +-
 .../c-c++-common/analyzer/inlining-3.c        |  3 ++
 gcc/testsuite/gcc.dg/tree-ssa/cond-1.c        | 17 ++++++
 .../gcc.dg/tree-ssa/phi-opt-value-1.c         | 17 ++++++
 .../gcc.dg/tree-ssa/phi-opt-value-1a.c        | 19 +++++++
 .../gcc.dg/tree-ssa/phi-opt-value-2.c         | 19 +++++++
 .../gcc.dg/tree-ssa/phi-opt-value-3.c         | 22 ++++++++
 .../gcc.dg/tree-ssa/phi-opt-value-4.c         | 36 +++++++++++++
 gcc/testsuite/gcc.dg/tree-ssa/vrp03.c         |  2 +-
 10 files changed, 191 insertions(+), 2 deletions(-)
 create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/cond-1.c
 create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/phi-opt-value-1.c
 create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/phi-opt-value-1a.c
 create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/phi-opt-value-2.c
 create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/phi-opt-value-3.c
 create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/phi-opt-value-4.c