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.