https://gcc.gnu.org/bugzilla/show_bug.cgi?id=129290
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- Note int_cst_value is supposed to be used in contexts where large unsigned values can be interpreted as signed, like for SCEV when evaluating an unsigned decreasing IV. It will in particular turn an unsigned char 255 into a -1 HOST_WIDE_INT value. It's name is not particularly off-putting for wrong use (nor is the predicate). There is a lack of tree_to_hwi () (aka TREE_INT_CST_LOW ()) that ensures tree_fits_shwi () || tree_fits_uhwi () (what cst_and_fits_in_hwi ensures). Some uses might need more thought and refactoring to preseve behavior (that might be wrong for 32bit targets).
