Fix tree-optimization/103220: Another missing folding of (type) X op CST where type is a nop convert
The problem here is that int_fits_type_p will return false if we just
change the sign of things like -2 (or 254) so we should accept the case
where we just change the sign (and not the precision) of the type.
OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
PR tree-optimization/103220
gcc/ChangeLog:
* match.pd ((type) X bitop CST): Don't check if CST
fits into the type if only the sign changes.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/pr103220-1.c: New test.
* gcc.dg/tree-ssa/pr103220-2.c: New test.
* gcc.dg/pr25530.c: Update test to check for
4294967294 in the case -2 is not matched.