Don't simplify (A & C) != 0 ? D : 0 for pointer types.
While rewriting part of PHI-OPT to use match-and-simplify,
I ran into a bug where this pattern in match.pd would hit
and would produce invalid gimple; a shift of a pointer type.
This just disables this simplification for pointer types similarly
to what is already done in PHI-OPT for the generic A ? D : 0 case.
OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
Thanks,
Andrew Pinski
2021-5-23 Andrew Pinski <apinski@marvell.com>
gcc/
* match.pd ((A & C) != 0 ? D : 0): Limit to non pointer types.
gcc/testsuite/
* gcc.dg/gimplefe-45.c: New test.