public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][ARM] NEON DImode not
@ 2012-02-29 15:24 Andrew Stubbs
  2012-02-29 20:03 ` Richard Earnshaw
  0 siblings, 1 reply; 10+ messages in thread
From: Andrew Stubbs @ 2012-02-29 15:24 UTC (permalink / raw)
  To: gcc-patches; +Cc: patches

[-- Attachment #1: Type: text/plain, Size: 459 bytes --]

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.

The patch adds a pattern to support VMVN in DImode (in addition to the 
vector modes already supported) and retains the support for doing 
bitwise not in core registers where appropriate.

OK for 4.8?

Andrew

[-- Attachment #2: neon-not64.patch --]
[-- Type: text/x-patch, Size: 2105 bytes --]

2012-02-29  Andrew Stubbs  <ams@codesourcery.com>

	gcc/
	* config/arm/arm.md (one_cmpldi2): Rename to one_cmpldi2_internal
	and replace with a new define_expand.
	(one_cmpldi2_internal): Exclude splitting for VFP registers.
	* config/arm/neon.md (one_cmpldi2_neon): New pattern.

---
 gcc/config/arm/arm.md  |   13 ++++++++++---
 gcc/config/arm/neon.md |   14 ++++++++++++++
 2 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 751997f..93fde58 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -4206,12 +4206,19 @@
   "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP_DOUBLE)"
   "")
 
-(define_insn_and_split "one_cmpldi2"
+(define_expand "one_cmpldi2"
+  [(set (match_operand:DI 0 "s_register_operand" "")
+	(not:DI (match_operand:DI 1 "s_register_operand" "")))]
+  "TARGET_32BIT"
+  "")
+
+(define_insn_and_split "*one_cmpldi2_internal"
   [(set (match_operand:DI 0 "s_register_operand" "=&r,&r")
 	(not:DI (match_operand:DI 1 "s_register_operand" "0,r")))]
-  "TARGET_32BIT"
+  "TARGET_32BIT && !TARGET_NEON"
   "#"
-  "TARGET_32BIT && reload_completed"
+  "TARGET_32BIT && reload_completed
+   && arm_general_register_operand (operands[0], DImode)"
   [(set (match_dup 0) (not:SI (match_dup 1)))
    (set (match_dup 2) (not:SI (match_dup 3)))]
   "
diff --git a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md
index d7caa37..f34d266 100644
--- a/gcc/config/arm/neon.md
+++ b/gcc/config/arm/neon.md
@@ -896,6 +896,20 @@
   [(set_attr "neon_type" "neon_int_1")]
 )
 
+(define_insn "*one_cmpldi2_neon"
+  [(set (match_operand:DI 0 "s_register_operand"	 "=w,?&r,?&r,?w")
+        (not:DI (match_operand:DI 1 "s_register_operand" " w,  0,  r, w")))]
+  "TARGET_NEON"
+  "@
+   vmvn\t%P0, %P1
+   #
+   #
+   vmvn\t%P0, %P1"
+  [(set_attr "neon_type" "neon_int_1,*,*,neon_int_1")
+   (set_attr "arch" "nota8,*,*,onlya8")
+   (set_attr "length" "*,8,8,*")]
+)
+
 (define_insn "abs<mode>2"
   [(set (match_operand:VDQW 0 "s_register_operand" "=w")
 	(abs:VDQW (match_operand:VDQW 1 "s_register_operand" "w")))]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH][ARM] NEON DImode not
  2012-02-29 15:24 [PATCH][ARM] NEON DImode not Andrew Stubbs
@ 2012-02-29 20:03 ` Richard Earnshaw
  2012-03-01 12:57   ` Andrew Stubbs
  0 siblings, 1 reply; 10+ messages in thread
From: Richard Earnshaw @ 2012-02-29 20:03 UTC (permalink / raw)
  To: Andrew Stubbs; +Cc: gcc-patches, patches

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.
> 
> The patch adds a pattern to support VMVN in DImode (in addition to the 
> vector modes already supported) and retains the support for doing 
> bitwise not in core registers where appropriate.
> 
> OK for 4.8?
> 
> Andrew
> 
> 
> neon-not64.patch
> 
> 
> 2012-02-29  Andrew Stubbs  <ams@codesourcery.com>
> 
> 	gcc/
> 	* config/arm/arm.md (one_cmpldi2): Rename to one_cmpldi2_internal
> 	and replace with a new define_expand.
> 	(one_cmpldi2_internal): Exclude splitting for VFP registers.
> 	* config/arm/neon.md (one_cmpldi2_neon): New pattern.
> 
> ---
>  gcc/config/arm/arm.md  |   13 ++++++++++---
>  gcc/config/arm/neon.md |   14 ++++++++++++++
>  2 files changed, 24 insertions(+), 3 deletions(-)
> 
> diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
> index 751997f..93fde58 100644
> --- a/gcc/config/arm/arm.md
> +++ b/gcc/config/arm/arm.md
> @@ -4206,12 +4206,19 @@
>    "TARGET_32BIT && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP_DOUBLE)"
>    "")
>  
> -(define_insn_and_split "one_cmpldi2"
> +(define_expand "one_cmpldi2"
> +  [(set (match_operand:DI 0 "s_register_operand" "")
> +	(not:DI (match_operand:DI 1 "s_register_operand" "")))]
> +  "TARGET_32BIT"
> +  "")
> +
> +(define_insn_and_split "*one_cmpldi2_internal"
>    [(set (match_operand:DI 0 "s_register_operand" "=&r,&r")
>  	(not:DI (match_operand:DI 1 "s_register_operand" "0,r")))]
> -  "TARGET_32BIT"
> +  "TARGET_32BIT && !TARGET_NEON"
>    "#"
> -  "TARGET_32BIT && reload_completed"
> +  "TARGET_32BIT && reload_completed
> +   && arm_general_register_operand (operands[0], DImode)"
>    [(set (match_dup 0) (not:SI (match_dup 1)))
>     (set (match_dup 2) (not:SI (match_dup 3)))]
>    "
> diff --git a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md
> index d7caa37..f34d266 100644
> --- a/gcc/config/arm/neon.md
> +++ b/gcc/config/arm/neon.md
> @@ -896,6 +896,20 @@
>    [(set_attr "neon_type" "neon_int_1")]
>  )
>  
> +(define_insn "*one_cmpldi2_neon"
> +  [(set (match_operand:DI 0 "s_register_operand"	 "=w,?&r,?&r,?w")
> +        (not:DI (match_operand:DI 1 "s_register_operand" " w,  0,  r, w")))]
> +  "TARGET_NEON"
> +  "@
> +   vmvn\t%P0, %P1
> +   #
> +   #
> +   vmvn\t%P0, %P1"
> +  [(set_attr "neon_type" "neon_int_1,*,*,neon_int_1")
> +   (set_attr "arch" "nota8,*,*,onlya8")
> +   (set_attr "length" "*,8,8,*")]
> +)
> +
>  (define_insn "abs<mode>2"
>    [(set (match_operand:VDQW 0 "s_register_operand" "=w")
>  	(abs:VDQW (match_operand:VDQW 1 "s_register_operand" "w")))]


Why can't we have a single insn that deals with the have-neon and
dont-have-neon cases?

R.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH][ARM] NEON DImode not
  2012-02-29 20:03 ` Richard Earnshaw
@ 2012-03-01 12:57   ` Andrew Stubbs
  2012-03-01 17:07     ` Richard Earnshaw
  0 siblings, 1 reply; 10+ messages in thread
From: Andrew Stubbs @ 2012-03-01 12:57 UTC (permalink / raw)
  To: Richard Earnshaw; +Cc: gcc-patches, patches

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 gen_one_cmpldi2 
locking recog to a disabled pattern (it caches the recog result, I think).

It would be possible to have the arm.md insn emit NEON instructions, but 
that's not the usual practice, I think? The neon.md isns could also emit 
arm/thumb2 instructions, but there's no real point since there are 
already two different splitters for that.

Andrew

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH][ARM] NEON DImode not
  2012-03-01 12:57   ` Andrew Stubbs
@ 2012-03-01 17:07     ` Richard Earnshaw
  2012-03-08 16:19       ` Andrew Stubbs
  0 siblings, 1 reply; 10+ messages in thread
From: Richard Earnshaw @ 2012-03-01 17:07 UTC (permalink / raw)
  To: Andrew Stubbs; +Cc: gcc-patches, patches

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 
> don't-have-neon. The expander is necessary to prevent gen_one_cmpldi2 
> locking recog to a disabled pattern (it caches the recog result, I think).
> 
> It would be possible to have the arm.md insn emit NEON instructions, but 
> that's not the usual practice, I think? The neon.md isns could also emit 
> arm/thumb2 instructions, but there's no real point since there are 
> already two different splitters for that.
> 
> Andrew
> 
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 rather than having multiple patterns.

You're already half doing this with the nota8 and onlya8 controls.

R.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH][ARM] NEON DImode not
  2012-03-01 17:07     ` Richard Earnshaw
@ 2012-03-08 16:19       ` Andrew Stubbs
  2012-03-08 18:03         ` Richard Henderson
  0 siblings, 1 reply; 10+ messages in thread
From: Andrew Stubbs @ 2012-03-08 16:19 UTC (permalink / raw)
  To: Richard Earnshaw; +Cc: gcc-patches, patches

[-- Attachment #1: Type: text/plain, Size: 914 bytes --]

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 rather than having multiple patterns.
>
> You're already half doing this with the nota8 and onlya8 controls.

Ok, this patch unifies the two and emits the NEON instructions directly 
from the arm.md pattern. I was under the impression that it is desirable 
to keep the neon stuff in neon.md as far as possible.

OK?

Andrew

P.S. The insn_enabled code is not ideal, but the 'arch' attribute that 
might normally deal with this is already in use. Alternative ways might 
be to have a variation on the 'w' constraint ('W'?) that is conditional 
on TARGET_NEON, or to have compound arch values (e.g. "onlya8_neon")?


[-- Attachment #2: neon-not64.patch --]
[-- Type: text/x-patch, Size: 1697 bytes --]

2012-03-08  Andrew Stubbs  <ams@codesourcery.com>

	gcc/
	* config/arm/arm.md (one_cmpldi2): Add NEON support.

---
 gcc/config/arm/arm.md |   26 ++++++++++++++++++++------
 1 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 751997f..27a0f81 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -4207,11 +4207,16 @@
   "")
 
 (define_insn_and_split "one_cmpldi2"
-  [(set (match_operand:DI 0 "s_register_operand" "=&r,&r")
-	(not:DI (match_operand:DI 1 "s_register_operand" "0,r")))]
+  [(set (match_operand:DI 0 "s_register_operand"	 "=w,&r,&r,?w")
+	(not:DI (match_operand:DI 1 "s_register_operand" " w, 0, r, w")))]
   "TARGET_32BIT"
-  "#"
-  "TARGET_32BIT && reload_completed"
+  "@
+   vmvn\t%P0, %P1
+   #
+   #
+   vmvn\t%P0, %P1"
+  "TARGET_32BIT && reload_completed
+   && arm_general_register_operand (operands[0], DImode)"
   [(set (match_dup 0) (not:SI (match_dup 1)))
    (set (match_dup 2) (not:SI (match_dup 3)))]
   "
@@ -4221,8 +4226,17 @@
     operands[3] = gen_highpart (SImode, operands[1]);
     operands[1] = gen_lowpart (SImode, operands[1]);
   }"
-  [(set_attr "length" "8")
-   (set_attr "predicable" "yes")]
+  [(set_attr "length" "*,8,8,*")
+   (set_attr "predicable" "yes")
+   (set_attr "neon_type" "neon_int_1,*,*,neon_int_1")
+   (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")
+	 (if_then_else (match_test "TARGET_NEON")
+		       (const_string "yes") (const_string "no"))])]
 )
 
 (define_expand "one_cmplsi2"

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH][ARM] NEON DImode not
  2012-03-08 16:19       ` Andrew Stubbs
@ 2012-03-08 18:03         ` Richard Henderson
  2012-03-27 20:24           ` Andrew Stubbs
  0 siblings, 1 reply; 10+ messages in thread
From: Richard Henderson @ 2012-03-08 18:03 UTC (permalink / raw)
  To: Andrew Stubbs; +Cc: Richard Earnshaw, gcc-patches, patches

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")
> +	 (if_then_else (match_test "TARGET_NEON")
> +		       (const_string "yes") (const_string "no"))])]
>  )

While this works, it might be better to add neon/neon_na8/neon_oa8
alternatives to the arch attribute, and adjust arch_enabled to match.

Obviously this opinion is non-binding; Richard E might have other plans...


r~

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH][ARM] NEON DImode not
  2012-03-08 18:03         ` Richard Henderson
@ 2012-03-27 20:24           ` Andrew Stubbs
  2012-03-27 20:43             ` Richard Henderson
  2012-03-28 13:37             ` Ramana Radhakrishnan
  0 siblings, 2 replies; 10+ messages in thread
From: Andrew Stubbs @ 2012-03-27 20:24 UTC (permalink / raw)
  To: Richard Henderson; +Cc: Richard Earnshaw, gcc-patches, patches

[-- Attachment #1: Type: text/plain, Size: 736 bytes --]

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 "yes")
>> +	 (const_string "yes")
>> +	 (if_then_else (match_test "TARGET_NEON")
>> +		       (const_string "yes") (const_string "no"))])]
>>   )
>
> While this works, it might be better to add neon/neon_na8/neon_oa8
> alternatives to the arch attribute, and adjust arch_enabled to match.
>
> Obviously this opinion is non-binding; Richard E might have other plans...

No reply from Richard so far ... so here's an update.

OK now?

Andrew

[-- Attachment #2: neon-not64.patch --]
[-- Type: text/x-patch, Size: 2302 bytes --]

2012-03-27  Andrew Stubbs  <ams@codesourcery.com>

	gcc/
	* config/arm/arm.md (arch): Add neon_onlya8 and neon_nota8.
	(arch_enabled): Handle new arch types.
	(one_cmpldi2): Add NEON support.

diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 751997f..6669329 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -207,7 +207,7 @@
 ; for ARM or Thumb-2 with arm_arch6, and nov6 for ARM without
 ; arm_arch6.  This attribute is used to compute attribute "enabled",
 ; use type "any" to enable an alternative in all cases.
-(define_attr "arch" "any,a,t,32,t1,t2,v6,nov6,onlya8,nota8"
+(define_attr "arch" "any,a,t,32,t1,t2,v6,nov6,onlya8,neon_onlya8,nota8,neon_nota8"
   (const_string "any"))
 
 (define_attr "arch_enabled" "no,yes"
@@ -246,8 +246,18 @@
 	      (eq_attr "tune" "cortexa8"))
 	 (const_string "yes")
 
+	 (and (eq_attr "arch" "neon_onlya8")
+	      (eq_attr "tune" "cortexa8")
+	      (match_test "TARGET_NEON"))
+	 (const_string "yes")
+
 	 (and (eq_attr "arch" "nota8")
 	      (not (eq_attr "tune" "cortexa8")))
+	 (const_string "yes")
+
+	 (and (eq_attr "arch" "neon_nota8")
+	      (not (eq_attr "tune" "cortexa8"))
+	      (match_test "TARGET_NEON"))
 	 (const_string "yes")]
 	(const_string "no")))
 
@@ -4207,11 +4217,16 @@
   "")
 
 (define_insn_and_split "one_cmpldi2"
-  [(set (match_operand:DI 0 "s_register_operand" "=&r,&r")
-	(not:DI (match_operand:DI 1 "s_register_operand" "0,r")))]
+  [(set (match_operand:DI 0 "s_register_operand"	 "=w,&r,&r,?w")
+	(not:DI (match_operand:DI 1 "s_register_operand" " w, 0, r, w")))]
   "TARGET_32BIT"
-  "#"
-  "TARGET_32BIT && reload_completed"
+  "@
+   vmvn\t%P0, %P1
+   #
+   #
+   vmvn\t%P0, %P1"
+  "TARGET_32BIT && reload_completed
+   && arm_general_register_operand (operands[0], DImode)"
   [(set (match_dup 0) (not:SI (match_dup 1)))
    (set (match_dup 2) (not:SI (match_dup 3)))]
   "
@@ -4221,8 +4236,10 @@
     operands[3] = gen_highpart (SImode, operands[1]);
     operands[1] = gen_lowpart (SImode, operands[1]);
   }"
-  [(set_attr "length" "8")
-   (set_attr "predicable" "yes")]
+  [(set_attr "length" "*,8,8,*")
+   (set_attr "predicable" "yes")
+   (set_attr "neon_type" "neon_int_1,*,*,neon_int_1")
+   (set_attr "arch" "neon_nota8,*,*,neon_onlya8")]
 )
 
 (define_expand "one_cmplsi2"

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH][ARM] NEON DImode not
  2012-03-27 20:24           ` Andrew Stubbs
@ 2012-03-27 20:43             ` Richard Henderson
  2012-03-28 13:37             ` Ramana Radhakrishnan
  1 sibling, 0 replies; 10+ messages in thread
From: Richard Henderson @ 2012-03-27 20:43 UTC (permalink / raw)
  To: Andrew Stubbs; +Cc: Richard Earnshaw, gcc-patches, patches

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~

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH][ARM] NEON DImode not
  2012-03-27 20:24           ` Andrew Stubbs
  2012-03-27 20:43             ` Richard Henderson
@ 2012-03-28 13:37             ` Ramana Radhakrishnan
  2012-04-05 14:47               ` Andrew Stubbs
  1 sibling, 1 reply; 10+ messages in thread
From: Ramana Radhakrishnan @ 2012-03-28 13:37 UTC (permalink / raw)
  To: Andrew Stubbs; +Cc: Richard Henderson, Richard Earnshaw, gcc-patches, patches

On 27 March 2012 21:23, Andrew Stubbs <ams@codesourcery.com> wrote:
> 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 "yes")
>>> +        (const_string "yes")
>>> +        (if_then_else (match_test "TARGET_NEON")
>>> +                      (const_string "yes") (const_string "no"))])]
>>>  )
>>
>>
>> While this works, it might be better to add neon/neon_na8/neon_oa8
>> alternatives to the arch attribute, and adjust arch_enabled to match.
>>
>> Obviously this opinion is non-binding; Richard E might have other plans...
>
>
> No reply from Richard so far ... so here's an update.
>
> OK now?

OK if no regressions.

Ramana

>
> Andrew

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH][ARM] NEON DImode not
  2012-03-28 13:37             ` Ramana Radhakrishnan
@ 2012-04-05 14:47               ` Andrew Stubbs
  0 siblings, 0 replies; 10+ messages in thread
From: Andrew Stubbs @ 2012-04-05 14:47 UTC (permalink / raw)
  To: Ramana Radhakrishnan
  Cc: Richard Henderson, Richard Earnshaw, gcc-patches, patches

[-- Attachment #1: Type: text/plain, Size: 205 bytes --]

On 28/03/12 14:37, Ramana Radhakrishnan wrote:
> OK if no regressions.

There was a small problem with VMVN being not actually predicable. I've 
made the obvious change and committed the attached.

Andrew

[-- Attachment #2: neon-not64.patch --]
[-- Type: text/x-patch, Size: 2312 bytes --]

2012-04-05  Andrew Stubbs  <ams@codesourcery.com>

	gcc/
	* config/arm/arm.md (arch): Add neon_onlya8 and neon_nota8.
	(arch_enabled): Handle new arch types.
	(one_cmpldi2): Add NEON support.

diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 751997f..383c585 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -207,7 +207,7 @@
 ; for ARM or Thumb-2 with arm_arch6, and nov6 for ARM without
 ; arm_arch6.  This attribute is used to compute attribute "enabled",
 ; use type "any" to enable an alternative in all cases.
-(define_attr "arch" "any,a,t,32,t1,t2,v6,nov6,onlya8,nota8"
+(define_attr "arch" "any,a,t,32,t1,t2,v6,nov6,onlya8,neon_onlya8,nota8,neon_nota8"
   (const_string "any"))
 
 (define_attr "arch_enabled" "no,yes"
@@ -246,8 +246,18 @@
 	      (eq_attr "tune" "cortexa8"))
 	 (const_string "yes")
 
+	 (and (eq_attr "arch" "neon_onlya8")
+	      (eq_attr "tune" "cortexa8")
+	      (match_test "TARGET_NEON"))
+	 (const_string "yes")
+
 	 (and (eq_attr "arch" "nota8")
 	      (not (eq_attr "tune" "cortexa8")))
+	 (const_string "yes")
+
+	 (and (eq_attr "arch" "neon_nota8")
+	      (not (eq_attr "tune" "cortexa8"))
+	      (match_test "TARGET_NEON"))
 	 (const_string "yes")]
 	(const_string "no")))
 
@@ -4207,11 +4217,16 @@
   "")
 
 (define_insn_and_split "one_cmpldi2"
-  [(set (match_operand:DI 0 "s_register_operand" "=&r,&r")
-	(not:DI (match_operand:DI 1 "s_register_operand" "0,r")))]
+  [(set (match_operand:DI 0 "s_register_operand"	 "=w,&r,&r,?w")
+	(not:DI (match_operand:DI 1 "s_register_operand" " w, 0, r, w")))]
   "TARGET_32BIT"
-  "#"
-  "TARGET_32BIT && reload_completed"
+  "@
+   vmvn\t%P0, %P1
+   #
+   #
+   vmvn\t%P0, %P1"
+  "TARGET_32BIT && reload_completed
+   && arm_general_register_operand (operands[0], DImode)"
   [(set (match_dup 0) (not:SI (match_dup 1)))
    (set (match_dup 2) (not:SI (match_dup 3)))]
   "
@@ -4221,8 +4236,10 @@
     operands[3] = gen_highpart (SImode, operands[1]);
     operands[1] = gen_lowpart (SImode, operands[1]);
   }"
-  [(set_attr "length" "8")
-   (set_attr "predicable" "yes")]
+  [(set_attr "length" "*,8,8,*")
+   (set_attr "predicable" "no,yes,yes,no")
+   (set_attr "neon_type" "neon_int_1,*,*,neon_int_1")
+   (set_attr "arch" "neon_nota8,*,*,neon_onlya8")]
 )
 
 (define_expand "one_cmplsi2"

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-04-05 14:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-29 15:24 [PATCH][ARM] NEON DImode not Andrew Stubbs
2012-02-29 20:03 ` Richard Earnshaw
2012-03-01 12:57   ` Andrew Stubbs
2012-03-01 17:07     ` Richard Earnshaw
2012-03-08 16:19       ` Andrew Stubbs
2012-03-08 18:03         ` Richard Henderson
2012-03-27 20:24           ` Andrew Stubbs
2012-03-27 20:43             ` Richard Henderson
2012-03-28 13:37             ` Ramana Radhakrishnan
2012-04-05 14:47               ` Andrew Stubbs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).