On Thu, Jan 21, 2021 at 12:37 PM Joel Hutton via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> Hi all,
>
> This patch removes support for the widening subtract operation in the aarch64 
> backend as it is causing a performance regression.
>
> In the following example:
>
> #include <stdint.h>
> extern void wdiff( int16_t d[16], uint8_t *restrict pix1, uint8_t *restrict 
> pix2)
> {
>    for( int y = 0; y < 4; y++ )
>   {
>     for( int x = 0; x < 4; x++ )
>       d[x + y*4] = pix1[x] - pix2[x];
>     pix1 += 16;
>     pix2 += 16;
>  }
>
> The widening minus pattern is recognized and substituted, but cannot be used 
> due to the input vector type chosen in slp vectorization. This results in an 
> attempt to do an 8 byte->8 short widening subtract operation, which is not 
> supported.
>
> The issue is documented in PR 98772.

But it's not analyzed.  The fix is clearly not to remove the support
for this pattern but fix
what goes wrong in detecting it.

Richard.

>
> [AArch64] Remove backend support for widen-sub
>
> This patch removes support for the widening subtract operation in the aarch64 
> backend as it is causing a performance regression.
>
> gcc/ChangeLog:
>
>         * config/aarch64/aarch64-simd.md
>         (vec_widen_<su>subl_lo_<mode>): Removed.
>         (vec_widen_<su>subl_hi_<mode>): Removed.
>
> gcc/testsuite/ChangeLog:
>
>         * gcc.target/aarch64/vect-widen-sub.c: Removed.

Reply via email to