rs6000.md ("*movv4si_internal"): Add m<-r and r<-r alternatives.

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
This commit is contained in:
Aldy Hernandez 2002-02-14 03:37:37 +00:00 committed by Aldy Hernandez
parent b34223e5ac
commit 78c875e81a
3 changed files with 37 additions and 17 deletions

View 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

View 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;

View File

@ -13935,16 +13935,18 @@
"{ 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" "")
@ -13953,16 +13955,18 @@
"{ 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" "")
@ -13971,16 +13975,18 @@
"{ 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" "")
@ -13989,16 +13995,18 @@
"{ 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"