Re: [PATCH][ARM] NEON DImode immediate constants

2012-04-30 Thread Andrew Stubbs
On 27/04/12 16:17, Richard Earnshaw wrote: This is OK. Thanks, now committed. It would be good to merge all the target32 movdi variants into one pattern and then use alternative enabling to deal with the different valid alternatives. Yes, I'll take a look. Andrew

Re: [PATCH][ARM] NEON DImode neg

2012-04-30 Thread Andrew Stubbs
On 16/04/12 13:41, Richard Earnshaw wrote: P.S. This patch can't actually be committed until my NEON DImode immediate constants patch is approved and committed. (Without that the load #0 needs a constant pool, and loading constants this late has a bug at -O0.) neon-neg64.patch 2012-04-12

Re: [PATCH][ARM] NEON DImode immediate constants

2012-04-27 Thread Andrew Stubbs
Ping. On 10/04/12 14:00, Andrew Stubbs wrote: Ping. On 30/03/12 12:15, Andrew Stubbs wrote: On 28/02/12 16:20, Andrew Stubbs wrote: Hi all, This patch implements 64-bit immediate constant loads in NEON. The current state is that you can load const_vector, but not const_int. This is clearly

Re: [PATCH][ARM] NEON DImode immediate constants

2012-04-27 Thread Richard Earnshaw
On 30/03/12 12:15, Andrew Stubbs wrote: On 28/02/12 16:20, Andrew Stubbs wrote: Hi all, This patch implements 64-bit immediate constant loads in NEON. The current state is that you can load const_vector, but not const_int. This is clearly not ideal. The result is a constant pool entry when

Re: [PATCH][ARM] NEON DImode neg

2012-04-16 Thread Richard Earnshaw
On 14/04/12 14:11, Andrew Stubbs wrote: And now with the patch. :( On 14/04/12 13:48, Andrew Stubbs wrote: On 12/04/12 16:48, Richard Earnshaw wrote: If negation in Neon needs a scratch register, it seems to me to be somewhat odd that we're disparaging the ARM version. Also, wouldn't it

Re: [PATCH][ARM] NEON DImode neg

2012-04-14 Thread Andrew Stubbs
On 12/04/12 16:48, Richard Earnshaw wrote: If negation in Neon needs a scratch register, it seems to me to be somewhat odd that we're disparaging the ARM version. Also, wouldn't it be sensible to support a variant that was early-clobber on operand 0, but loaded immediate zero into that value

Re: [PATCH][ARM] NEON DImode neg

2012-04-14 Thread Andrew Stubbs
And now with the patch. :( On 14/04/12 13:48, Andrew Stubbs wrote: On 12/04/12 16:48, Richard Earnshaw wrote: If negation in Neon needs a scratch register, it seems to me to be somewhat odd that we're disparaging the ARM version. Also, wouldn't it be sensible to support a variant that was

Re: [PATCH][ARM] NEON DImode neg

2012-04-12 Thread Andrew Stubbs
Ping. On 26/03/12 11:14, Andrew Stubbs wrote: On 28/02/12 17:45, Andrew Stubbs wrote: Hi all, This patch adds a DImode negate pattern for NEON. Unfortunately, the NEON vneg instruction only supports vectors, not singletons, so there's no direct way to do it in DImode, and the compiler ends

Re: [PATCH][ARM] NEON DImode neg

2012-04-12 Thread Richard Earnshaw
On 26/03/12 11:14, Andrew Stubbs wrote: On 28/02/12 17:45, Andrew Stubbs wrote: Hi all, This patch adds a DImode negate pattern for NEON. Unfortunately, the NEON vneg instruction only supports vectors, not singletons, so there's no direct way to do it in DImode, and the compiler ends up

Re: [PATCH][ARM] NEON DImode neg

2012-04-12 Thread Andrew Stubbs
On 12/04/12 16:48, Richard Earnshaw wrote: If negation in Neon needs a scratch register, it seems to me to be somewhat odd that we're disparaging the ARM version. Good point, I'm really meaning to provide missing functionality in NEON to prevent unnecessary moves, rather than cause them, so I

Re: [PATCH][ARM] NEON DImode neg

2012-04-12 Thread Richard Earnshaw
On 12/04/12 17:16, Andrew Stubbs wrote: On 12/04/12 16:48, Richard Earnshaw wrote: If negation in Neon needs a scratch register, it seems to me to be somewhat odd that we're disparaging the ARM version. Good point, I'm really meaning to provide missing functionality in NEON to prevent

Re: [PATCH][ARM] NEON DImode immediate constants

2012-04-10 Thread Andrew Stubbs
Ping. On 30/03/12 12:15, Andrew Stubbs wrote: On 28/02/12 16:20, Andrew Stubbs wrote: Hi all, This patch implements 64-bit immediate constant loads in NEON. The current state is that you can load const_vector, but not const_int. This is clearly not ideal. The result is a constant pool entry

Re: [PATCH][ARM] NEON DImode immediate constants

2012-03-30 Thread Andrew Stubbs
On 28/02/12 16:20, Andrew Stubbs wrote: Hi all, This patch implements 64-bit immediate constant loads in NEON. The current state is that you can load const_vector, but not const_int. This is clearly not ideal. The result is a constant pool entry when it's not necessary. The patch disables the

Re: [PATCH][ARM] NEON DImode not

2012-03-27 Thread Andrew Stubbs
On 08/03/12 18:03, Richard Henderson wrote: On 03/08/12 08:19, Andrew Stubbs wrote: + (set_attr arch nota8,*,*,onlya8) + (set_attr_alternative insn_enabled + [(if_then_else (match_test TARGET_NEON) + (const_string yes) (const_string no)) +(const_string

Re: [PATCH][ARM] NEON DImode not

2012-03-27 Thread Richard Henderson
On 03/27/12 13:23, Andrew Stubbs wrote: gcc/ * config/arm/arm.md (arch): Add neon_onlya8 and neon_nota8. (arch_enabled): Handle new arch types. (one_cmpldi2): Add NEON support. Looks good to me. r~

Re: [PATCH][ARM] NEON DImode neg

2012-03-26 Thread Andrew Stubbs
On 28/02/12 17:45, Andrew Stubbs wrote: Hi all, This patch adds a DImode negate pattern for NEON. Unfortunately, the NEON vneg instruction only supports vectors, not singletons, so there's no direct way to do it in DImode, and the compiler ends up moving the value back to core registers,

Re: [PATCH][ARM] NEON DImode not

2012-03-08 Thread Andrew Stubbs
On 01/03/12 17:07, Richard Earnshaw wrote: The RTL part of one_cmpldi2_internal and one_cmpldi2_neon are the same. Given that we now have controls to determine when an alternative is enabled it's generally better to have just one pattern here and turn on the alternatives that are suitable

Re: [PATCH][ARM] NEON DImode not

2012-03-08 Thread Richard Henderson
On 03/08/12 08:19, Andrew Stubbs wrote: + (set_attr arch nota8,*,*,onlya8) + (set_attr_alternative insn_enabled + [(if_then_else (match_test TARGET_NEON) +(const_string yes) (const_string no)) + (const_string yes) + (const_string yes) +

Re: [PATCH][ARM] NEON DImode not

2012-03-01 Thread Andrew Stubbs
On Wed 29 Feb 2012 18:00:19 GMT, Richard Earnshaw wrote: Why can't we have a single insn that deals with the have-neon and dont-have-neon cases? Sorry, I'm not sure I follow? There's one insn for the have-neon case, and one for the don't-have-neon. The expander is necessary to prevent

Re: [PATCH][ARM] NEON DImode not

2012-03-01 Thread Richard Earnshaw
On 01/03/12 12:57, Andrew Stubbs wrote: On Wed 29 Feb 2012 18:00:19 GMT, Richard Earnshaw wrote: Why can't we have a single insn that deals with the have-neon and dont-have-neon cases? Sorry, I'm not sure I follow? There's one insn for the have-neon case, and one for the

Re: [PATCH][ARM] NEON DImode neg

2012-02-29 Thread Andrew Stubbs
On 28/02/12 17:45, Andrew Stubbs wrote: This patch adds a DImode negate pattern for NEON. Oops, that patch completely failed to allow for the fallback to instructions that work in core registers. It also forgot to mention that the CC register was clobbered. This patch is the same except

Re: [PATCH][ARM] NEON DImode not

2012-02-29 Thread Richard Earnshaw
On 29/02/12 14:48, Andrew Stubbs wrote: Hi all, This patch adds support for the DImode not operation in NEON. Currently the compiler must move the value to core registers, invert it there, and move it back again. This is bonkers because the VMVN instruction will do the job perfectly.