On Fri, May 21, 2021 at 3:19 PM Richard Biener <rguent...@suse.de> wrote:
>
> This adds support for the clang __builtin_shufflevector extension to
> the C and C++ frontends.  The builtin is lowered to VEC_PERM_EXPR.
> Because VEC_PERM_EXPR does not support different sized vector inputs
> or result or the special permute index of -1 (don't-care)
> c_build_shufflevector applies lowering by widening inputs and output
> to the widest vector, replacing -1 by a defined index and
> subsetting the final vector if we produced a wider result than
> desired.
>
> Code generation thus can be sub-optimal, followup patches will
> aim to fix that by recovering from part of the missing features
> during RTL expansion and by relaxing the constraints of the GIMPLE
> IL with regard to VEC_PERM_EXPR.
>
> Bootstrapped on x86_64-unknown-linux-gnu, (re-)testing in progress.
>
> Honza - you've filed PR88601, can you point me to testcases that
> exercise common uses so we can look at code generation quality
> and where time is spent best in improving things?
>
> OK for trunk?

Updated patch with added documentation and the C++ testcases
moved to g++.dg/ext/

Richard.

Attachment: p
Description: Binary data

Reply via email to