This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Committed 4.4] S/390: Re-add the mem->mem alternative for movqi


Hi,

the patch http://gcc.gnu.org/ml/gcc-patches/2008-12/msg00519.html
accidently removed the mem->mem alternative in the movqi pattern.  The
attached patch adds it back since that caused a performance
regression.

Committed to 4.4. I'll commit it to 4.5/4.6 as soon as the branch opens.

Bye,

-Andreas-

2010-02-22  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* config/s390/s390.md ("movqi"): Re-add the mem->mem alternative.
	(QI to BLKmode splitter): New splitter.


Index: gcc-4.4/gcc/config/s390/s390.md
===================================================================
--- gcc-4.4.orig/gcc/config/s390/s390.md	2009-12-17 09:23:04.000000000 +0100
+++ gcc-4.4/gcc/config/s390/s390.md	2010-02-19 12:45:04.000000000 +0100
@@ -1864,8 +1864,8 @@
 })
 
 (define_insn "*movqi"
-  [(set (match_operand:QI 0 "nonimmediate_operand" "=d,d,d,d,R,T,Q,S")
-        (match_operand:QI 1 "general_operand" "d,n,R,T,d,d,n,n"))]
+  [(set (match_operand:QI 0 "nonimmediate_operand" "=d,d,d,d,R,T,Q,S,?Q")
+        (match_operand:QI 1 "general_operand"      " d,n,R,T,d,d,n,n,?Q"))]
   ""
   "@
    lr\t%0,%1
@@ -1875,9 +1875,10 @@
    stc\t%1,%0
    stcy\t%1,%0
    mvi\t%S0,%b1
-   mviy\t%S0,%b1"
-  [(set_attr "op_type" "RR,RI,RX,RXY,RX,RXY,SI,SIY")
-   (set_attr "type" "lr,*,*,*,store,store,store,store")
+   mviy\t%S0,%b1
+   *"
+  [(set_attr "op_type" "RR,RI,RX,RXY,RX,RXY,SI,SIY,SS")
+   (set_attr "type" "lr,*,*,*,store,store,store,store,*")
    (set_attr "z10prop" "z10_fr_E1,
                         z10_fwd_A1,
                         z10_super_E1,
@@ -1885,7 +1886,8 @@
                         z10_rec,
                         z10_rec,
                         z10_super,
-                        z10_super")])
+                        z10_super,
+                        *")])
 
 (define_peephole2
   [(set (match_operand:QI 0 "nonimmediate_operand" "")
@@ -2262,6 +2264,22 @@
   "mvc\t%O0(%2,%R0),%S1"
   [(set_attr "op_type" "SS")])
 
+; This splitter converts a QI to QI mode copy into a BLK mode copy in
+; order to have it implemented with mvc.
+
+(define_split
+  [(set (match_operand:QI 0 "memory_operand" "")
+        (match_operand:QI 1 "memory_operand" ""))]
+  "reload_completed"
+  [(parallel
+    [(set (match_dup 0) (match_dup 1))
+     (use (const_int 1))])]
+{
+  operands[0] = adjust_address (operands[0], BLKmode, 0);
+  operands[1] = adjust_address (operands[1], BLKmode, 0);
+})
+
+
 (define_peephole2
   [(parallel
     [(set (match_operand:BLK 0 "memory_operand" "")


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]