i386: Pass ix86_expand_sse_unpack operands by value
* config/i386/i386.c (ix86_expand_sse_unpack): Split operands[] parameter into src and dest. * config/i386/sse.md (vec_unpacku_hi_<V124_AVX2>): Update call. (vec_unpacks_hi_<V124_AVX2>): Likewise. (vec_unpacku_lo_<V124_AVX2>): Likewise. (vec_unpacks_lo_<V124_AVX2>): Likewise. * config/i386/i386-protos.h: Update. From-SVN: r188908
This commit is contained in:
parent
77a3dbf6c4
commit
7b5321188b
|
@ -1,5 +1,13 @@
|
||||||
2012-06-23 Richard Henderson <rth@redhat.com>
|
2012-06-23 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* config/i386/i386.c (ix86_expand_sse_unpack): Split operands[]
|
||||||
|
parameter into src and dest.
|
||||||
|
* config/i386/sse.md (vec_unpacku_hi_<V124_AVX2>): Update call.
|
||||||
|
(vec_unpacks_hi_<V124_AVX2>): Likewise.
|
||||||
|
(vec_unpacku_lo_<V124_AVX2>): Likewise.
|
||||||
|
(vec_unpacks_lo_<V124_AVX2>): Likewise.
|
||||||
|
* config/i386/i386-protos.h: Update.
|
||||||
|
|
||||||
* config/i386/sse.md (mul<VI1_AVX2>3): Change from insn_and_split to
|
* config/i386/sse.md (mul<VI1_AVX2>3): Change from insn_and_split to
|
||||||
pure expander; move expansion code ...
|
pure expander; move expansion code ...
|
||||||
* config/i386/i386.c (ix86_expand_vecop_qihi): ... here. New function.
|
* config/i386/i386.c (ix86_expand_vecop_qihi): ... here. New function.
|
||||||
|
|
|
@ -130,7 +130,7 @@ extern bool ix86_expand_fp_vcond (rtx[]);
|
||||||
extern bool ix86_expand_int_vcond (rtx[]);
|
extern bool ix86_expand_int_vcond (rtx[]);
|
||||||
extern void ix86_expand_vec_perm (rtx[]);
|
extern void ix86_expand_vec_perm (rtx[]);
|
||||||
extern bool ix86_expand_vec_perm_const (rtx[]);
|
extern bool ix86_expand_vec_perm_const (rtx[]);
|
||||||
extern void ix86_expand_sse_unpack (rtx[], bool, bool);
|
extern void ix86_expand_sse_unpack (rtx, rtx, bool, bool);
|
||||||
extern bool ix86_expand_int_addcc (rtx[]);
|
extern bool ix86_expand_int_addcc (rtx[]);
|
||||||
extern rtx ix86_expand_call (rtx, rtx, rtx, rtx, rtx, bool);
|
extern rtx ix86_expand_call (rtx, rtx, rtx, rtx, rtx, bool);
|
||||||
extern void ix86_split_call_vzeroupper (rtx, rtx);
|
extern void ix86_split_call_vzeroupper (rtx, rtx);
|
||||||
|
|
|
@ -20187,10 +20187,10 @@ ix86_expand_vec_perm (rtx operands[])
|
||||||
true if we want the N/2 high elements, else the low elements. */
|
true if we want the N/2 high elements, else the low elements. */
|
||||||
|
|
||||||
void
|
void
|
||||||
ix86_expand_sse_unpack (rtx operands[2], bool unsigned_p, bool high_p)
|
ix86_expand_sse_unpack (rtx dest, rtx src, bool unsigned_p, bool high_p)
|
||||||
{
|
{
|
||||||
enum machine_mode imode = GET_MODE (operands[1]);
|
enum machine_mode imode = GET_MODE (src);
|
||||||
rtx tmp, dest;
|
rtx tmp;
|
||||||
|
|
||||||
if (TARGET_SSE4_1)
|
if (TARGET_SSE4_1)
|
||||||
{
|
{
|
||||||
|
@ -20252,20 +20252,20 @@ ix86_expand_sse_unpack (rtx operands[2], bool unsigned_p, bool high_p)
|
||||||
if (GET_MODE_SIZE (imode) == 32)
|
if (GET_MODE_SIZE (imode) == 32)
|
||||||
{
|
{
|
||||||
tmp = gen_reg_rtx (halfmode);
|
tmp = gen_reg_rtx (halfmode);
|
||||||
emit_insn (extract (tmp, operands[1]));
|
emit_insn (extract (tmp, src));
|
||||||
}
|
}
|
||||||
else if (high_p)
|
else if (high_p)
|
||||||
{
|
{
|
||||||
/* Shift higher 8 bytes to lower 8 bytes. */
|
/* Shift higher 8 bytes to lower 8 bytes. */
|
||||||
tmp = gen_reg_rtx (imode);
|
tmp = gen_reg_rtx (imode);
|
||||||
emit_insn (gen_sse2_lshrv1ti3 (gen_lowpart (V1TImode, tmp),
|
emit_insn (gen_sse2_lshrv1ti3 (gen_lowpart (V1TImode, tmp),
|
||||||
gen_lowpart (V1TImode, operands[1]),
|
gen_lowpart (V1TImode, src),
|
||||||
GEN_INT (64)));
|
GEN_INT (64)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
tmp = operands[1];
|
tmp = src;
|
||||||
|
|
||||||
emit_insn (unpack (operands[0], tmp));
|
emit_insn (unpack (dest, tmp));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -20295,15 +20295,13 @@ ix86_expand_sse_unpack (rtx operands[2], bool unsigned_p, bool high_p)
|
||||||
gcc_unreachable ();
|
gcc_unreachable ();
|
||||||
}
|
}
|
||||||
|
|
||||||
dest = gen_lowpart (imode, operands[0]);
|
|
||||||
|
|
||||||
if (unsigned_p)
|
if (unsigned_p)
|
||||||
tmp = force_reg (imode, CONST0_RTX (imode));
|
tmp = force_reg (imode, CONST0_RTX (imode));
|
||||||
else
|
else
|
||||||
tmp = ix86_expand_sse_cmp (gen_reg_rtx (imode), GT, CONST0_RTX (imode),
|
tmp = ix86_expand_sse_cmp (gen_reg_rtx (imode), GT, CONST0_RTX (imode),
|
||||||
operands[1], pc_rtx, pc_rtx);
|
src, pc_rtx, pc_rtx);
|
||||||
|
|
||||||
emit_insn (unpack (dest, operands[1], tmp));
|
emit_insn (unpack (gen_lowpart (imode, dest), src, tmp));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7818,25 +7818,25 @@
|
||||||
[(match_operand:<sseunpackmode> 0 "register_operand")
|
[(match_operand:<sseunpackmode> 0 "register_operand")
|
||||||
(match_operand:VI124_AVX2 1 "register_operand")]
|
(match_operand:VI124_AVX2 1 "register_operand")]
|
||||||
"TARGET_SSE2"
|
"TARGET_SSE2"
|
||||||
"ix86_expand_sse_unpack (operands, false, false); DONE;")
|
"ix86_expand_sse_unpack (operands[0], operands[1], false, false); DONE;")
|
||||||
|
|
||||||
(define_expand "vec_unpacks_hi_<mode>"
|
(define_expand "vec_unpacks_hi_<mode>"
|
||||||
[(match_operand:<sseunpackmode> 0 "register_operand")
|
[(match_operand:<sseunpackmode> 0 "register_operand")
|
||||||
(match_operand:VI124_AVX2 1 "register_operand")]
|
(match_operand:VI124_AVX2 1 "register_operand")]
|
||||||
"TARGET_SSE2"
|
"TARGET_SSE2"
|
||||||
"ix86_expand_sse_unpack (operands, false, true); DONE;")
|
"ix86_expand_sse_unpack (operands[0], operands[1], false, true); DONE;")
|
||||||
|
|
||||||
(define_expand "vec_unpacku_lo_<mode>"
|
(define_expand "vec_unpacku_lo_<mode>"
|
||||||
[(match_operand:<sseunpackmode> 0 "register_operand")
|
[(match_operand:<sseunpackmode> 0 "register_operand")
|
||||||
(match_operand:VI124_AVX2 1 "register_operand")]
|
(match_operand:VI124_AVX2 1 "register_operand")]
|
||||||
"TARGET_SSE2"
|
"TARGET_SSE2"
|
||||||
"ix86_expand_sse_unpack (operands, true, false); DONE;")
|
"ix86_expand_sse_unpack (operands[0], operands[1], true, false); DONE;")
|
||||||
|
|
||||||
(define_expand "vec_unpacku_hi_<mode>"
|
(define_expand "vec_unpacku_hi_<mode>"
|
||||||
[(match_operand:<sseunpackmode> 0 "register_operand")
|
[(match_operand:<sseunpackmode> 0 "register_operand")
|
||||||
(match_operand:VI124_AVX2 1 "register_operand")]
|
(match_operand:VI124_AVX2 1 "register_operand")]
|
||||||
"TARGET_SSE2"
|
"TARGET_SSE2"
|
||||||
"ix86_expand_sse_unpack (operands, true, true); DONE;")
|
"ix86_expand_sse_unpack (operands[0], operands[1], true, true); DONE;")
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue