From 3616dc706e703902088fcf055af5da7d410ea18f Mon Sep 17 00:00:00 2001 From: Alexander Ivchenko Date: Fri, 22 Aug 2014 10:07:41 +0000 Subject: [PATCH] subst.md (define_subst_attr "mask_avx512bw_condition"): New. gcc/ * config/i386/subst.md (define_subst_attr "mask_avx512bw_condition"): New. * config/i386/sse.md (define_mode_iterator VI248_AVX2): Delete. (define_mode_iterator VI2_AVX2_AVX512BW): New. (define_mode_iterator VI48_AVX2): Ditto. (define_insn 3): Delete. (define_insn "3" with VI2_AVX2_AVX512BW): New. (define_insn "3" with VI48_AVX2): 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: r214310 --- gcc/ChangeLog | 21 ++++++++++++++++++++ gcc/config/i386/sse.md | 41 ++++++++++++++++++++++++++++++---------- gcc/config/i386/subst.md | 1 + 3 files changed, 53 insertions(+), 10 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4023a3105cd..afae0ada54a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,24 @@ +2014-08-22 Alexander Ivchenko + Maxim Kuznetsov + Anna Tikhonova + Ilya Tocar + Andrey Turetskiy + Ilya Verbin + Kirill Yukhin + Michael Zolotukhin + + * config/i386/subst.md (define_subst_attr "mask_avx512bw_condition"): + New. + * config/i386/sse.md + (define_mode_iterator VI248_AVX2): Delete. + (define_mode_iterator VI2_AVX2_AVX512BW): New. + (define_mode_iterator VI48_AVX2): Ditto. + (define_insn 3): Delete. + (define_insn "3" with + VI2_AVX2_AVX512BW): New. + (define_insn "3" with + VI48_AVX2): 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 04ed6bd7df2..5084892f221 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -347,9 +347,11 @@ (V16HI "TARGET_AVX2") V8HI (V8SI "TARGET_AVX2") V4SI]) -(define_mode_iterator VI248_AVX2 - [(V16HI "TARGET_AVX2") V8HI - (V8SI "TARGET_AVX2") V4SI +(define_mode_iterator VI2_AVX2_AVX512BW + [(V32HI "TARGET_AVX512BW") (V16HI "TARGET_AVX2") V8HI]) + +(define_mode_iterator VI48_AVX2 + [(V8SI "TARGET_AVX2") V4SI (V4DI "TARGET_AVX2") V2DI]) (define_mode_iterator VI248_AVX2_8_AVX512F @@ -8584,15 +8586,34 @@ (const_string "0"))) (set_attr "mode" "")]) -(define_insn "3" - [(set (match_operand:VI248_AVX2 0 "register_operand" "=x,x") - (any_lshift:VI248_AVX2 - (match_operand:VI248_AVX2 1 "register_operand" "0,x") - (match_operand:SI 2 "nonmemory_operand" "xN,xN")))] - "TARGET_SSE2" +(define_insn "3" + [(set (match_operand:VI2_AVX2_AVX512BW 0 "register_operand" "=x,v") + (any_lshift:VI2_AVX2_AVX512BW + (match_operand:VI2_AVX2_AVX512BW 1 "register_operand" "0,v") + (match_operand:SI 2 "nonmemory_operand" "xN,vN")))] + "TARGET_SSE2 && && " + "@ + p\t{%2, %0|%0, %2} + vp\t{%2, %1, %0|%0, %1, %2}" + [(set_attr "isa" "noavx,avx") + (set_attr "type" "sseishft") + (set (attr "length_immediate") + (if_then_else (match_operand 2 "const_int_operand") + (const_string "1") + (const_string "0"))) + (set_attr "prefix_data16" "1,*") + (set_attr "prefix" "orig,vex") + (set_attr "mode" "")]) + +(define_insn "3" + [(set (match_operand:VI48_AVX2 0 "register_operand" "=x,v") + (any_lshift:VI48_AVX2 + (match_operand:VI48_AVX2 1 "register_operand" "0,v") + (match_operand:SI 2 "nonmemory_operand" "xN,vN")))] + "TARGET_SSE2 && " "@ p\t{%2, %0|%0, %2} - vp\t{%2, %1, %0|%0, %1, %2}" + vp\t{%2, %1, %0|%0, %1, %2}" [(set_attr "isa" "noavx,avx") (set_attr "type" "sseishft") (set (attr "length_immediate") diff --git a/gcc/config/i386/subst.md b/gcc/config/i386/subst.md index edb0965ab3d..b05cb17053d 100644 --- a/gcc/config/i386/subst.md +++ b/gcc/config/i386/subst.md @@ -56,6 +56,7 @@ (define_subst_attr "mask_operand_arg34" "mask" "" ", operands[3], operands[4]") (define_subst_attr "mask_mode512bit_condition" "mask" "1" "( == 64 || TARGET_AVX512VL)") (define_subst_attr "mask_avx512vl_condition" "mask" "1" "TARGET_AVX512VL") +(define_subst_attr "mask_avx512bw_condition" "mask" "1" "TARGET_AVX512BW") (define_subst_attr "store_mask_constraint" "mask" "vm" "v") (define_subst_attr "store_mask_predicate" "mask" "nonimmediate_operand" "register_operand") (define_subst_attr "mask_prefix" "mask" "vex" "evex") -- 2.30.2