[PATCH] rs6000: Expand vec_insert in expander instead of gimple [PR79251]

Richard Biener richard.guenther@gmail.com
Thu Sep 3 10:29:49 GMT 2020


On Thu, Sep 3, 2020 at 11:20 AM luoxhu <luoxhu@linux.ibm.com> wrote:
>
>
>
> On 2020/9/2 17:30, Richard Biener wrote:
> >> so maybe bypass convert_vector_to_array_for_subscript for special circumstance
> >> like "i = v[n%4]" or "v[n&3]=i" to generate vec_extract or vec_insert builtin
> >> call a relative simpler method?
> > I think you have it backward.  You need to work with what
> > convert_vector_to_array_for_subscript
> > gives and deal with it during RTL expansion / optimization to generate
> > more optimal
> > code for power.  The goal is to have as little target specific
> > builtins during the GIMPLE
> > optimization phase (because we cannot work out its semantics in optimizers).
>
> OK, got it, will add optabs vec_insert and expand "VIEW_CONVERT_EXPR<int[4]>(v1)[_1] = i_6(D);"
> expressions to rs6000_expand_vector_insert instead of builtin call.
> vec_extract already has optabs and "i = v[n%4]" should be in another patch
> after this.

There is already vec_set and vec_extract - the question is whether the expander
tries those for variable index.

Richard.

>
> Thanks,
> Xionghu
>


More information about the Gcc-patches mailing list