From: Richard Henderson Date: Mon, 7 Jun 2004 17:21:05 +0000 (-0700) Subject: re PR rtl-optimization/15193 (Unary minus using pointer to V4SF vector causes -fforce... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5c64c9001b34df259ef676ec1af22a652dcd3607;p=gcc.git re PR rtl-optimization/15193 (Unary minus using pointer to V4SF vector causes -fforce-mem to exhaust all memory) PR rtl-opt/15193 * expmed.c (extract_bit_field): Fix vector_extract return. * config/i386/i386.md (negv4sf2): New pattern. From-SVN: r82699 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4ba070b4413..a096a8ac2f7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2004-06-07 Richard Henderson + + PR rtl-opt/15193 + * expmed.c (extract_bit_field): Fix vector_extract return. + + * config/i386/i386.md (negv4sf2): New pattern. + 2004-06-07 Mark Mitchell PR c++/15337 diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 770a7afe20d..ed2c579330b 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -20404,6 +20404,18 @@ [(set_attr "type" "sseadd") (set_attr "mode" "SF")]) +;; ??? Should probably be done by generic code instead. +(define_expand "negv4sf2" + [(set (match_operand:V4SF 0 "register_operand" "") + (xor:V4SF (match_operand:V4SF 1 "nonimmediate_operand" "") + (match_dup 2)))] + "TARGET_SSE" +{ + rtx m0 = gen_lowpart (SFmode, gen_int_mode (0x80000000, SImode)); + rtx vm0 = gen_rtx_CONST_VECTOR (V4SFmode, gen_rtvec (4, m0, m0, m0, m0)); + operands[2] = force_reg (V4SFmode, vm0); +}) + (define_insn "mulv4sf3" [(set (match_operand:V4SF 0 "register_operand" "=x") (mult:V4SF (match_operand:V4SF 1 "register_operand" "0") diff --git a/gcc/expmed.c b/gcc/expmed.c index 3751bc51a2a..9679b71bd71 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -1125,6 +1125,7 @@ extract_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, || ! (*insn_data[icode].operand[1].predicate) (src, mode1) || ! (*insn_data[icode].operand[2].predicate) (rtxpos, mode2)) abort (); + pat = GEN_FCN (icode) (dest, src, rtxpos); seq = get_insns (); end_sequence (); @@ -1132,9 +1133,7 @@ extract_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, { emit_insn (seq); emit_insn (pat); - return extract_bit_field (dest, bitsize, - bitnum - pos * GET_MODE_BITSIZE (innermode), - unsignedp, target, mode, tmode, total_size); + return dest; } }