aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppbuiltin.cc
diff options
context:
space:
mode:
authorAndrew Pinski <apinski@marvell.com>2023-08-02 14:49:00 -0700
committerAndrew Pinski <apinski@marvell.com>2023-08-04 00:26:42 -0700
commit91c963ea6f845a0c59b7523a5330b8d3ed1beb6a (patch)
treea136a83a6373501d95d2d46de5937fdf82d8535a /gcc/cppbuiltin.cc
parent9020da78df2854f14f8b1d38b58a6d3b77a4b731 (diff)
downloadgcc-91c963ea6f845a0c59b7523a5330b8d3ed1beb6a.zip
gcc-91c963ea6f845a0c59b7523a5330b8d3ed1beb6a.tar.gz
gcc-91c963ea6f845a0c59b7523a5330b8d3ed1beb6a.tar.bz2
Fix PR 110874: infinite loop in gimple_bitwise_inverted_equal_p with fre
This changes gimple_bitwise_inverted_equal_p to use a 2 different match patterns to try to match bit_not wrapped with a possible nop_convert and a comparison also wrapped with a possible nop_convert. This is to avoid being recursive. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. gcc/ChangeLog: PR tree-optimization/110874 * gimple-match-head.cc (gimple_bit_not_with_nop): New declaration. (gimple_maybe_cmp): Likewise. (gimple_bitwise_inverted_equal_p): Rewrite to use gimple_bit_not_with_nop and gimple_maybe_cmp instead of being recursive. * match.pd (bit_not_with_nop): New match pattern. (maybe_cmp): Likewise. gcc/testsuite/ChangeLog: PR tree-optimization/110874 * gcc.c-torture/compile/pr110874-a.c: New test.
Diffstat (limited to 'gcc/cppbuiltin.cc')
0 files changed, 0 insertions, 0 deletions