diff options
author | Andrew Pinski <apinski@marvell.com> | 2023-09-14 14:47:04 -0700 |
---|---|---|
committer | Andrew Pinski <apinski@marvell.com> | 2023-09-15 07:27:12 -0700 |
commit | b975c0dc3be285655800180260c985bc97886f2e (patch) | |
tree | 94323163d71243400ed7c72f7d6cfb36b5cbb381 /gcc/analyzer/infinite-recursion.cc | |
parent | ba4c1f2bfc9ec063188b39d0281fae04c57b1416 (diff) | |
download | gcc-b975c0dc3be285655800180260c985bc97886f2e.zip gcc-b975c0dc3be285655800180260c985bc97886f2e.tar.gz gcc-b975c0dc3be285655800180260c985bc97886f2e.tar.bz2 |
MATCH: Improve zero_one_valued_p for cases without range information
I noticed we sometimes lose range information in forwprop due to a few
match and simplify patterns optimizing away casts. So the easier way
to these cases is to add a match for zero_one_valued_p wich mathes
a cast from another zero_one_valued_p.
This also adds the case of `x & zero_one_valued_p` as being zero_one_valued_p
which allows catching more cases too.
OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
gcc/ChangeLog:
* match.pd (zero_one_valued_p): Match a cast from a zero_one_valued_p.
Also match `a & zero_one_valued_p` too.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/bool-13.c: Update testcase as we now do
the MIN/MAX during forwprop1.
Diffstat (limited to 'gcc/analyzer/infinite-recursion.cc')
0 files changed, 0 insertions, 0 deletions