From: Georg-Johann Lay Date: Wed, 7 Feb 2018 09:59:52 +0000 (+0000) Subject: re PR target/84209 ([avr] Don't split SP in split2) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3924c9be0b45d920c140d56a7850b5a88b3eee5e;p=gcc.git re PR target/84209 ([avr] Don't split SP in split2) PR target/84209 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros. * config/avr/avr.md: Only post-reload split REG-REG moves if either register is REGERAL_REG_P. From-SVN: r257440 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 088aa477574..7bcda10e22c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2018-02-07 Georg-Johann Lay + + PR target/84209 + * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros. + * config/avr/avr.md: Only post-reload split REG-REG moves if + either register is REGERAL_REG_P. + 2018-02-07 Jakub Jelinek PR tree-optimization/84235 diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h index 76d18ae6716..cf8e0bfd972 100644 --- a/gcc/config/avr/avr.h +++ b/gcc/config/avr/avr.h @@ -153,6 +153,9 @@ FIXME: DRIVER_SELF_SPECS has changed. #define FIRST_PSEUDO_REGISTER 36 +#define GENERAL_REGNO_P(N) IN_RANGE (N, 2, 31) +#define GENERAL_REG_P(X) (REG_P (X) && GENERAL_REGNO_P (REGNO (X))) + #define FIXED_REGISTERS {\ 1,1,/* r0 r1 */\ 0,0,/* r2 r3 */\ diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md index 9fad0515e36..e619e695418 100644 --- a/gcc/config/avr/avr.md +++ b/gcc/config/avr/avr.md @@ -3368,6 +3368,8 @@ (match_operand:HI 1 "reg_or_0_operand"))] "optimize && reload_completed + && GENERAL_REG_P (operands[0]) + && (operands[1] == const0_rtx || GENERAL_REG_P (operands[1])) && (!AVR_HAVE_MOVW || const0_rtx == operands[1])" [(set (match_dup 2) (match_dup 3))