From b5344bf45d1a2c0f3e6cf91177b855db72a9d016 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Mon, 19 Sep 2011 20:21:54 +0200 Subject: [PATCH] mmx.md (*mov_internal_rex64): Use if_then_else RTX to calculate unit, prefix_rep and prefix_data16 attributes. * config/i386/mmx.md (*mov_internal_rex64): Use if_then_else RTX to calculate unit, prefix_rep and prefix_data16 attributes. (*mov_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_eq3): Use VI_256 instead of VI1248_256. (*avx2_eq3): Ditto. (avx2_gt3): Ditto. From-SVN: r178982 --- gcc/ChangeLog | 12 ++++++++++++ gcc/config/i386/mmx.md | 40 ++++++++++++++++++++++++++++++++-------- gcc/config/i386/sse.md | 25 ++++++++++++------------- 3 files changed, 56 insertions(+), 21 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 723bb32fb24..008099f02c1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2011-09-19 Uros Bizjak + + * config/i386/mmx.md (*mov_internal_rex64): Use if_then_else RTX + to calculate unit, prefix_rep and prefix_data16 attributes. + (*mov_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_eq3): Use VI_256 instead of VI1248_256. + (*avx2_eq3): Ditto. + (avx2_gt3): Ditto. + 2011-09-19 Uros Bizjak * config/i386/i386.md (maxmin): New code iterator. diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md index 21f2c94edde..f092c0f4f85 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 5a1b597d5bd..5e1701c858b 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_eq3" - [(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, operands);") (define_insn "*avx2_eq3" - [(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, operands)" "vpcmpeq\t{%2, %1, %0|%0, %1, %2}" [(set_attr "type" "ssecmp") @@ -6118,10 +6117,10 @@ (set_attr "mode" "TI")]) (define_insn "avx2_gt3" - [(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\t{%2, %1, %0|%0, %1, %2}" [(set_attr "type" "ssecmp") -- 2.30.2