https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125385

--- Comment #1 from Drea Pinski <pinskia at gcc dot gnu.org> ---
A big hint here is range_fits_type_p.

And we should add a new method to format_helper which returns true if the ssa
fits the real format like there is can_represent_integral_type_p; maybe called
can_represent_integral_value_p.


The method pseducode of the function would be:
irange r = get_range_of (name);

int precision = significand_size (*this);
/* Signed types can allow for one more precision bit. */
if (!TYPE_UNSIGNED (TREE_TYPE (name)))
  precision++;
return range_fits_type_p (r, precision, TYPE_SIGNED (TREE_TYPE (name)));

Reply via email to