From 8e10223f3638a3251b15eb7a8777a69cbaf63422 Mon Sep 17 00:00:00 2001 From: Wilco Dijkstra Date: Fri, 5 May 2017 16:18:17 +0000 Subject: [PATCH] Float to int moves currently generate inefficient code due to hacks used in the movsi and movdi patterns. 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 | 5 +++++ gcc/config/aarch64/aarch64.md | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a038415..604193c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-05-05 Wilco Dijkstra + + * config/aarch64/aarch64.md (movsi_aarch64): Remove '*' from r=w. + (movdi_aarch64): Likewise. + 2017-05-05 Jakub Jelinek PR tree-optimization/80632 diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index d39b850..c522e87 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -1030,8 +1030,8 @@ ) (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))" "@ @@ -1062,8 +1062,8 @@ ) (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))" "@ -- 2.7.4