re PR rtl-optimization/15193 (Unary minus using pointer to V4SF vector causes -fforce...
authorRichard Henderson <rth@redhat.com>
Mon, 7 Jun 2004 17:21:05 +0000 (10:21 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 7 Jun 2004 17:21:05 +0000 (10:21 -0700)
        PR rtl-opt/15193
        * expmed.c (extract_bit_field): Fix vector_extract return.
        * config/i386/i386.md (negv4sf2): New pattern.

From-SVN: r82699

gcc/ChangeLog
gcc/config/i386/i386.md
gcc/expmed.c

index 4ba070b..a096a8a 100644 (file)
@@ -1,3 +1,10 @@
+2004-06-07  Richard Henderson  <rth@redhat.com>
+
+       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  <mark@codesourcery.com>
 
        PR c++/15337
index 770a7af..ed2c579 100644 (file)
   [(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")
index 3751bc5..9679b71 100644 (file)
@@ -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;
        }
     }