[PATCH X86, PR62128] Rotate pattern for AVX2

Uros Bizjak ubizjak@gmail.com
Wed Oct 1 06:26:00 GMT 2014


On Wed, Oct 1, 2014 at 12:13 AM, Evgeny Stupachenko <evstupac@gmail.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
trick.

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.

Uros.



More information about the Gcc-patches mailing list