[PR tree-optimization/123530] Fix ICE in recently added match.pd pattern
The gimple optimization passes can create negative shift counts and pass them
into the simplification routines as seen by the code in pr123530. If we then
call tree_to_uhwi on those values we get a nice little ICE.
This guards the tree_to_uhwi calls on tree_fits_uhwi_p and resolves the ICE. I
just protected them all in this recently added pattern.
Bootstrapped and regression tested on x86 and riscv. Also tested on the rest
of the embedded targets without any regressions.
Pushing to the trunk.
PR tree-optimization/123530
gcc/
* match.pd (reassociating xor to enable rotations): Verify constants
fit into a uhwi before trying to extract them as a uhwi.
gcc/testsuite/
* gcc.dg/torture/pr123530.c: New test.