Float to int moves currently generate inefficient code due to hacks used in the movsi...
authorWilco Dijkstra <wdijkstr@arm.com>
Fri, 5 May 2017 16:18:17 +0000 (16:18 +0000)
committerWilco Dijkstra <wilco@gcc.gnu.org>
Fri, 5 May 2017 16:18:17 +0000 (16:18 +0000)
Float to int moves currently generate inefficient code due to
hacks used in the movsi and movdi patterns.  The 'r = w' variant
uses '*' which tells the register allocator to ignore it.
As a result the float to int moves typically spill to the stack,
which is extremely inefficient.

    gcc/
* config/aarch64/aarch64.md (movsi_aarch64): Remove '*' from r=w.
(movdi_aarch64): Likewise.

From-SVN: r247643

gcc/ChangeLog
gcc/config/aarch64/aarch64.md

index a038415f918240cebd2682267da6a378209b7998..604193c01d86e004ecef61395a0949639ec1a1fa 100644 (file)
@@ -1,3 +1,8 @@
+2017-05-05  Wilco Dijkstra  <wdijkstr@arm.com>
+
+       * config/aarch64/aarch64.md (movsi_aarch64): Remove '*' from r=w.
+       (movdi_aarch64): Likewise.
+
 2017-05-05  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/80632
index d39b8507c7570b4490ede20c523ffcf6bd533a36..c522e87ebdef4b8d6a392f7bfde1d6bf8251b6d9 100644 (file)
 )
 
 (define_insn_and_split "*movsi_aarch64"
-  [(set (match_operand:SI 0 "nonimmediate_operand" "=r,k,r,r,r,r,*w,m,  m,r,r  ,*w, r,*w")
-       (match_operand:SI 1 "aarch64_mov_operand"  " r,r,k,M,n,m, m,rZ,*w,S,Ush,rZ,*w,*w"))]
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=r,k,r,r,r,r,*w,m,  m,r,r  ,*w,r,*w")
+       (match_operand:SI 1 "aarch64_mov_operand"  " r,r,k,M,n,m, m,rZ,*w,S,Ush,rZ,w,*w"))]
   "(register_operand (operands[0], SImode)
     || aarch64_reg_or_zero (operands[1], SImode))"
   "@
 )
 
 (define_insn_and_split "*movdi_aarch64"
-  [(set (match_operand:DI 0 "nonimmediate_operand" "=r,k,r,r,r,r,*w,m,  m,r,r,  *w, r,*w,w")
-       (match_operand:DI 1 "aarch64_mov_operand"  " r,r,k,N,n,m, m,rZ,*w,S,Ush,rZ,*w,*w,Dd"))]
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=r,k,r,r,r,r,*w,m,  m,r,r,  *w,r,*w,w")
+       (match_operand:DI 1 "aarch64_mov_operand"  " r,r,k,N,n,m, m,rZ,*w,S,Ush,rZ,w,*w,Dd"))]
   "(register_operand (operands[0], DImode)
     || aarch64_reg_or_zero (operands[1], DImode))"
   "@