sse.md (xop integer multiply/add insns): Use register_operand for operand 3 predicate.
authorUros Bizjak <uros@gcc.gnu.org>
Sat, 11 Aug 2012 11:37:02 +0000 (13:37 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Sat, 11 Aug 2012 11:37:02 +0000 (13:37 +0200)
* config/i386/sse.md (xop integer multiply/add insns): Use
register_operand for operand 3 predicate.
(xop_phadd<u>bq):  Fix vec_select selectors.

From-SVN: r190314

gcc/ChangeLog
gcc/config/i386/sse.md

index 8a4bcb56487b4152adaf8fadc0a48199f903d9f8..11d323ca32cb2bc13b250a7a3fa8f79d47293811 100644 (file)
@@ -1,3 +1,9 @@
+2012-08-11  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/sse.md (xop integer multiply/add insns): Use
+       register_operand for operand 3 predicate.
+       (xop_phadd<u>bq):  Fix vec_select selectors.
+
 2012-08-11  Martin Jambor  <mjambor@suse.cz>
 
        PR fortran/48636
@@ -48,7 +54,8 @@
        (produce_asm_for_decls): Likewise.
        (lto_output): Use output_symtab.
        * lto-section-in.c (lto_section_name): Update.
-       * lto-section-out.c (lto_destroy_simple_output_block): Remove section_type.
+       * lto-section-out.c (lto_destroy_simple_output_block): Remove
+       section_type.
        * lto-streamer.h (enum lto_section_type): Remove LTO_section_varpool;
        rename LTO_section_cgraph to LTO_section_symtab_nodes.
        (struct lto_header): Remove section_type.
@@ -87,7 +94,7 @@
        (add_node_to): Update.
        (add_references): Update.
        (output_outgoing_cgraph_edges): Update.
-       (output_refs): Update.  
+       (output_refs): Update.
        (compute_ltrans_boundary): Update.
        (output_cgraph): Update; output varpools too.
        (input_overwrite_node): Update.
        add symtab_node_encoder.
        (lto_file_decl_data): Likewise.
        (lto_cgraph_encoder_deref, lto_cgraph_encoder_lookup,
-       lto_cgraph_encoder_new, lto_cgraph_encoder_encode, lto_cgraph_encoder_delete,
-       lto_cgraph_encoder_encode_body_p, lto_varpool_encoder_encode_body_p,
-       lto_varpool_encoder_deref, lto_varpool_encoder_lookup, lto_varpool_encoder_new,
+       lto_cgraph_encoder_new, lto_cgraph_encoder_encode,
+       lto_cgraph_encoder_delete, lto_cgraph_encoder_encode_body_p,
+       lto_varpool_encoder_encode_body_p, lto_varpool_encoder_deref,
+       lto_varpool_encoder_lookup, lto_varpool_encoder_new,
        lto_varpool_encoder_encode, lto_varpool_encoder_delete,
        lto_varpool_encoder_encode_initializer_p): Remove.
        (lto_symtab_encoder_deref, lto_symtab_encoder_lookup,
-       lto_symtab_encoder_t, lto_symtab_encoder_encode, lto_symtab_encoder_delete,
-       lto_symtab_encoder_encode_body_p, lto_symtab_encoder_encode_initializer_p):
-       New.
+       lto_symtab_encoder_t, lto_symtab_encoder_encode,
+       lto_symtab_encoder_delete, lto_symtab_encoder_encode_body_p,
+       lto_symtab_encoder_encode_initializer_p): New.
 
 2012-08-11  Uros Bizjak  <ubizjak@gmail.com>
 
index 0cff3a3417bd1b3c09f4130eddf56275332ffb2d..51d77e02ec8a67cd45310adc80204b739317bae6 100644 (file)
 (define_code_attr madcs [(plus "madcs") (ss_plus "madcss")])
 
 ;; XOP parallel integer multiply/add instructions.
-;; Note the XOP multiply/add instructions
-;;     a[i] = b[i] * c[i] + d[i];
-;; do not allow the value being added to be a memory operation.
 
 (define_insn "xop_p<macs><ssemodesuffix><ssemodesuffix>"
   [(set (match_operand:VI24_128 0 "register_operand" "=x")
         (mult:VI24_128
          (match_operand:VI24_128 1 "nonimmediate_operand" "%x")
          (match_operand:VI24_128 2 "nonimmediate_operand" "xm"))
-        (match_operand:VI24_128 3 "nonimmediate_operand" "x")))]
+        (match_operand:VI24_128 3 "register_operand" "x")))]
   "TARGET_XOP"
   "vp<macs><ssemodesuffix><ssemodesuffix>\t{%3, %2, %1, %0|%0, %1, %2, %3}"
   [(set_attr "type" "ssemuladd")
           (vec_select:V2SI
            (match_operand:V4SI 2 "nonimmediate_operand" "xm")
            (parallel [(const_int 0) (const_int 2)]))))
-        (match_operand:V2DI 3 "nonimmediate_operand" "x")))]
+        (match_operand:V2DI 3 "register_operand" "x")))]
   "TARGET_XOP"
   "vp<macs>dql\t{%3, %2, %1, %0|%0, %1, %2, %3}"
   [(set_attr "type" "ssemuladd")
           (vec_select:V2SI
            (match_operand:V4SI 2 "nonimmediate_operand" "xm")
            (parallel [(const_int 1) (const_int 3)]))))
-        (match_operand:V2DI 3 "nonimmediate_operand" "x")))]
+        (match_operand:V2DI 3 "register_operand" "x")))]
   "TARGET_XOP"
   "vp<macs>dqh\t{%3, %2, %1, %0|%0, %1, %2, %3}"
   [(set_attr "type" "ssemuladd")
            (match_operand:V8HI 2 "nonimmediate_operand" "xm")
            (parallel [(const_int 1) (const_int 3)
                       (const_int 5) (const_int 7)]))))
-        (match_operand:V4SI 3 "nonimmediate_operand" "x")))]
+        (match_operand:V4SI 3 "register_operand" "x")))]
   "TARGET_XOP"
   "vp<macs>wd\t{%3, %2, %1, %0|%0, %1, %2, %3}"
   [(set_attr "type" "ssemuladd")
             (match_dup 2)
             (parallel [(const_int 1) (const_int 3)
                        (const_int 5) (const_int 7)])))))
-        (match_operand:V4SI 3 "nonimmediate_operand" "x")))]
+        (match_operand:V4SI 3 "register_operand" "x")))]
   "TARGET_XOP"
   "vp<madcs>wd\t{%3, %2, %1, %0|%0, %1, %2, %3}"
   [(set_attr "type" "ssemuladd")
           (any_extend:V2DI
            (vec_select:V2QI
             (match_operand:V16QI 1 "nonimmediate_operand" "xm")
-            (parallel [(const_int 0) (const_int 4)])))
+            (parallel [(const_int 0) (const_int 8)])))
           (any_extend:V2DI
            (vec_select:V2QI
             (match_dup 1)
-            (parallel [(const_int 1) (const_int 5)]))))
+            (parallel [(const_int 1) (const_int 9)]))))
          (plus:V2DI
           (any_extend:V2DI
            (vec_select:V2QI
             (match_dup 1)
-            (parallel [(const_int 2) (const_int 6)])))
+            (parallel [(const_int 2) (const_int 10)])))
           (any_extend:V2DI
            (vec_select:V2QI
             (match_dup 1)
-            (parallel [(const_int 3) (const_int 7)])))))
+            (parallel [(const_int 3) (const_int 11)])))))
         (plus:V2DI
          (plus:V2DI
           (any_extend:V2DI
            (vec_select:V2QI
             (match_dup 1)
-            (parallel [(const_int 8) (const_int 12)])))
+            (parallel [(const_int 4) (const_int 12)])))
           (any_extend:V2DI
            (vec_select:V2QI
             (match_dup 1)
-            (parallel [(const_int 9) (const_int 13)]))))
+            (parallel [(const_int 5) (const_int 13)]))))
          (plus:V2DI
           (any_extend:V2DI
            (vec_select:V2QI
             (match_dup 1)
-            (parallel [(const_int 10) (const_int 14)])))
+            (parallel [(const_int 6) (const_int 14)])))
           (any_extend:V2DI
            (vec_select:V2QI
             (match_dup 1)
-            (parallel [(const_int 11) (const_int 15)])))))))]
+            (parallel [(const_int 7) (const_int 15)])))))))]
   "TARGET_XOP"
   "vphadd<u>bq\t{%1, %0|%0, %1}"
   [(set_attr "type" "sseiadd1")])