rs6000.md ("*movv4si_internal"): Add m<-r and r<-r alternatives.
authorAldy Hernandez <aldyh@redhat.com>
Thu, 14 Feb 2002 03:37:37 +0000 (03:37 +0000)
committerAldy Hernandez <aldyh@gcc.gnu.org>
Thu, 14 Feb 2002 03:37:37 +0000 (03:37 +0000)
2002-02-14  Aldy Hernandez  <aldyh@redhat.com>

        * config/rs6000/rs6000.md ("*movv4si_internal"): Add m<-r and r<-r
        alternatives.
        ("*movv8hi_internal1"): Same.
        ("*movv16qi_internal1"): Same.
        ("*movv4sf_internal1"): Same.

        * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Do
        not push_reload for altivec modes.

From-SVN: r49757

gcc/ChangeLog
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.md

index 6e5c90f883e81bb502b3d5b9d4bad95747cbb9c3..ccd976548dd89b0ba1c9e9c765ea333c0dfbb541 100644 (file)
@@ -1,3 +1,14 @@
+2002-02-14  Aldy Hernandez  <aldyh@redhat.com>
+
+        * config/rs6000/rs6000.md ("*movv4si_internal"): Add m<-r and r<-r
+        alternatives.
+        ("*movv8hi_internal1"): Same.
+        ("*movv16qi_internal1"): Same.
+        ("*movv4sf_internal1"): Same.
+
+        * config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Do
+        not push_reload for altivec modes.
+
 2002-02-13     Joel Sherrill <joel@OARcorp.com>
 
        * config.gcc (a29k-*-rtems), config/a29k/rtems.h: General cleanup across
index bbd3a525bd4c79e3f4c603193ab36927696652f7..8cd66463d5c046378fc75d542b7157692af3fb55 100644 (file)
@@ -1860,7 +1860,8 @@ rs6000_legitimize_reload_address (x, mode, opnum, type, ind_levels, win)
       && GET_CODE (XEXP (x, 0)) == REG
       && REGNO (XEXP (x, 0)) < FIRST_PSEUDO_REGISTER
       && REG_MODE_OK_FOR_BASE_P (XEXP (x, 0), mode)
-      && GET_CODE (XEXP (x, 1)) == CONST_INT)
+      && GET_CODE (XEXP (x, 1)) == CONST_INT
+      && !ALTIVEC_VECTOR_MODE (mode))
     {
       HOST_WIDE_INT val = INTVAL (XEXP (x, 1));
       HOST_WIDE_INT low = ((val & 0xffff) ^ 0x8000) - 0x8000;
index 2f49d03d8d5cc79f5078b648c58e4c6f254e0155..7a5bce5b931d4499b1bf222e6b4c1d04470d1a34 100644 (file)
   "{ rs6000_emit_move (operands[0], operands[1], V4SImode); DONE; }")
 
 (define_insn "*movv4si_internal"
-  [(set (match_operand:V4SI 0 "nonimmediate_operand" "=m,v,v,m")
-       (match_operand:V4SI 1 "input_operand" "v,m,v,r"))]
+  [(set (match_operand:V4SI 0 "nonimmediate_operand" "=m,v,v,m,r,r")
+       (match_operand:V4SI 1 "input_operand" "v,m,v,r,m,r"))]
   "TARGET_ALTIVEC"
   "@
    stvx %1,%y0
    lvx %0,%y1
    vor %0,%1,%1
-   stw%U0 %1,%0\;stw %L1,%L0\;stw %Y1,%Y0\;stw %Z1,%Z0"
+   stw%U0 %1,%0\;stw %L1,%L0\;stw %Y1,%Y0\;stw %Z1,%Z0
+   lwz%U1 %0,%1\;lwz %L0,%L1\;lwz %Y0,%Y1\;lwz %Z0,%Z1
+   mr %0,%1\;mr %L0,%L1\;mr %Y0,%Y1\;mr %Z0,%Z1"
   [(set_attr "type" "altivec")
-   (set_attr "length" "*,*,*,16")])
+   (set_attr "length" "*,*,*,16,16,16")])
 
 (define_expand "movv8hi"
   [(set (match_operand:V8HI 0 "nonimmediate_operand" "")
   "{ rs6000_emit_move (operands[0], operands[1], V8HImode); DONE; }")
 
 (define_insn "*movv8hi_internal1"
-  [(set (match_operand:V8HI 0 "nonimmediate_operand" "=m,v,v,m")
-       (match_operand:V8HI 1 "input_operand" "v,m,v,r"))]
+  [(set (match_operand:V8HI 0 "nonimmediate_operand" "=m,v,v,m,r,r")
+       (match_operand:V8HI 1 "input_operand" "v,m,v,r,m,r"))]
   "TARGET_ALTIVEC"
   "@
    stvx %1,%y0
    lvx %0,%y1
    vor %0,%1,%1
-   stw%U0 %1,%0\;stw %L1,%L0\;stw %Y1,%Y0\;stw %Z1,%Z0"
+   stw%U0 %1,%0\;stw %L1,%L0\;stw %Y1,%Y0\;stw %Z1,%Z0
+   lwz%U1 %0,%1\;lwz %L0,%L1\;lwz %Y0,%Y1\;lwz %Z0,%Z1
+   mr %0,%1\;mr %L0,%L1\;mr %Y0,%Y1\;mr %Z0,%Z1"
   [(set_attr "type" "altivec")
-   (set_attr "length" "*,*,*,16")])
+   (set_attr "length" "*,*,*,16,16,16")])
 
 (define_expand "movv16qi"
   [(set (match_operand:V16QI 0 "nonimmediate_operand" "")
   "{ rs6000_emit_move (operands[0], operands[1], V16QImode); DONE; }")
 
 (define_insn "*movv16qi_internal1"
-  [(set (match_operand:V16QI 0 "nonimmediate_operand" "=m,v,v,m")
-       (match_operand:V16QI 1 "input_operand" "v,m,v,r"))]
+  [(set (match_operand:V16QI 0 "nonimmediate_operand" "=m,v,v,m,r,r")
+       (match_operand:V16QI 1 "input_operand" "v,m,v,r,m,r"))]
   "TARGET_ALTIVEC"
   "@
    stvx %1,%y0
    lvx %0,%y1
    vor %0,%1,%1
-  stw%U0 %1,%0\;stw %L1,%L0\;stw %Y1,%Y0\;stw %Z1,%Z0"
+  stw%U0 %1,%0\;stw %L1,%L0\;stw %Y1,%Y0\;stw %Z1,%Z0
+  lwz%U1 %0,%1\;lwz %L0,%L1\;lwz %Y0,%Y1\;lwz %Z0,%Z1
+  mr %0,%1\;mr %L0,%L1\;mr %Y0,%Y1\;mr %Z0,%Z1"
   [(set_attr "type" "altivec")
-   (set_attr "length" "*,*,*,16")])
+   (set_attr "length" "*,*,*,16,16,16")])
 
 (define_expand "movv4sf"
   [(set (match_operand:V4SF 0 "nonimmediate_operand" "")
   "{ rs6000_emit_move (operands[0], operands[1], V4SFmode); DONE; }")
 
 (define_insn "*movv4sf_internal1"
-  [(set (match_operand:V4SF 0 "nonimmediate_operand" "=m,v,v,m")
-       (match_operand:V4SF 1 "input_operand" "v,m,v,r"))]
+  [(set (match_operand:V4SF 0 "nonimmediate_operand" "=m,v,v,m,r,r")
+       (match_operand:V4SF 1 "input_operand" "v,m,v,r,m,r"))]
   "TARGET_ALTIVEC"
   "@
    stvx %1,%y0
    lvx %0,%y1
    vor %0,%1,%1
-   stw%U0 %1,%0\;stw %L1,%L0\;stw %Y1,%Y0\;stw %Z1,%Z0"
+   stw%U0 %1,%0\;stw %L1,%L0\;stw %Y1,%Y0\;stw %Z1,%Z0
+   lwz%U1 %0,%1\;lwz %L0,%L1\;lwz %Y0,%Y1\;lwz %Z0,%Z1
+   mr %0,%1\;mr %L0,%L1\;mr %Y0,%Y1\;mr %Z0,%Z1"
   [(set_attr "type" "altivec")
-   (set_attr "length" "*,*,*,16")])
+   (set_attr "length" "*,*,*,16,16,16")])
 
 (define_insn "*set_vrsave_internal"
   [(match_parallel 0 "vrsave_operation"