This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH X86, PR62128] Rotate pattern for AVX2
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Evgeny Stupachenko <evstupac at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Henderson <rth at redhat dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>, Jakub Jelinek <jakub at redhat dot com>
- Date: Wed, 1 Oct 2014 08:26:27 +0200
- Subject: Re: [PATCH X86, PR62128] Rotate pattern for AVX2
- Authentication-results: sourceware.org; auth=none
- References: <CAOvf_xytRo3-vFOdbOuDibk3LCsWrAMsqe1Vd_uSg+QwA71+XA at mail dot gmail dot com> <CAFULd4axXUAuf655zX0NTr13NmDSHF-jqZnZkQAQ-VYqefpqCQ at mail dot gmail dot com> <CAFULd4Y5-mUyU0NcXg+vtidbPuGCM=Tw20M5=k88kouCGPMk-g at mail dot gmail dot com> <CAFULd4Y2yiRW+bWcb7JW6aW_Qmk_E34DT0Y5-=ALjrR9eikBgg at mail dot gmail dot com> <CAOvf_xxcEftax3_j5-TaXL3LDfO-tVeGuaGK1Yb3Lj8A9J0TZw at mail dot gmail dot com>
On Wed, Oct 1, 2014 at 12:13 AM, Evgeny Stupachenko <email@example.com> wrote:
> expand_vselect for some reason ignores the expander.
> Does it work with expanders?
> The comment talks about insn only:
> /* Construct (set target (vec_select op0 (parallel perm))) and
> return true if that's a valid instruction in the active ISA. */
It looks to me that the whole approach is wrong from the beginning.
There is already a function that generates perm/palignr sequence,
conveniently named expand_vec_perm_palignr. This function should be
extended to handle AVX2 sequence. You don't have to add any new
patterns, existing avx2_permv2ti and avx2_palignr2ti should do the
And, as said by H.J., please add the testcase from the PR that will
exercise the code path. Without the testcase included, the patch is
unreviewable, and this is the reason why no maintainer (including me)
wants to approve it in its current form.