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

--- Comment #11 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #10)
> The TREE_INT_CST_LOW part looks suspicious.  Also, wide-int.h should provide
> enough infrastructure so that you should be able to do everything on
> wide-int, not have to create trees.

I just saw this comment now.  I think that the TREE_INT_CST_LOW is ok given
that we've already constrained bump to fit in a HOST_WIDE_INT, right?  But
anyway, your second point is well taken -- it looks like I can make use of
wi::to_uhwi and wi::to_shwi with a specified precision from the target type, so
use of trees should indeed be unnecessary.

I have a working patch that uses the trees, but I will rework that in favor of
a pure wide-int solution.  Thanks for the suggestion!

Bill

Reply via email to