On Wed, 10 Mar 2021, Joel Hutton wrote:

> Hi all,
> 
> This patch fixes PR99102. For masked gather loads/scatter stores the
> 'loop_masks' variable was checked to be non-null, but the 'final_mask' was the
> actual mask used.
> 
> bootstrapped and regression tested on aarch64. Regression tested on 
> aarch64_sve
> under qemu.

OK.

Thanks,
Richard.

> 
>  [Vect] Fix mask check on Scatter loads/stores
> 
> Previously, IFN_MASK_SCATTER_STORE was used if 'loop_masks' was
> non-null, but the mask used is 'final_mask'. This caused a bug where
> a 'MASK_STORE' was vectorized into a 'SCATTER_STORE' instead of a
> 'MASK_SCATTER_STORE'. This fixes PR target/99102.
> 
> gcc/ChangeLog:
> 
>       PR target/99102
>       * tree-vect-stmts.c (vectorizable_store): Fix scatter store mask
>       check condition.
>       (vectorizable_load): Fix gather load mask check condition.
> 
> gcc/testsuite/ChangeLog:
> 
>       PR target/99102
>       * gcc.target/aarch64/sve/pr99102.c: New test.
> 

-- 
Richard Biener <rguent...@suse.de>
SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg,
Germany; GF: Felix Imendörffer; HRB 36809 (AG Nuernberg)

Reply via email to