From: Alexander Ivchenko Date: Tue, 14 Oct 2014 08:26:09 +0000 (+0000) Subject: AVX-512. 62/n. Add vpmaddubsw,vdbpsadbw insn patterns. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5f64b49668022924dcb057e3f262facac7a93a69;p=gcc.git AVX-512. 62/n. Add vpmaddubsw,vdbpsadbw insn patterns. gcc/ * config/i386/sse.md (define_c_enum "unspec"): Add UNSPEC_DBPSADBW, UNSPEC_PMADDUBSW512. (define_insn "avx512bw_pmaddubsw512"): New. (define_insn "avx512bw_dbpsadbw"): 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: r216180 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5806e05d601..ff14980dd31 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,18 @@ +2014-10-14 Alexander Ivchenko + Maxim Kuznetsov + Anna Tikhonova + Ilya Tocar + Andrey Turetskiy + Ilya Verbin + Kirill Yukhin + Michael Zolotukhin + + * config/i386/sse.md + (define_c_enum "unspec"): Add UNSPEC_DBPSADBW, UNSPEC_PMADDUBSW512. + (define_insn "avx512bw_pmaddubsw512"): New. + (define_insn "avx512bw_dbpsadbw"): + Ditto. + 2014-10-14 Alexander Ivchenko Maxim Kuznetsov Anna Tikhonova diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index a760f535341..a71f969535c 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -130,6 +130,8 @@ UNSPEC_SHA256RNDS2 ;; For AVX512BW support + UNSPEC_DBPSADBW + UNSPEC_PMADDUBSW512 UNSPEC_PSHUFHW UNSPEC_PSHUFLW @@ -13236,6 +13238,20 @@ (set_attr "prefix" "vex") (set_attr "mode" "OI")]) +;; The correct representation for this is absolutely enormous, and +;; surely not generally useful. +(define_insn "avx512bw_pmaddubsw512" + [(set (match_operand:VI2_AVX512VL 0 "register_operand" "=v") + (unspec:VI2_AVX512VL + [(match_operand: 1 "register_operand" "v") + (match_operand: 2 "nonimmediate_operand" "vm")] + UNSPEC_PMADDUBSW512))] + "TARGET_AVX512BW" + "vpmaddubsw\t{%2, %1, %0|%0, %1, %2}"; + [(set_attr "type" "sseiadd") + (set_attr "prefix" "evex") + (set_attr "mode" "XI")]) + (define_insn "ssse3_pmaddubsw128" [(set (match_operand:V8HI 0 "register_operand" "=x,x") (ss_plus:V8HI @@ -17902,6 +17918,23 @@ [(set_attr "prefix" "evex") (set_attr "mode" "")]) +;; The correct representation for this is absolutely enormous, and +;; surely not generally useful. +(define_insn "avx512bw_dbpsadbw" + [(set (match_operand:VI2_AVX512VL 0 "register_operand" "=v") + (unspec:VI2_AVX512VL + [(match_operand: 1 "register_operand" "v") + (match_operand: 2 "nonimmediate_operand" "vm") + (match_operand:SI 3 "const_0_to_255_operand")] + UNSPEC_DBPSADBW))] + "TARGET_AVX512BW" + "vdbpsadbw\t{%3, %2, %1, %0|%0, %1, %2, %3}" + [(set_attr "isa" "avx") + (set_attr "type" "sselog1") + (set_attr "length_immediate" "1") + (set_attr "prefix" "evex") + (set_attr "mode" "")]) + (define_insn "clz2" [(set (match_operand:VI48_AVX512VL 0 "register_operand" "=v") (clz:VI48_AVX512VL