From dc3b8d27d4b98cb35404713f6dcb9017f583c2c8 Mon Sep 17 00:00:00 2001 From: Alexander Ivchenko Date: Thu, 28 Aug 2014 06:28:56 +0000 Subject: [PATCH] AVX-512. Add vcvtps2[u]qq patterns. gcc/ * config/i386/sse.md (define_mode_iterator VI8_256_512): New. (define_insn "avx512dq_cvtps2qq"): Ditto. (define_insn "avx512dq_cvtps2qqv2di"): Ditto. (define_insn "avx512dq_cvtps2uqq"): Ditto. (define_insn "avx512dq_cvtps2uqqv2di"): 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: r214668 --- gcc/ChangeLog | 18 ++++++++++++++++ gcc/config/i386/sse.md | 49 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9e350980f11..a758ff40bf1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,21 @@ +2014-08-28 Alexander Ivchenko + Maxim Kuznetsov + Anna Tikhonova + Ilya Tocar + Andrey Turetskiy + Ilya Verbin + Kirill Yukhin + Michael Zolotukhin + + * config/i386/sse.md + (define_mode_iterator VI8_256_512): New. + (define_insn "avx512dq_cvtps2qq"): + Ditto. + (define_insn "avx512dq_cvtps2qqv2di"): Ditto. + (define_insn "avx512dq_cvtps2uqq"): + Ditto. + (define_insn "avx512dq_cvtps2uqqv2di"): Ditto. + 2014-08-28 Richard Sandiford * varasm.c (compute_reloc_for_rtx_1): Take a const_rtx. Remove the diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index c0a79dfc235..5904450d453 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -278,6 +278,9 @@ (define_mode_iterator VI8_AVX512VL [V8DI (V4DI "TARGET_AVX512VL") (V2DI "TARGET_AVX512VL")]) +(define_mode_iterator VI8_256_512 + [V8DI (V4DI "TARGET_AVX512VL")]) + (define_mode_iterator VI1_AVX2 [(V32QI "TARGET_AVX2") V16QI]) @@ -3911,6 +3914,52 @@ (set_attr "prefix" "evex") (set_attr "mode" "")]) +(define_insn "avx512dq_cvtps2qq" + [(set (match_operand:VI8_256_512 0 "register_operand" "=v") + (unspec:VI8_256_512 [(match_operand: 1 "nonimmediate_operand" "")] + UNSPEC_FIX_NOTRUNC))] + "TARGET_AVX512DQ && " + "vcvtps2qq\t{%1, %0|%0, %1}" + [(set_attr "type" "ssecvt") + (set_attr "prefix" "evex") + (set_attr "mode" "")]) + +(define_insn "avx512dq_cvtps2qqv2di" + [(set (match_operand:V2DI 0 "register_operand" "=v") + (unspec:V2DI + [(vec_select:V2SF + (match_operand:V4SF 1 "nonimmediate_operand" "vm") + (parallel [(const_int 0) (const_int 1)]))] + UNSPEC_FIX_NOTRUNC))] + "TARGET_AVX512DQ && TARGET_AVX512VL" + "vcvtps2qq\t{%1, %0|%0, %1}" + [(set_attr "type" "ssecvt") + (set_attr "prefix" "evex") + (set_attr "mode" "TI")]) + +(define_insn "avx512dq_cvtps2uqq" + [(set (match_operand:VI8_256_512 0 "register_operand" "=v") + (unspec:VI8_256_512 [(match_operand: 1 "nonimmediate_operand" "")] + UNSPEC_UNSIGNED_FIX_NOTRUNC))] + "TARGET_AVX512DQ && " + "vcvtps2uqq\t{%1, %0|%0, %1}" + [(set_attr "type" "ssecvt") + (set_attr "prefix" "evex") + (set_attr "mode" "")]) + +(define_insn "avx512dq_cvtps2uqqv2di" + [(set (match_operand:V2DI 0 "register_operand" "=v") + (unspec:V2DI + [(vec_select:V2SF + (match_operand:V4SF 1 "nonimmediate_operand" "vm") + (parallel [(const_int 0) (const_int 1)]))] + UNSPEC_UNSIGNED_FIX_NOTRUNC))] + "TARGET_AVX512DQ && TARGET_AVX512VL" + "vcvtps2uqq\t{%1, %0|%0, %1}" + [(set_attr "type" "ssecvt") + (set_attr "prefix" "evex") + (set_attr "mode" "TI")]) + (define_insn "fix_truncv16sfv16si2" [(set (match_operand:V16SI 0 "register_operand" "=v") (any_fix:V16SI -- 2.30.2