On 11/03/2017 10:37 AM, Richard Sandiford wrote:
> extract_bit_field_1 tries to use vec_extract to extract part of a
> vector.  However, if that pattern isn't defined or if the operands
> aren't suitable, another good approach is to try a direct subreg
> reference.  This is particularly useful for multi-vector modes on
> SVE (e.g. when extracting one vector from an LD2 result).
> 
> The function would go on to try the same thing anyway, but only
> if there is an integer mode with the same size as the vector mode,
> which isn't true for SVE modes (and doesn't seem a good thing to
> require in general).  Even when there is an integer mode, doing the
> operation on the original modes avoids some unnecessary bitcasting.
> 
> Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64-linux-gnu.
> OK to install?
> 
> Richard
> 
> 
> 2017-11-03  Richard Sandiford  <richard.sandif...@linaro.org>
>           Alan Hayward  <alan.hayw...@arm.com>
>           David Sherwood  <david.sherw...@arm.com>
> 
> gcc/
>       * expmed.c (extract_bit_field_1): For vector extracts,
>       fall back to extract_bit_field_as_subreg if vec_extract
>       isn't available.
OK.
jeff

Reply via email to