aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/dump-parse-tree.cc
diff options
context:
space:
mode:
authorAndrew Pinski <apinski@marvell.com>2023-07-12 00:33:14 -0700
committerAndrew Pinski <apinski@marvell.com>2023-07-13 07:54:55 -0700
commit285c9d042e90a7425b37697edc9ec93a1b03b486 (patch)
tree8024b07d4cee15fc4ec1b389c61287fefeb58208 /gcc/fortran/dump-parse-tree.cc
parentb175b4887f928118af997f6d4d75097a64dcec5d (diff)
downloadgcc-285c9d042e90a7425b37697edc9ec93a1b03b486.zip
gcc-285c9d042e90a7425b37697edc9ec93a1b03b486.tar.gz
gcc-285c9d042e90a7425b37697edc9ec93a1b03b486.tar.bz2
Fix part of PR 110293: `A NEEQ (A NEEQ CST)` part
This fixes part of PR 110293, for the outer comparison case being `!=` or `==`. In turn PR 110539 is able to be optimized again as the if statement for `(a&1) == ((a & 1) != 0)` gets optimized to `false` early enough to allow FRE/DOM to do a CSE for memory store/load. OK? Bootstrapped and tested on x86_64-linux with no regressions. gcc/ChangeLog: PR tree-optimization/110293 PR tree-optimization/110539 * match.pd: Expand the `x != (typeof x)(x == 0)` pattern to handle where the inner and outer comparsions are either `!=` or `==` and handle other constants than 0. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr110293-1.c: New test. * gcc.dg/tree-ssa/pr110539-1.c: New test. * gcc.dg/tree-ssa/pr110539-2.c: New test. * gcc.dg/tree-ssa/pr110539-3.c: New test. * gcc.dg/tree-ssa/pr110539-4.c: New test.
Diffstat (limited to 'gcc/fortran/dump-parse-tree.cc')
0 files changed, 0 insertions, 0 deletions