diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2011-09-19 20:21:54 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2011-09-19 20:21:54 +0200 |
commit | b5344bf45d1a2c0f3e6cf91177b855db72a9d016 (patch) | |
tree | fe6b12c1de8bf14c1f53ac2a199388016ae5a5a6 /gcc | |
parent | 52325f2ca5b70566c41f1bb929c102c014dd74e1 (diff) | |
download | gcc-b5344bf45d1a2c0f3e6cf91177b855db72a9d016.zip gcc-b5344bf45d1a2c0f3e6cf91177b855db72a9d016.tar.gz gcc-b5344bf45d1a2c0f3e6cf91177b855db72a9d016.tar.bz2 |
mmx.md (*mov<mode>_internal_rex64): Use if_then_else RTX to calculate unit, prefix_rep and prefix_data16 attributes.
* 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.
From-SVN: r178982
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/config/i386/mmx.md | 40 | ||||
-rw-r--r-- | gcc/config/i386/sse.md | 25 |
3 files changed, 56 insertions, 21 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 723bb32..008099f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,17 @@ 2011-09-19 Uros Bizjak <ubizjak@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. + +2011-09-19 Uros Bizjak <ubizjak@gmail.com> + * config/i386/i386.md (maxmin): New code iterator. * config/i386/sse.md (<maxmin:code><mode>3): Macroize expander from <umaxmin:code><mode>3 and <smaxmin:code><mode>3 using maxmin diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md index 21f2c94..f092c0f 100644 --- a/gcc/config/i386/mmx.md +++ b/gcc/config/i386/mmx.md @@ -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") diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 5a1b597..5e1701c 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -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") |