]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/34888 (Stack patterns for AVR not optimal)
authorRichard Henderson <rth@redhat.com>
Wed, 3 Aug 2011 22:57:22 +0000 (15:57 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 3 Aug 2011 22:57:22 +0000 (15:57 -0700)
PR target/34888
        * config/avr/avr.md: New splitter for REG_ARGS_SIZE 0.

From-SVN: r177300

gcc/ChangeLog
gcc/config/avr/avr.md

index 2b7073892475f450a303fa80630c889712a48654..a6f6b56896773a6ebde8bc5e516a8cd8951d700e 100644 (file)
@@ -1,3 +1,8 @@
+2011-08-03  Richard Henderson  <rth@redhat.com>
+
+       PR target/34888
+       * config/avr/avr.md: New splitter for REG_ARGS_SIZE 0.
+
 2011-08-03  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/49948
index b8560df60d467f7c77557b110b1a46b60e867f1a..b5aa73c55f28e942ba703f027d6d7161f843638e 100644 (file)
   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