AVX-512. Add vcvtps2[u]qq patterns.
authorAlexander Ivchenko <alexander.ivchenko@intel.com>
Thu, 28 Aug 2014 06:28:56 +0000 (06:28 +0000)
committerKirill Yukhin <kyukhin@gcc.gnu.org>
Thu, 28 Aug 2014 06:28:56 +0000 (06:28 +0000)
gcc/
* config/i386/sse.md
(define_mode_iterator VI8_256_512): New.
(define_insn "<mask_codefor>avx512dq_cvtps2qq<mode><mask_name><round_name>"):
Ditto.
(define_insn "<mask_codefor>avx512dq_cvtps2qqv2di<mask_name>"): Ditto.
(define_insn "<mask_codefor>avx512dq_cvtps2uqq<mode><mask_name><round_name>"):
Ditto.
(define_insn "<mask_codefor>avx512dq_cvtps2uqqv2di<mask_name>"): Ditto.

Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Anna Tikhonova <anna.tikhonova@intel.com>
Co-Authored-By: Ilya Tocar <ilya.tocar@intel.com>
Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>
Co-Authored-By: Kirill Yukhin <kirill.yukhin@intel.com>
Co-Authored-By: Maxim Kuznetsov <maxim.kuznetsov@intel.com>
Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com>
From-SVN: r214668

gcc/ChangeLog
gcc/config/i386/sse.md

index 9e350980f1137aa750b2aa2f9c79a576cfe3e0d2..a758ff40bf1f0320069d221099816ab397d30c3b 100644 (file)
@@ -1,3 +1,21 @@
+2014-08-28  Alexander Ivchenko  <alexander.ivchenko@intel.com>
+           Maxim Kuznetsov  <maxim.kuznetsov@intel.com>
+           Anna Tikhonova  <anna.tikhonova@intel.com>
+           Ilya Tocar  <ilya.tocar@intel.com>
+           Andrey Turetskiy  <andrey.turetskiy@intel.com>
+           Ilya Verbin  <ilya.verbin@intel.com>
+           Kirill Yukhin  <kirill.yukhin@intel.com>
+           Michael Zolotukhin  <michael.v.zolotukhin@intel.com>
+
+       * config/i386/sse.md
+       (define_mode_iterator VI8_256_512): New.
+       (define_insn "<mask_codefor>avx512dq_cvtps2qq<mode><mask_name><round_name>"):
+       Ditto.
+       (define_insn "<mask_codefor>avx512dq_cvtps2qqv2di<mask_name>"): Ditto.
+       (define_insn "<mask_codefor>avx512dq_cvtps2uqq<mode><mask_name><round_name>"):
+       Ditto.
+       (define_insn "<mask_codefor>avx512dq_cvtps2uqqv2di<mask_name>"): Ditto.
+
 2014-08-28  Richard Sandiford  <rdsandiford@googlemail.com>
 
        * varasm.c (compute_reloc_for_rtx_1): Take a const_rtx.  Remove the
index c0a79dfc2359c09bf1685d0ffa8fe92ab8024666..5904450d453e9863f2ef2fe48595236269034835 100644 (file)
 (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])
 
    (set_attr "prefix" "evex")
    (set_attr "mode" "<sseinsnmode>")])
 
+(define_insn "<mask_codefor>avx512dq_cvtps2qq<mode><mask_name><round_name>"
+  [(set (match_operand:VI8_256_512 0 "register_operand" "=v")
+       (unspec:VI8_256_512 [(match_operand:<ssePSmode2> 1 "nonimmediate_operand" "<round_constraint>")]
+                    UNSPEC_FIX_NOTRUNC))]
+  "TARGET_AVX512DQ && <round_mode512bit_condition>"
+  "vcvtps2qq\t{<round_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_mask_op2>}"
+  [(set_attr "type" "ssecvt")
+   (set_attr "prefix" "evex")
+   (set_attr "mode" "<sseinsnmode>")])
+
+(define_insn "<mask_codefor>avx512dq_cvtps2qqv2di<mask_name>"
+  [(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<mask_operand2>|%0<mask_operand2>, %1}"
+  [(set_attr "type" "ssecvt")
+   (set_attr "prefix" "evex")
+   (set_attr "mode" "TI")])
+
+(define_insn "<mask_codefor>avx512dq_cvtps2uqq<mode><mask_name><round_name>"
+  [(set (match_operand:VI8_256_512 0 "register_operand" "=v")
+       (unspec:VI8_256_512 [(match_operand:<ssePSmode2> 1 "nonimmediate_operand" "<round_constraint>")]
+                    UNSPEC_UNSIGNED_FIX_NOTRUNC))]
+  "TARGET_AVX512DQ && <round_mode512bit_condition>"
+  "vcvtps2uqq\t{<round_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_mask_op2>}"
+  [(set_attr "type" "ssecvt")
+   (set_attr "prefix" "evex")
+   (set_attr "mode" "<sseinsnmode>")])
+
+(define_insn "<mask_codefor>avx512dq_cvtps2uqqv2di<mask_name>"
+  [(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<mask_operand2>|%0<mask_operand2>, %1}"
+  [(set_attr "type" "ssecvt")
+   (set_attr "prefix" "evex")
+   (set_attr "mode" "TI")])
+
 (define_insn "<fixsuffix>fix_truncv16sfv16si2<mask_name><round_saeonly_name>"
   [(set (match_operand:V16SI 0 "register_operand" "=v")
        (any_fix:V16SI