re PR target/46144 (gfortran.dg/vect/fast-math-vect-8.f90)

PR target/46144
* config/i386/sse.md (*avx_absneg<AVXMODEF2P>2): New.
(*sse_absneg<SSEMODEF2P>2): Rename from *absneg<VEC_FLOAT_MODE>2.
Honor matching operands when splitting to XOR.

From-SVN: r165885
This commit is contained in:
Richard Henderson 2010-10-23 09:42:24 -07:00 committed by Richard Henderson
parent 0e1b8b109f
commit 487a9a3ef8
2 changed files with 42 additions and 10 deletions

View File

@ -1,3 +1,10 @@
2010-10-23 Richard Henderson <rth@redhat.com>
PR target/46144
* config/i386/sse.md (*avx_absneg<AVXMODEF2P>2): New.
(*sse_absneg<SSEMODEF2P>2): Rename from *absneg<VEC_FLOAT_MODE>2.
Honor matching operands when splitting to XOR.
2010-10-23 Ian Lance Taylor <iant@google.com>
* tree-vrp.c (extract_range_from_binary_expr): If

View File

@ -585,21 +585,46 @@
""
"ix86_expand_fp_absneg_operator (<CODE>, <MODE>mode, operands); DONE;")
(define_insn_and_split "*absneg<mode>2"
[(set (match_operand:VEC_FLOAT_MODE 0 "register_operand" "=x,x")
(match_operator:VEC_FLOAT_MODE 3 "absneg_operator"
[(match_operand:VEC_FLOAT_MODE 1 "nonimmediate_operand" "0,xm")]))
(use (match_operand:VEC_FLOAT_MODE 2 "nonimmediate_operand" "xm,0"))]
"SSE_VEC_FLOAT_MODE_P (<MODE>mode) || AVX256_VEC_FLOAT_MODE_P (<MODE>mode)"
(define_insn_and_split "*avx_absneg<mode>2"
[(set (match_operand:AVXMODEF2P 0 "register_operand" "=x,x")
(match_operator:AVXMODEF2P 3 "absneg_operator"
[(match_operand:AVXMODEF2P 1 "nonimmediate_operand" "x,m")]))
(use (match_operand:AVXMODEF2P 2 "nonimmediate_operand" "xm,x"))]
"AVX_VEC_FLOAT_MODE_P (<MODE>mode)"
"#"
"&& reload_completed"
[(const_int 0)]
{
rtx set;
set = gen_rtx_fmt_ee (GET_CODE (operands[3]) == NEG ? XOR : AND,
rtx t;
if (MEM_P (operands[1]))
t = gen_rtx_fmt_ee (GET_CODE (operands[3]) == NEG ? XOR : AND,
<MODE>mode, operands[2], operands[1]);
else
t = gen_rtx_fmt_ee (GET_CODE (operands[3]) == NEG ? XOR : AND,
<MODE>mode, operands[1], operands[2]);
set = gen_rtx_SET (VOIDmode, operands[0], set);
emit_insn (set);
t = gen_rtx_SET (VOIDmode, operands[0], t);
emit_insn (t);
DONE;
})
(define_insn_and_split "*sse_absneg<mode>2"
[(set (match_operand:SSEMODEF2P 0 "register_operand" "=x,x")
(match_operator:SSEMODEF2P 3 "absneg_operator"
[(match_operand:SSEMODEF2P 1 "nonimmediate_operand" "0,xm")]))
(use (match_operand:SSEMODEF2P 2 "nonimmediate_operand" "xm,0"))]
"SSE_VEC_FLOAT_MODE_P (<MODE>mode)"
"#"
"&& reload_completed"
[(const_int 0)]
{
rtx t;
t = operands[rtx_equal_p (operands[0], operands[1]) ? 2 : 1];
t = gen_rtx_fmt_ee (GET_CODE (operands[3]) == NEG ? XOR : AND,
<MODE>mode, operands[0], t);
t = gen_rtx_SET (VOIDmode, operands[0], t);
emit_insn (t);
DONE;
})