Skip to content

Commit

Permalink
AVX-512. Add cvtps2 insn patterns.
Browse files Browse the repository at this point in the history
gcc/
	* config/i386/sse.md
	(define_insn
	"<sse2_avx_avx512f>_fix_notrunc<sf2simodelower><mode><mask_name>"):
	Add masking.
	(define_insn "fix_truncv8sfv8si2<mask_name>"): Ditto.
	(define_insn "fix_truncv4sfv4si2<mask_name>"): Ditto.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215545 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
kyukhin committed Sep 24, 2014
1 parent 7b988cc commit d135c23
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 15 deletions.
16 changes: 16 additions & 0 deletions gcc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
2014-09-24 Alexander Ivchenko <[email protected]>
Maxim Kuznetsov <[email protected]>
Anna Tikhonova <[email protected]>
Ilya Tocar <[email protected]>
Andrey Turetskiy <[email protected]>
Ilya Verbin <[email protected]>
Kirill Yukhin <[email protected]>
Michael Zolotukhin <[email protected]>

* config/i386/sse.md
(define_insn
"<sse2_avx_avx512f>_fix_notrunc<sf2simodelower><mode><mask_name>"):
Add masking.
(define_insn "fix_truncv8sfv8si2<mask_name>"): Ditto.
(define_insn "fix_truncv4sfv4si2<mask_name>"): Ditto.

2014-09-24 Alexander Ivchenko <[email protected]>
Maxim Kuznetsov <[email protected]>
Anna Tikhonova <[email protected]>
Expand Down
30 changes: 15 additions & 15 deletions gcc/config/i386/sse.md
Original file line number Diff line number Diff line change
Expand Up @@ -3937,13 +3937,13 @@
(define_mode_attr sf2simodelower
[(V16SI "v16sf") (V8SI "v8sf") (V4SI "v4sf")])

(define_insn "<sse2_avx_avx512f>_fix_notrunc<sf2simodelower><mode>"
(define_insn "<sse2_avx_avx512f>_fix_notrunc<sf2simodelower><mode><mask_name>"
[(set (match_operand:VI4_AVX 0 "register_operand" "=v")
(unspec:VI4_AVX
[(match_operand:<ssePSmode> 1 "nonimmediate_operand" "vm")]
UNSPEC_FIX_NOTRUNC))]
"TARGET_SSE2"
"%vcvtps2dq\t{%1, %0|%0, %1}"
"TARGET_SSE2 && <mask_mode512bit_condition>"
"%vcvtps2dq\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}"
[(set_attr "type" "ssecvt")
(set (attr "prefix_data16")
(if_then_else
Expand Down Expand Up @@ -4031,20 +4031,20 @@
(set_attr "prefix" "evex")
(set_attr "mode" "XI")])

(define_insn "fix_truncv8sfv8si2"
[(set (match_operand:V8SI 0 "register_operand" "=x")
(fix:V8SI (match_operand:V8SF 1 "nonimmediate_operand" "xm")))]
"TARGET_AVX"
"vcvttps2dq\t{%1, %0|%0, %1}"
(define_insn "fix_truncv8sfv8si2<mask_name>"
[(set (match_operand:V8SI 0 "register_operand" "=v")
(fix:V8SI (match_operand:V8SF 1 "nonimmediate_operand" "vm")))]
"TARGET_AVX && <mask_avx512vl_condition>"
"vcvttps2dq\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "vex")
(set_attr "prefix" "<mask_prefix>")
(set_attr "mode" "OI")])

(define_insn "fix_truncv4sfv4si2"
[(set (match_operand:V4SI 0 "register_operand" "=x")
(fix:V4SI (match_operand:V4SF 1 "nonimmediate_operand" "xm")))]
"TARGET_SSE2"
"%vcvttps2dq\t{%1, %0|%0, %1}"
(define_insn "fix_truncv4sfv4si2<mask_name>"
[(set (match_operand:V4SI 0 "register_operand" "=v")
(fix:V4SI (match_operand:V4SF 1 "nonimmediate_operand" "vm")))]
"TARGET_SSE2 && <mask_avx512vl_condition>"
"%vcvttps2dq\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}"
[(set_attr "type" "ssecvt")
(set (attr "prefix_rep")
(if_then_else
Expand All @@ -4057,7 +4057,7 @@
(const_string "*")
(const_string "0")))
(set_attr "prefix_data16" "0")
(set_attr "prefix" "maybe_vex")
(set_attr "prefix" "<mask_prefix2>")
(set_attr "mode" "TI")])

(define_expand "fixuns_trunc<mode><sseintvecmodelower>2"
Expand Down

0 comments on commit d135c23

Please sign in to comment.