From 0148f0b699cd90ed3ba2d63a2f1e2aa70c0f3af2 Mon Sep 17 00:00:00 2001 From: Alexander Ivchenko Date: Mon, 18 Aug 2014 10:47:48 +0000 Subject: [PATCH] i386.md (define_attr "isa"): Add avx512dq, noavx512dq. gcc/ * config/i386/i386.md (define_attr "isa"): Add avx512dq, noavx512dq. (define_attr "enabled"): Ditto. * config/i386/sse.md (define_insn "vec_extract_hi_"): Support masking. 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: r214088 --- gcc/ChangeLog | 15 +++++++++++++++ gcc/config/i386/i386.md | 4 +++- gcc/config/i386/sse.md | 36 +++++++++++++++++++----------------- 3 files changed, 37 insertions(+), 18 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 814a428..c2d64b2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -7,6 +7,21 @@ Kirill Yukhin Michael Zolotukhin + * config/i386/i386.md + (define_attr "isa"): Add avx512dq, noavx512dq. + (define_attr "enabled"): Ditto. + * config/i386/sse.md + (define_insn "vec_extract_hi_"): Support masking. + +2014-08-18 Alexander Ivchenko + Maxim Kuznetsov + Anna Tikhonova + Ilya Tocar + Andrey Turetskiy + Ilya Verbin + Kirill Yukhin + Michael Zolotukhin + * config/i386/i386.c (ix86_expand_special_args_builtin): Handle avx512vl_storev8sf_mask, avx512vl_storev8si_mask, avx512vl_storev4df_mask, avx512vl_storev4di_mask, diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index b8ce6c0..3a797c8 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -741,7 +741,7 @@ (define_attr "isa" "base,x64,x64_sse4,x64_sse4_noavx,x64_avx,nox64, sse2,sse2_noavx,sse3,sse4,sse4_noavx,avx,noavx, avx2,noavx2,bmi,bmi2,fma4,fma,avx512f,noavx512f, - fma_avx512f,avx512bw,noavx512bw" + fma_avx512f,avx512bw,noavx512bw,avx512dq,noavx512dq" (const_string "base")) (define_attr "enabled" "" @@ -774,6 +774,8 @@ (symbol_ref "TARGET_FMA || TARGET_AVX512F") (eq_attr "isa" "avx512bw") (symbol_ref "TARGET_AVX512BW") (eq_attr "isa" "noavx512bw") (symbol_ref "!TARGET_AVX512BW") + (eq_attr "isa" "avx512dq") (symbol_ref "TARGET_AVX512DQ") + (eq_attr "isa" "noavx512dq") (symbol_ref "!TARGET_AVX512DQ") ] (const_int 1))) diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index ac3ed10..80dbf17 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -6131,6 +6131,25 @@ (set_attr "prefix" "evex") (set_attr "mode" "")]) +(define_insn "vec_extract_hi_" + [(set (match_operand: 0 "" "=,vm") + (vec_select: + (match_operand:V16FI 1 "register_operand" "v,v") + (parallel [(const_int 8) (const_int 9) + (const_int 10) (const_int 11) + (const_int 12) (const_int 13) + (const_int 14) (const_int 15)])))] + "TARGET_AVX512F && (! || TARGET_AVX512DQ)" + "@ + vextract32x8\t{$0x1, %1, %0|%0, %1, 0x1} + vextracti64x4\t{$0x1, %1, %0|%0, %1, 0x1}" + [(set_attr "type" "sselog1") + (set_attr "prefix_extra" "1") + (set_attr "isa" "avx512dq,noavx512dq") + (set_attr "length_immediate" "1") + (set_attr "prefix" "evex") + (set_attr "mode" "")]) + (define_expand "avx_vextractf128" [(match_operand: 0 "nonimmediate_operand") (match_operand:V_256 1 "register_operand") @@ -6177,23 +6196,6 @@ DONE; }) -(define_insn "vec_extract_hi_" - [(set (match_operand: 0 "nonimmediate_operand" "=v,m") - (vec_select: - (match_operand:V16FI 1 "nonimmediate_operand" "v,v") - (parallel [(const_int 8) (const_int 9) - (const_int 10) (const_int 11) - (const_int 12) (const_int 13) - (const_int 14) (const_int 15)])))] - "TARGET_AVX512F" - "vextracti64x4\t{$0x1, %1, %0|%0, %1, 0x1}" - [(set_attr "type" "sselog") - (set_attr "prefix_extra" "1") - (set_attr "length_immediate" "1") - (set_attr "memory" "none,store") - (set_attr "prefix" "evex") - (set_attr "mode" "XI")]) - (define_insn_and_split "vec_extract_lo_" [(set (match_operand: 0 "nonimmediate_operand" "=x,m") (vec_select: -- 2.7.4