From: Richard Henderson Date: Wed, 3 Aug 2011 22:57:22 +0000 (-0700) Subject: re PR target/34888 (Stack patterns for AVR not optimal) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a6365e997e0ea5f378e811d4649fd53c55510c69;p=gcc.git re PR target/34888 (Stack patterns for AVR not optimal) PR target/34888 * config/avr/avr.md: New splitter for REG_ARGS_SIZE 0. From-SVN: r177300 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2b707389247..a6f6b568967 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-08-03 Richard Henderson + + PR target/34888 + * config/avr/avr.md: New splitter for REG_ARGS_SIZE 0. + 2011-08-03 Jakub Jelinek PR tree-optimization/49948 diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md index b8560df60d4..b5aa73c55f2 100644 --- a/gcc/config/avr/avr.md +++ b/gcc/config/avr/avr.md @@ -235,6 +235,17 @@ DONE; }) +;; Notice a special-case when adding N to SP where N results in a +;; zero REG_ARGS_SIZE. This is equivalent to a move from FP. +(define_split + [(set (reg:HI REG_SP) (match_operand:HI 0 "register_operand" ""))] + "reload_completed + && frame_pointer_needed + && !cfun->calls_alloca + && find_reg_note (insn, REG_ARGS_SIZE, const0_rtx)" + [(set (reg:HI REG_SP) (reg:HI REG_Y))] + "") + ;;======================================================================== ;; move byte ;; The last alternative (any immediate constant to any register) is