From: Alexander Ivchenko Date: Fri, 22 Aug 2014 10:00:55 +0000 (+0000) Subject: sse.md (define_mode_iterator VI4F_BRCST32x2): New. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=698ea04f75337d0178da2d1aae67bc15a75de3ad;p=gcc.git sse.md (define_mode_iterator VI4F_BRCST32x2): New. gcc/ * config/i386/sse.md (define_mode_iterator VI4F_BRCST32x2): New. (define_mode_attr 64x2_mode): Ditto. (define_mode_attr 32x2mode): Ditto. (define_insn "avx512dq_broadcast" with VI4F_BRCST32x2): Ditto. (define_insn "avx512vl_broadcast_1" with V16FI mode iterator): Ditto. (define_insn "avx512dq_broadcast_1" with V16FI): Ditto. (define_insn "avx512dq_broadcast_1" with VI8F_BRCST64x2): Ditto. Co-Authored-By: Andrey Turetskiy Co-Authored-By: Anna Tikhonova Co-Authored-By: Ilya Tocar Co-Authored-By: Ilya Verbin Co-Authored-By: Kirill Yukhin Co-Authored-By: Maxim Kuznetsov Co-Authored-By: Michael Zolotukhin From-SVN: r214309 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9e30a61b18b..4023a3105cd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,25 @@ +2014-08-22 Alexander Ivchenko + Maxim Kuznetsov + Anna Tikhonova + Ilya Tocar + Andrey Turetskiy + Ilya Verbin + Kirill Yukhin + Michael Zolotukhin + + * config/i386/sse.md + (define_mode_iterator VI4F_BRCST32x2): New. + (define_mode_attr 64x2_mode): Ditto. + (define_mode_attr 32x2mode): Ditto. + (define_insn "avx512dq_broadcast" + with VI4F_BRCST32x2): Ditto. + (define_insn "avx512vl_broadcast_1" + with V16FI mode iterator): Ditto. + (define_insn "avx512dq_broadcast_1" + with V16FI): Ditto. + (define_insn "avx512dq_broadcast_1" + with VI8F_BRCST64x2): Ditto. + 2014-08-22 Alexander Ivchenko Maxim Kuznetsov Anna Tikhonova diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 3acae748733..04ed6bd7df2 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -14514,6 +14514,74 @@ (set_attr "prefix" "vex") (set_attr "mode" "")]) +;; For broadcast[i|f]32x2. Yes there is no v4sf version, only v4si. +(define_mode_iterator VI4F_BRCST32x2 + [V16SI (V8SI "TARGET_AVX512VL") (V4SI "TARGET_AVX512VL") + V16SF (V8SF "TARGET_AVX512VL")]) + +(define_mode_attr 64x2mode + [(V8DF "V2DF") (V8DI "V2DI") (V4DI "V2DI") (V4DF "V2DF")]) + +(define_mode_attr 32x2mode + [(V16SF "V2SF") (V16SI "V2SI") (V8SI "V2SI") + (V8SF "V2SF") (V4SI "V2SI")]) + +(define_insn "avx512dq_broadcast" + [(set (match_operand:VI4F_BRCST32x2 0 "register_operand" "=v") + (vec_duplicate:VI4F_BRCST32x2 + (vec_select:<32x2mode> + (match_operand: 1 "nonimmediate_operand" "vm") + (parallel [(const_int 0) (const_int 1)]))))] + "TARGET_AVX512DQ" + "vbroadcast32x2\t{%1, %0|%0, %1}" + [(set_attr "type" "ssemov") + (set_attr "prefix_extra" "1") + (set_attr "prefix" "evex") + (set_attr "mode" "")]) + +(define_insn "avx512vl_broadcast_1" + [(set (match_operand:VI4F_256 0 "register_operand" "=v,v") + (vec_duplicate:VI4F_256 + (match_operand: 1 "nonimmediate_operand" "v,m")))] + "TARGET_AVX512VL" + "@ + vshuf32x4\t{$0x0, %t1, %t1, %0|%0, %t1, %t1, 0x0} + vbroadcast32x4\t{%1, %0|%0, %1}" + [(set_attr "type" "ssemov") + (set_attr "prefix_extra" "1") + (set_attr "prefix" "evex") + (set_attr "mode" "")]) + +(define_insn "avx512dq_broadcast_1" + [(set (match_operand:V16FI 0 "register_operand" "=v,v") + (vec_duplicate:V16FI + (match_operand: 1 "nonimmediate_operand" "v,m")))] + "TARGET_AVX512DQ" + "@ + vshuf32x4\t{$0x44, %g1, %g1, %0|%0, %g1, %g1, 0x44} + vbroadcast32x8\t{%1, %0|%0, %1}" + [(set_attr "type" "ssemov") + (set_attr "prefix_extra" "1") + (set_attr "prefix" "evex") + (set_attr "mode" "")]) + +;; For broadcast[i|f]64x2 +(define_mode_iterator VI8F_BRCST64x2 + [V8DI V8DF (V4DI "TARGET_AVX512VL") (V4DF "TARGET_AVX512VL")]) + +(define_insn "avx512dq_broadcast_1" + [(set (match_operand:VI8F_BRCST64x2 0 "register_operand" "=v,v") + (vec_duplicate:VI8F_BRCST64x2 + (match_operand:<64x2mode> 1 "nonimmediate_operand" "v,m")))] + "TARGET_AVX512DQ" + "@ + vshuf64x2\t{$0x0, %g1, %g1, %0|%0, %g1, %g1, 0x0} + vbroadcast64x2\t{%1, %0|%0, %1}" + [(set_attr "type" "ssemov") + (set_attr "prefix_extra" "1") + (set_attr "prefix" "evex") + (set_attr "mode" "")]) + (define_insn "avx512cd_maskb_vec_dup" [(set (match_operand:VI8_AVX512VL 0 "register_operand" "=v") (vec_duplicate:VI8_AVX512VL