Get rid of sparc's UNSPEC_SHORT_LOAD.

* config/sparc/sparc.md (UNSPEC_SHORT_LOAD): Delete.
	(zero_extend_v8qi_vis, zero_extend_v4hi_vis,
	*zero_extend_v8qi_<P:mode>_insn,
	*zero_extend_v4hi_<P:mode>_insn): Express using vec_merge
	and vec_duplicate instead of using an UNSPEC.

From-SVN: r181063
This commit is contained in:
David S. Miller 2011-11-07 02:22:40 +00:00 committed by David S. Miller
parent 2805cc271b
commit 6e25d659c1
2 changed files with 30 additions and 11 deletions

View File

@ -1,3 +1,11 @@
2011-11-06 David S. Miller <davem@davemloft.net>
* config/sparc/sparc.md (UNSPEC_SHORT_LOAD): Delete.
(zero_extend_v8qi_vis, zero_extend_v4hi_vis,
*zero_extend_v8qi_<P:mode>_insn,
*zero_extend_v4hi_<P:mode>_insn): Express using vec_merge
and vec_duplicate instead of using an UNSPEC.
2011-11-07 Alan Modra <amodra@gmail.com>
PR target/30282

View File

@ -92,7 +92,6 @@
(UNSPEC_MUL8 86)
(UNSPEC_MUL8SU 87)
(UNSPEC_MULDSU 88)
(UNSPEC_SHORT_LOAD 89)
])
(define_constants
@ -7833,8 +7832,11 @@
(define_expand "zero_extend_v8qi_vis"
[(set (match_operand:V8QI 0 "register_operand" "")
(unspec:V8QI [(match_operand:QI 1 "memory_operand" "")]
UNSPEC_SHORT_LOAD))]
(vec_merge:V8QI
(vec_duplicate:V8QI
(match_operand:QI 1 "memory_operand" ""))
(match_dup 2)
(const_int 254)))]
"TARGET_VIS"
{
if (! REG_P (XEXP (operands[1], 0)))
@ -7842,12 +7844,16 @@
rtx addr = force_reg (Pmode, XEXP (operands[1], 0));
operands[1] = replace_equiv_address (operands[1], addr);
}
operands[2] = CONST0_RTX (V8QImode);
})
(define_expand "zero_extend_v4hi_vis"
[(set (match_operand:V4HI 0 "register_operand" "")
(unspec:V4HI [(match_operand:HI 1 "memory_operand" "")]
UNSPEC_SHORT_LOAD))]
(vec_merge:V4HI
(vec_duplicate:V4HI
(match_operand:HI 1 "memory_operand" ""))
(match_dup 2)
(const_int 14)))]
"TARGET_VIS"
{
if (! REG_P (XEXP (operands[1], 0)))
@ -7855,21 +7861,26 @@
rtx addr = force_reg (Pmode, XEXP (operands[1], 0));
operands[1] = replace_equiv_address (operands[1], addr);
}
operands[2] = CONST0_RTX (V4HImode);
})
(define_insn "*zero_extend_v8qi_<P:mode>_insn"
[(set (match_operand:V8QI 0 "register_operand" "=e")
(unspec:V8QI [(mem:QI
(match_operand:P 1 "register_operand" "r"))]
UNSPEC_SHORT_LOAD))]
(vec_merge:V8QI
(vec_duplicate:V8QI
(mem:QI (match_operand:P 1 "register_operand" "r")))
(match_operand:V8QI 2 "const_zero_operand" "Y")
(const_int 254)))]
"TARGET_VIS"
"ldda\t[%1] 0xd0, %0")
(define_insn "*zero_extend_v4hi_<P:mode>_insn"
[(set (match_operand:V4HI 0 "register_operand" "=e")
(unspec:V4HI [(mem:HI
(match_operand:P 1 "register_operand" "r"))]
UNSPEC_SHORT_LOAD))]
(vec_merge:V4HI
(vec_duplicate:V4HI
(mem:HI (match_operand:P 1 "register_operand" "r")))
(match_operand:V4HI 2 "const_zero_operand" "Y")
(const_int 14)))]
"TARGET_VIS"
"ldda\t[%1] 0xd2, %0")