* sh.md (movqi_i+1): New peephole.
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 23 Jan 1998 21:27:50 +0000 (21:27 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 23 Jan 1998 21:27:50 +0000 (21:27 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17463 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/sh/sh.md

index b38183e..35f9534 100644 (file)
@@ -1,3 +1,7 @@
+Fri Jan 23 23:28:59 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
+
+       * sh.md (movqi_i+1): New peephole.
+
 Fri Jan 23 15:39:42 1998  Jim Wilson  <wilson@cygnus.com>
 
        * Makefile.in: Remove remaining bytecode stuff.
index 35432aa..3b367d8 100644 (file)
 ;; align them when relaxing.
 
 ;; Loads have a latency of two.
-;; However, call insn can have ;; a delay slot, so that we want one more
+;; However, call insns can have a delay slot, so that we want one more
 ;; insn to be scheduled between the load of the function address and the call.
 ;; This is equivalent to a latency of three.
 ;; We cannot use a conflict list for this, because we need to distinguish
        lds     %1,%0"
  [(set_attr "type" "move,load,store,move,move,move")])
 
+;; For Big-endian, reload now sometimes generates something like
+;; (insn 2107 2104 2099 (set (reg:QI 3 r3)
+;;         (subreg:QI (mem:SI (reg:SI 0 r0)) 0)) -1 (nil)
+;;     (nil))
+;; To avoid clutter in the movqi pattern, we express this as a peephole.
+
+(define_peephole
+  [(set (match_operand:QI 0 "arith_reg_operand" "r")
+       (subreg:QI (match_operand:SI 1 "memory_operand"  "m") 0))]
+  ""
+  "mov.l       %1,%0")
+
 (define_expand "movqi"
   [(set (match_operand:QI 0 "general_operand" "")
        (match_operand:QI 1 "general_operand"  ""))]