public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [PATCH][AArch64] Replace insn to zero up DF register
@ 2016-01-22 13:52 Wilco Dijkstra
  2016-01-27 23:14 ` Evandro Menezes
  0 siblings, 1 reply; 27+ messages in thread
From: Wilco Dijkstra @ 2016-01-22 13:52 UTC (permalink / raw)
  To: Evandro Menezes
  Cc: gcc-patches, nd, Marcus Shawcroft, Kyrylo Tkachov, James Greenhalgh

On 12/16/2015 03:30 PM, Evandro Menezes wrote:
>
>    On 10/30/2015 05:24 AM, Marcus Shawcroft wrote:
>
>        On 20 October 2015 at 00:40, Evandro Menezes <e.menezes@samsung.com> wrote:
>
>            In the existing targets, it seems that it's always faster to zero up a DF
>
>            register with "movi %d0, #0" instead of "fmov %d0, xzr".
>
>            This patch modifies the respective pattern.
>
>
>        Hi Evandro,
>
>        This patch changes the generic, u architecture independent instruction
>        selection. The ARM ARM (C3.5.3) makes a specific recommendation about
>        the choice of instruction in this situation and the current
>        implementation in GCC follows that recommendation.  Wilco has also
>        picked up on this issue he has the same patch internal to ARM along
>        with an ongoing discussion with ARM architecture folk regarding this
>        recommendation.  I'm reluctant to take this patch right now on the
>        basis that it runs contrary to ARM ARM recommendation pending the
>        conclusion of Wilco's discussion with ARM architecture folk.
>
>
>    Have you had a chance to discuss this internally further?

Yes, it was decided to remove the recommendation from future ARM ARM's.

Several review comments on your patch (https://patchwork.ozlabs.org/patch/532736):

* This should be added to movhf, movsf and movdf - movtf already does this.
* It is important to set the "fp" and "simd" attributes so that the movi variant can
   only be selected if it is available.

Cheers,
Wilco

^ permalink raw reply	[flat|nested] 27+ messages in thread
* [PATCH][AArch64] Replace insn to zero up DF register
@ 2015-10-19 23:41 Evandro Menezes
  2015-10-19 23:52 ` Andrew Pinski
  2015-10-30 10:26 ` Marcus Shawcroft
  0 siblings, 2 replies; 27+ messages in thread
From: Evandro Menezes @ 2015-10-19 23:41 UTC (permalink / raw)
  To: gcc-patches; +Cc: Marcus.Shawcroft, kyrylo.tkachov

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

In the existing targets, it seems that it's always faster to zero up a 
DF register with "movi %d0, #0" instead of "fmov %d0, xzr".

This patch modifies the respective pattern.

Please, commit if it's alright.

Thank you,

-- 
Evandro Menezes


[-- Attachment #2: 0001-AArch64-Replace-insn-to-zero-up-DF-register.patch --]
[-- Type: text/x-patch, Size: 1468 bytes --]

From 429b1d70a7eca76c96250fec6ec5269a7a661a4c Mon Sep 17 00:00:00 2001
From: Evandro Menezes <e.menezes@samsung.com>
Date: Mon, 19 Oct 2015 18:31:48 -0500
Subject: [PATCH] [AArch64] Replace insn to zero up DF register

gcc/
	* config/aarch64/aarch64.md
	(*movdf_aarch64): Add "movi %d0, #0" to zero up DF register.
---
 gcc/config/aarch64/aarch64.md | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index 5b7f2fd..5f00686 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -1156,21 +1156,22 @@
 )
 
 (define_insn "*movdf_aarch64"
-  [(set (match_operand:DF 0 "nonimmediate_operand" "=w, ?r,w,w  ,w,m,r,m ,r")
-	(match_operand:DF 1 "general_operand"      "?rY, w,w,Ufc,m,w,m,rY,r"))]
+  [(set (match_operand:DF 0 "nonimmediate_operand" "=w,?r,w,w,w  ,w,m,r,m ,r")
+	(match_operand:DF 1 "general_operand"      "?r, w,w,Y,Ufc,m,w,m,rY,r"))]
   "TARGET_FLOAT && (register_operand (operands[0], DFmode)
     || aarch64_reg_or_fp_zero (operands[1], DFmode))"
   "@
    fmov\\t%d0, %x1
    fmov\\t%x0, %d1
    fmov\\t%d0, %d1
+   movi\\t%d0, #0
    fmov\\t%d0, %1
    ldr\\t%d0, %1
    str\\t%d1, %0
    ldr\\t%x0, %1
    str\\t%x1, %0
    mov\\t%x0, %x1"
-  [(set_attr "type" "f_mcr,f_mrc,fmov,fconstd,\
+  [(set_attr "type" "f_mcr,f_mrc,fmov,neon_move,fconstd,\
                      f_loadd,f_stored,load1,store1,mov_reg")]
 )
 
-- 
2.1.0.243.g30d45f7


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

end of thread, other threads:[~2016-04-27 19:55 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-22 13:52 [PATCH][AArch64] Replace insn to zero up DF register Wilco Dijkstra
2016-01-27 23:14 ` Evandro Menezes
2016-02-26 12:37   ` Wilco Dijkstra
2016-02-26 22:43     ` Evandro Menezes
2016-02-29 18:07       ` Wilco Dijkstra
2016-02-29 23:11         ` Evandro Menezes
2016-03-01 19:02           ` Wilco Dijkstra
2016-03-01 19:08             ` Evandro Menezes
2016-03-09 21:36               ` Evandro Menezes
2016-03-10 13:23                 ` James Greenhalgh
2016-03-10 16:27                   ` Evandro Menezes
2016-03-10 16:32                     ` Evandro Menezes
2016-03-10 16:37                       ` James Greenhalgh
2016-04-25 19:20                         ` [PATCH][AArch64] Replace insn to zero up SIMD registers Evandro Menezes
2016-04-26 13:25                           ` Wilco Dijkstra
2016-04-27 19:55                             ` Evandro Menezes
  -- strict thread matches above, loose matches on Subject: below --
2015-10-19 23:41 [PATCH][AArch64] Replace insn to zero up DF register Evandro Menezes
2015-10-19 23:52 ` Andrew Pinski
2015-10-20  0:33   ` Andrew Pinski
2015-10-20 14:46     ` Andrew Pinski
2015-10-28 18:49       ` Evandro Menezes
2015-10-30 10:26 ` Marcus Shawcroft
2015-11-09 22:59   ` Evandro Menezes
2015-12-03 21:01     ` Evandro Menezes
2015-11-19 22:01   ` Evandro Menezes
2015-12-16 21:30   ` Evandro Menezes
2016-01-13  0:06     ` Evandro Menezes

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).