This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [1/10] Add tree_fits_shwi_p and tree_fits_uhwi_p
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Sandiford <rdsandiford at googlemail dot com>
- Date: Mon, 18 Nov 2013 11:59:49 +0100
- Subject: Re: [1/10] Add tree_fits_shwi_p and tree_fits_uhwi_p
- Authentication-results: sourceware.org; auth=none
- References: <87ppq0tsn4 dot fsf at talisman dot default> <87li0otsjc dot fsf at talisman dot default> <CAFiYyc0+rBY4P2+jT_y97R5-f81cqA7YOcpd-Mcv=0DnK4Pt+w at mail dot gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Nov 18, 2013 at 11:50:45AM +0100, Richard Biener wrote:
> On Sat, Nov 16, 2013 at 1:55 PM, Richard Sandiford
> <rdsandiford@googlemail.com> wrote:
> > Add tree_fits_shwi_p and tree_fits_uhwi_p. The implementations are taken
> > directly from host_integerp.
>
> tree_ is a bit generic - you only ever return true for INTEGER_CSTs,
> so please use int_fits_[su]hwi_p please (mimicing int_fits_type_p).
>
> Ok with that change.
I actually think tree_fits is better, int_fits* looks too ambiguous to me,
what kind of integer (tree, int, HWI, ...) you actually mean.
It also matches better say the preexisting tree_to_double_int.
Jakub