This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 1/2, x86] Add palignr support for AVX2.
- From: Richard Henderson <rth at redhat dot com>
- To: Evgeny Stupachenko <evstupac at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Biener <rguenther at suse dot de>, Uros Bizjak <ubizjak at gmail dot com>
- Date: Mon, 19 May 2014 08:32:07 -0700
- Subject: Re: [PATCH 1/2, x86] Add palignr support for AVX2.
- Authentication-results: sourceware.org; auth=none
- References: <CAOvf_xx3-VpgN8YDxJBPvzzNGNykUPoLdU6xThW_QBN7byy5rw at mail dot gmail dot com> <535E909A dot 7040205 at redhat dot com> <CAOvf_xygddE6yxkp=+SZtVz+bvVciH5YfH1Cwy1WxdPHCgrbtg at mail dot gmail dot com> <535EC233 dot 7000500 at redhat dot com> <CAOvf_xxq6PNN2KLpA8yoB2jjgmy-UAOvij_ghgsKPkZnsu2Rkg at mail dot gmail dot com>
On 05/05/2014 09:49 AM, Evgeny Stupachenko wrote:
> @@ -42946,6 +42948,10 @@ expand_vec_perm_1 (struct expand_vec_perm_d *d)
> if (expand_vec_perm_pshufb (d))
> return true;
> + /* Try the AVX2 vpshufb. */
> + if (expand_vec_perm_vpshufb2_vpermq (d))
> + return true;
Why is this here? It doesn't expand to 1 insn, which is
what expand_vec_perm_1 is intended to check.
It's already called from ix86_expand_vec_perm_const_1.
If things need to be shuffled around in that function,
then that's the right place to do so.
It's also clearly unrelated to "palignr", so has no
business at all within this patch.
> - min = nelt, max = 0;
> + min = 2 * nelt, max = 0;
This change to min is wrong for this patch. It probably
belonged in your 2/2 patch.
> + shift1 = GEN_INT ((min - nelt / 2) *
> + GET_MODE_BITSIZE (GET_MODE_INNER (d->vmode)));
Coding convention sez
shift1 = GEN_INT ((min - nelt / 2)
* GET_MODE_BITSIZE (GET_MODE_INNER (d->vmode)));