spe.md (*mov_si<mode>_e500_subreg0): Rename to mov_si<mode>_e500_subreg0.

* config/rs6000/spe.md (*mov_si<mode>_e500_subreg0): Rename to
	mov_si<mode>_e500_subreg0.
	(*mov_si<mode>_e500_subreg0_elf_low)
	(*mov_si<mode>_e500_subreg4_elf_low): New patterns.

testsuite:
	* gcc.c-torture/compile/vector-5.c,
	gcc.c-torture/compile/vector-6.c: New tests.

From-SVN: r188795
This commit is contained in:
Joseph Myers 2012-06-19 23:08:49 +01:00 committed by Joseph Myers
parent f49278e65e
commit b513d0fe82
5 changed files with 55 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2012-06-19 Joseph Myers <joseph@codesourcery.com>
* config/rs6000/spe.md (*mov_si<mode>_e500_subreg0): Rename to
mov_si<mode>_e500_subreg0.
(*mov_si<mode>_e500_subreg0_elf_low)
(*mov_si<mode>_e500_subreg4_elf_low): New patterns.
2012-06-19 Richard Henderson <rth@redhat.com>
* config/alpha/alpha.c: Include params.h.

View File

@ -1,5 +1,5 @@
;; e500 SPE description
;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012
;; Free Software Foundation, Inc.
;; Contributed by Aldy Hernandez (aldy@quesejoda.com)
@ -2329,7 +2329,7 @@
"evmergehi %0,%1,%1\;mr %L0,%1\;evmergehi %Y0,%L1,%L1\;mr %Z0,%L1"
[(set_attr "length" "16")])
(define_insn "*mov_si<mode>_e500_subreg0"
(define_insn "mov_si<mode>_e500_subreg0"
[(set (subreg:SI (match_operand:SPE64TF 0 "register_operand" "+r,&r") 0)
(match_operand:SI 1 "input_operand" "r,m"))]
"(TARGET_E500_DOUBLE && (<MODE>mode == DFmode || <MODE>mode == TFmode))
@ -2339,6 +2339,24 @@
evmergelohi %0,%0,%0\;{l%U1%X1|lwz%U1%X1} %0,%1\;evmergelohi %0,%0,%0"
[(set_attr "length" "4,12")])
(define_insn_and_split "*mov_si<mode>_e500_subreg0_elf_low"
[(set (subreg:SI (match_operand:SPE64TF 0 "register_operand" "+r") 0)
(lo_sum:SI (match_operand:SI 1 "gpc_reg_operand" "r")
(match_operand 2 "" "")))]
"((TARGET_E500_DOUBLE && (<MODE>mode == DFmode || <MODE>mode == TFmode))
|| (TARGET_SPE && <MODE>mode != DFmode && <MODE>mode != TFmode))
&& TARGET_ELF && !TARGET_64BIT && can_create_pseudo_p ()"
"#"
"&& 1"
[(pc)]
{
rtx tmp = gen_reg_rtx (SImode);
emit_insn (gen_elf_low (tmp, operands[1], operands[2]));
emit_insn (gen_mov_si<mode>_e500_subreg0 (operands[0], tmp));
DONE;
}
[(set_attr "length" "8")])
;; ??? Could use evstwwe for memory stores in some cases, depending on
;; the offset.
(define_insn "*mov_si<mode>_e500_subreg0_2"
@ -2360,6 +2378,15 @@
mr %0,%1
{l%U1%X1|lwz%U1%X1} %0,%1")
(define_insn "*mov_si<mode>_e500_subreg4_elf_low"
[(set (subreg:SI (match_operand:SPE64TF 0 "register_operand" "+r") 4)
(lo_sum:SI (match_operand:SI 1 "gpc_reg_operand" "r")
(match_operand 2 "" "")))]
"((TARGET_E500_DOUBLE && (<MODE>mode == DFmode || <MODE>mode == TFmode))
|| (TARGET_SPE && <MODE>mode != DFmode && <MODE>mode != TFmode))
&& TARGET_ELF && !TARGET_64BIT"
"{ai|addic} %0,%1,%K2")
(define_insn "*mov_si<mode>_e500_subreg4_2"
[(set (match_operand:SI 0 "rs6000_nonimmediate_operand" "+r,m")
(subreg:SI (match_operand:SPE64TF 1 "register_operand" "r,r") 4))]

View File

@ -1,3 +1,8 @@
2012-06-19 Joseph Myers <joseph@codesourcery.com>
* gcc.c-torture/compile/vector-5.c,
gcc.c-torture/compile/vector-6.c: New tests.
2012-06-19 Richard Henderson <rth@redhat.com>
* gcc.target/i386/pr33329.c: Change multiplier constant to 12345.

View File

@ -0,0 +1,7 @@
typedef int v2si __attribute__((__vector_size__(8)));
v2si
f (int x)
{
return (v2si) { x, (__INTPTR_TYPE__) "" };
}

View File

@ -0,0 +1,7 @@
typedef int v2si __attribute__((__vector_size__(8)));
v2si
f (int x)
{
return (v2si) { (__INTPTR_TYPE__) "", x };
}