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. > > gcc/ > 2017-07-13 Richard Sandiford <[email protected]> > Alan Hayward <[email protected]> > David Sherwood <[email protected]> > > * 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.
jeff
