From: Alexander Ivchenko Date: Tue, 14 Oct 2014 08:35:12 +0000 (+0000) Subject: AVX-512. 66/n. Extend vpalignr insn patterns. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b99ba39a8470a3641e04463b0971a0f9eb4aaa5a;p=gcc.git AVX-512. 66/n. Extend vpalignr insn patterns. gcc/ * config/i386/sse.md (define_mode_iterator SSESCALARMODE): Add V4TI mode. (define_insn "_palignr_mask"): New. (define_insn "_palignr"): Add EVEX version. 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: r216183 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 646ec011671..6553b2151bb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,17 @@ +2014-10-14 Alexander Ivchenko + Maxim Kuznetsov + Anna Tikhonova + Ilya Tocar + Andrey Turetskiy + Ilya Verbin + Kirill Yukhin + Michael Zolotukhin + + * config/i386/sse.md + (define_mode_iterator SSESCALARMODE): Add V4TI mode. + (define_insn "_palignr_mask"): New. + (define_insn "_palignr"): Add EVEX version. + 2014-10-14 Alexander Ivchenko Maxim Kuznetsov Anna Tikhonova diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 18614ca67ad..135cb047a92 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -350,7 +350,7 @@ ;; ??? This should probably be dropped in favor of VIMAX_AVX2. (define_mode_iterator SSESCALARMODE - [(V2TI "TARGET_AVX2") TI]) + [(V4TI "TARGET_AVX512BW") (V2TI "TARGET_AVX2") TI]) (define_mode_iterator VI12_AVX2 [(V64QI "TARGET_AVX512BW") (V32QI "TARGET_AVX2") V16QI @@ -13455,11 +13455,33 @@ (set (attr "prefix_rex") (symbol_ref "x86_extended_reg_mentioned_p (insn)")) (set_attr "mode" "DI")]) +(define_insn "_palignr_mask" + [(set (match_operand:VI1_AVX2 0 "register_operand" "=v") + (vec_merge:VI1_AVX2 + (unspec:VI1_AVX2 + [(match_operand:VI1_AVX2 1 "register_operand" "v") + (match_operand:VI1_AVX2 2 "nonimmediate_operand" "vm") + (match_operand:SI 3 "const_0_to_255_mul_8_operand" "n")] + UNSPEC_PALIGNR) + (match_operand:VI1_AVX2 4 "vector_move_operand" "0C") + (match_operand: 5 "register_operand" "Yk")))] + "TARGET_AVX512BW && ( == 64 || TARGET_AVX512VL)" +{ + operands[3] = GEN_INT (INTVAL (operands[3]) / 8); + return "vpalignr\t{%3, %2, %1, %0%{%5%}%N4|%0%{%5%}%N4, %1, %2, %3}"; +} + [(set_attr "type" "sseishft") + (set_attr "atom_unit" "sishuf") + (set_attr "prefix_extra" "1") + (set_attr "length_immediate" "1") + (set_attr "prefix" "evex") + (set_attr "mode" "")]) + (define_insn "_palignr" - [(set (match_operand:SSESCALARMODE 0 "register_operand" "=x,x") + [(set (match_operand:SSESCALARMODE 0 "register_operand" "=x,v") (unspec:SSESCALARMODE - [(match_operand:SSESCALARMODE 1 "register_operand" "0,x") - (match_operand:SSESCALARMODE 2 "nonimmediate_operand" "xm,xm") + [(match_operand:SSESCALARMODE 1 "register_operand" "0,v") + (match_operand:SSESCALARMODE 2 "nonimmediate_operand" "xm,vm") (match_operand:SI 3 "const_0_to_255_mul_8_operand" "n,n")] UNSPEC_PALIGNR))] "TARGET_SSSE3"