From 6afcac32436a1ac52c1fd41291d0d240bc870e6c Mon Sep 17 00:00:00 2001 From: Ilya Tocar Date: Tue, 21 Oct 2014 09:51:49 +0000 Subject: [PATCH] i386.c (expand_vec_perm_1): Fix expand_vec_perm_palignr case. * config/i386/i386.c (expand_vec_perm_1): Fix expand_vec_perm_palignr case. * config/i386/sse.md (_palignr_mask): Use VI1_AVX512. From-SVN: r216504 --- gcc/ChangeLog | 7 +++++++ gcc/config/i386/i386.c | 1 + gcc/config/i386/sse.md | 12 ++++++------ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f7dedb56edf..87a4102038d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2014-10-21 Ilya Tocar + + * config/i386/i386.c (expand_vec_perm_1): Fix + expand_vec_perm_palignr case. + * config/i386/sse.md (_palignr_mask): Use + VI1_AVX512. + 2014-10-21 Zhenqiang Chen * cfgloopanal.c (seq_cost): Delete. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 33b21f442e8..34273ca12de 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -43552,6 +43552,7 @@ expand_vec_perm_1 (struct expand_vec_perm_d *d) /* Try the AVX2 vpalignr instruction. */ if (expand_vec_perm_palignr (d, true)) + return true; /* Try the AVX512F vpermi2 instructions. */ if (ix86_expand_vec_perm_vpermi2 (NULL_RTX, NULL_RTX, NULL_RTX, NULL_RTX, d)) diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 81570459eb7..a3f336fa15f 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -13716,14 +13716,14 @@ (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") + [(set (match_operand:VI1_AVX512 0 "register_operand" "=v") + (vec_merge:VI1_AVX512 + (unspec:VI1_AVX512 + [(match_operand:VI1_AVX512 1 "register_operand" "v") + (match_operand:VI1_AVX512 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:VI1_AVX512 4 "vector_move_operand" "0C") (match_operand: 5 "register_operand" "Yk")))] "TARGET_AVX512BW && ( == 64 || TARGET_AVX512VL)" { -- 2.30.2