Hello!

No functional change.

2011-09-19  Uros Bizjak  <ubiz...@gmail.com>

        * config/i386/mmx.md (*mov<mode>_internal_rex64): Use if_then_else RTX
        to calculate unit, prefix_rep and prefix_data16 attributes.
        (*mov<mode>_internal): Ditto for unit attribute.
        (*movv2sf_internal_rex64): Ditto for unit and prefix_rep attributes.
        (*movv2sf_internal): Ditto.
        * config/i386/sse.md (VI1248_256): Remove mode iterator.
        (avx2_eq<mode>3): Use VI_256 instead of VI1248_256.
        (*avx2_eq<mode>3): Ditto.
        (avx2_gt<mode>3): Ditto.

Tested on x86_64-pc-linux-gnu {,-m32}, comitted to mainline SVN.

Uros.
Index: mmx.md
===================================================================
--- mmx.md      (revision 178981)
+++ mmx.md      (working copy)
@@ -98,9 +98,18 @@
              (const_string "sselog1")
           ]
           (const_string "ssemov")))
-   (set_attr "unit" "*,*,*,*,*,*,mmx,mmx,*,*,*,*,*")
-   (set_attr "prefix_rep" "*,*,*,*,*,*,1,1,*,1,*,*,*")
-   (set_attr "prefix_data16" "*,*,*,*,*,*,*,*,*,*,1,1,1")
+   (set (attr "unit")
+     (if_then_else (eq_attr "alternative" "6,7")
+       (const_string "mmx")
+       (const_string "*")))
+   (set (attr "prefix_rep")
+     (if_then_else (eq_attr "alternative" "6,7,9")
+       (const_string "1")
+       (const_string "*")))
+   (set (attr "prefix_data16")
+     (if_then_else (eq_attr "alternative" "10,11,12")
+       (const_string "1")
+       (const_string "*")))
    (set (attr "prefix_rex")
      (if_then_else (eq_attr "alternative" "9,10")
        (symbol_ref "x86_extended_reg_mentioned_p (insn)")
@@ -154,7 +163,10 @@
              (const_string "multi")
           ]
           (const_string "ssemov")))
-   (set_attr "unit" "*,*,*,*,mmx,mmx,*,*,*,*,*,*,*,*,*")
+   (set (attr "unit")
+     (if_then_else (eq_attr "alternative" "4,5")
+       (const_string "mmx")
+       (const_string "*")))
    (set (attr "prefix_rep")
      (if_then_else
        (ior (eq_attr "alternative" "4,5")
@@ -219,8 +231,14 @@
              (const_string "sselog1")
           ]
           (const_string "ssemov")))
-   (set_attr "unit" "*,*,*,*,*,*,mmx,mmx,*,*,*,*,*,*")
-   (set_attr "prefix_rep" "*,*,*,*,*,*,1,1,*,*,*,*,*,*")
+   (set (attr "unit")
+     (if_then_else (eq_attr "alternative" "6,7")
+       (const_string "mmx")
+       (const_string "*")))
+   (set (attr "prefix_rep")
+     (if_then_else (eq_attr "alternative" "6,7")
+       (const_string "1")
+       (const_string "*")))
    (set (attr "length_vex")
      (if_then_else
        (and (eq_attr "alternative" "12,13")
@@ -270,8 +288,14 @@
              (const_string "multi")
           ]
           (const_string "ssemov")))
-   (set_attr "unit" "*,*,*,*,mmx,mmx,*,*,*,*,*,*")
-   (set_attr "prefix_rep" "*,*,*,*,1,1,*,*,*,*,*,*")
+   (set (attr "unit")
+     (if_then_else (eq_attr "alternative" "4,5")
+       (const_string "mmx")
+       (const_string "*")))
+   (set (attr "prefix_rep")
+     (if_then_else (eq_attr "alternative" "4,5")
+       (const_string "1")
+       (const_string "*")))
    (set (attr "prefix")
      (if_then_else (eq_attr "alternative" "6,7,8,9")
        (const_string "maybe_vex")
Index: sse.md
===================================================================
--- sse.md      (revision 178981)
+++ sse.md      (working copy)
@@ -191,7 +191,6 @@
 
 ;; Random 256bit vector integer mode combinations
 (define_mode_iterator VI124_256 [V32QI V16HI V8SI])
-(define_mode_iterator VI1248_256 [V32QI V16HI V8SI V4DI])
 (define_mode_iterator VI248_256 [V16HI V8SI V4DI])
 
 ;; Int-float size matches
@@ -6036,18 +6035,18 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (define_expand "avx2_eq<mode>3"
-  [(set (match_operand:VI1248_256 0 "register_operand" "")
-       (eq:VI1248_256
-         (match_operand:VI1248_256 1 "nonimmediate_operand" "")
-         (match_operand:VI1248_256 2 "nonimmediate_operand" "")))]
+  [(set (match_operand:VI_256 0 "register_operand" "")
+       (eq:VI_256
+         (match_operand:VI_256 1 "nonimmediate_operand" "")
+         (match_operand:VI_256 2 "nonimmediate_operand" "")))]
   "TARGET_AVX2"
   "ix86_fixup_binary_operands_no_copy (EQ, <MODE>mode, operands);")
 
 (define_insn "*avx2_eq<mode>3"
-  [(set (match_operand:VI1248_256 0 "register_operand" "=x")
-       (eq:VI1248_256
-         (match_operand:VI1248_256 1 "nonimmediate_operand" "%x")
-         (match_operand:VI1248_256 2 "nonimmediate_operand" "xm")))]
+  [(set (match_operand:VI_256 0 "register_operand" "=x")
+       (eq:VI_256
+         (match_operand:VI_256 1 "nonimmediate_operand" "%x")
+         (match_operand:VI_256 2 "nonimmediate_operand" "xm")))]
   "TARGET_AVX2 && ix86_binary_operator_ok (EQ, <MODE>mode, operands)"
   "vpcmpeq<ssemodesuffix>\t{%2, %1, %0|%0, %1, %2}"
   [(set_attr "type" "ssecmp")
@@ -6118,10 +6117,10 @@
    (set_attr "mode" "TI")])
 
 (define_insn "avx2_gt<mode>3"
-  [(set (match_operand:VI1248_256 0 "register_operand" "=x")
-       (gt:VI1248_256
-         (match_operand:VI1248_256 1 "register_operand" "x")
-         (match_operand:VI1248_256 2 "nonimmediate_operand" "xm")))]
+  [(set (match_operand:VI_256 0 "register_operand" "=x")
+       (gt:VI_256
+         (match_operand:VI_256 1 "register_operand" "x")
+         (match_operand:VI_256 2 "nonimmediate_operand" "xm")))]
   "TARGET_AVX2"
   "vpcmpgt<ssemodesuffix>\t{%2, %1, %0|%0, %1, %2}"
   [(set_attr "type" "ssecmp")

Reply via email to