This is the mail archive of the
mailing list for the GCC project.
Re: [47/77] Make subroutines of nonzero_bits operate on scalar_int_mode
- From: Jeff Law <law at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, richard dot sandiford at linaro dot org
- Date: Thu, 24 Aug 2017 00:17:26 -0600
- Subject: Re: [47/77] Make subroutines of nonzero_bits operate on scalar_int_mode
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=law at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2B8BF356D0
- References: <email@example.com> <firstname.lastname@example.org>
On 07/13/2017 02:55 AM, Richard Sandiford wrote:
> nonzero_bits1 assumed that all bits of a floating-point or vector mode
> were needed. It seems likely that fixed-point modes should have been
> handled in the same way. After excluding those, the only remaining
> modes that are likely to be useful are scalar integer ones.
> This patch moves the mode class check to nonzero_bits itself, along
> with the handling of mode == VOIDmode. The subroutines of nonzero_bits
> can then take scalar_int_modes.
> 2017-07-13 Richard Sandiford <email@example.com>
> Alan Hayward <firstname.lastname@example.org>
> David Sherwood <email@example.com>
> * rtlanal.c (nonzero_bits): Handle VOIDmode here rather than
> in subroutines. Return the mode mask for non-integer modes.
> (cached_nonzero_bits): Change the type of the mode parameter
> to scalar_int_mode.
> (nonzero_bits1): Likewise. Remove early exit for other mode
> classes. Handle CONST_INT_P first and then check whether X
> also has a scalar integer mode.
OK. I suspect not handling fixed-point modes like floating point modes
was just an oversight.