Commit b5344bf4 by Uros Bizjak Committed by Uros Bizjak

mmx.md (*mov<mode>_internal_rex64): Use if_then_else RTX to calculate unit,…

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
parent 52325f2c
2011-09-19 Uros Bizjak <ubizjak@gmail.com> 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/i386.md (maxmin): New code iterator.
* config/i386/sse.md (<maxmin:code><mode>3): Macroize expander * config/i386/sse.md (<maxmin:code><mode>3): Macroize expander
from <umaxmin:code><mode>3 and <smaxmin:code><mode>3 using maxmin from <umaxmin:code><mode>3 and <smaxmin:code><mode>3 using maxmin
...@@ -98,9 +98,18 @@ ...@@ -98,9 +98,18 @@
(const_string "sselog1") (const_string "sselog1")
] ]
(const_string "ssemov"))) (const_string "ssemov")))
(set_attr "unit" "*,*,*,*,*,*,mmx,mmx,*,*,*,*,*") (set (attr "unit")
(set_attr "prefix_rep" "*,*,*,*,*,*,1,1,*,1,*,*,*") (if_then_else (eq_attr "alternative" "6,7")
(set_attr "prefix_data16" "*,*,*,*,*,*,*,*,*,*,1,1,1") (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") (set (attr "prefix_rex")
(if_then_else (eq_attr "alternative" "9,10") (if_then_else (eq_attr "alternative" "9,10")
(symbol_ref "x86_extended_reg_mentioned_p (insn)") (symbol_ref "x86_extended_reg_mentioned_p (insn)")
...@@ -154,7 +163,10 @@ ...@@ -154,7 +163,10 @@
(const_string "multi") (const_string "multi")
] ]
(const_string "ssemov"))) (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") (set (attr "prefix_rep")
(if_then_else (if_then_else
(ior (eq_attr "alternative" "4,5") (ior (eq_attr "alternative" "4,5")
...@@ -219,8 +231,14 @@ ...@@ -219,8 +231,14 @@
(const_string "sselog1") (const_string "sselog1")
] ]
(const_string "ssemov"))) (const_string "ssemov")))
(set_attr "unit" "*,*,*,*,*,*,mmx,mmx,*,*,*,*,*,*") (set (attr "unit")
(set_attr "prefix_rep" "*,*,*,*,*,*,1,1,*,*,*,*,*,*") (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") (set (attr "length_vex")
(if_then_else (if_then_else
(and (eq_attr "alternative" "12,13") (and (eq_attr "alternative" "12,13")
...@@ -270,8 +288,14 @@ ...@@ -270,8 +288,14 @@
(const_string "multi") (const_string "multi")
] ]
(const_string "ssemov"))) (const_string "ssemov")))
(set_attr "unit" "*,*,*,*,mmx,mmx,*,*,*,*,*,*") (set (attr "unit")
(set_attr "prefix_rep" "*,*,*,*,1,1,*,*,*,*,*,*") (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") (set (attr "prefix")
(if_then_else (eq_attr "alternative" "6,7,8,9") (if_then_else (eq_attr "alternative" "6,7,8,9")
(const_string "maybe_vex") (const_string "maybe_vex")
......
...@@ -191,7 +191,6 @@ ...@@ -191,7 +191,6 @@
;; Random 256bit vector integer mode combinations ;; Random 256bit vector integer mode combinations
(define_mode_iterator VI124_256 [V32QI V16HI V8SI]) (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]) (define_mode_iterator VI248_256 [V16HI V8SI V4DI])
;; Int-float size matches ;; Int-float size matches
...@@ -6036,18 +6035,18 @@ ...@@ -6036,18 +6035,18 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define_expand "avx2_eq<mode>3" (define_expand "avx2_eq<mode>3"
[(set (match_operand:VI1248_256 0 "register_operand" "") [(set (match_operand:VI_256 0 "register_operand" "")
(eq:VI1248_256 (eq:VI_256
(match_operand:VI1248_256 1 "nonimmediate_operand" "") (match_operand:VI_256 1 "nonimmediate_operand" "")
(match_operand:VI1248_256 2 "nonimmediate_operand" "")))] (match_operand:VI_256 2 "nonimmediate_operand" "")))]
"TARGET_AVX2" "TARGET_AVX2"
"ix86_fixup_binary_operands_no_copy (EQ, <MODE>mode, operands);") "ix86_fixup_binary_operands_no_copy (EQ, <MODE>mode, operands);")
(define_insn "*avx2_eq<mode>3" (define_insn "*avx2_eq<mode>3"
[(set (match_operand:VI1248_256 0 "register_operand" "=x") [(set (match_operand:VI_256 0 "register_operand" "=x")
(eq:VI1248_256 (eq:VI_256
(match_operand:VI1248_256 1 "nonimmediate_operand" "%x") (match_operand:VI_256 1 "nonimmediate_operand" "%x")
(match_operand:VI1248_256 2 "nonimmediate_operand" "xm")))] (match_operand:VI_256 2 "nonimmediate_operand" "xm")))]
"TARGET_AVX2 && ix86_binary_operator_ok (EQ, <MODE>mode, operands)" "TARGET_AVX2 && ix86_binary_operator_ok (EQ, <MODE>mode, operands)"
"vpcmpeq<ssemodesuffix>\t{%2, %1, %0|%0, %1, %2}" "vpcmpeq<ssemodesuffix>\t{%2, %1, %0|%0, %1, %2}"
[(set_attr "type" "ssecmp") [(set_attr "type" "ssecmp")
...@@ -6118,10 +6117,10 @@ ...@@ -6118,10 +6117,10 @@
(set_attr "mode" "TI")]) (set_attr "mode" "TI")])
(define_insn "avx2_gt<mode>3" (define_insn "avx2_gt<mode>3"
[(set (match_operand:VI1248_256 0 "register_operand" "=x") [(set (match_operand:VI_256 0 "register_operand" "=x")
(gt:VI1248_256 (gt:VI_256
(match_operand:VI1248_256 1 "register_operand" "x") (match_operand:VI_256 1 "register_operand" "x")
(match_operand:VI1248_256 2 "nonimmediate_operand" "xm")))] (match_operand:VI_256 2 "nonimmediate_operand" "xm")))]
"TARGET_AVX2" "TARGET_AVX2"
"vpcmpgt<ssemodesuffix>\t{%2, %1, %0|%0, %1, %2}" "vpcmpgt<ssemodesuffix>\t{%2, %1, %0|%0, %1, %2}"
[(set_attr "type" "ssecmp") [(set_attr "type" "ssecmp")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment