This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [SPARC] Simplify const_all_ones_operand
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Richard Sandiford <richard dot sandiford at arm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 12 Sep 2015 10:29:07 +0200
- Subject: Re: [SPARC] Simplify const_all_ones_operand
- Authentication-results: sourceware.org; auth=none
- References: <87d1yi9rn9 dot fsf at e105548-lin dot cambridge dot arm dot com>
[Sorry for the delay]
> gen_rtx_CONST_VECTOR ensures that there is a single instance of:
>
> (const_vector:M [(const_int -1) ... (const_int -1)])
>
> for each M, so pointer equality with CONSTM1_RTX is enough. Also,
> HOST_BITS_PER_WIDE_INT == 32 is doubly dead: HOST_WIDE_INT is always
> 64 bits now, and we always use const_int rather than const_double
> or const_wide_int for all-ones values (or any other value that
> fits in a signed HOST_WIDE_INT).
>
> This seemed like a better fix than using the helper functions
> that I'm about to post.
>
> Tested with a cross-compiler and ensured that the predicate was
> still accepting all (-)1 values. OK to install?
>
> Thanks,
> Richard
>
> gcc/
> * config/sparc/predicates.md (const_all_ones_operand): Use
> CONSTM1_RTX to simplify definition.
OK, thanks.
--
Eric Botcazou