[AArch64] Remove backend support for widen-sub

Joel Hutton Joel.Hutton@arm.com
Thu Jan 21 11:36:01 GMT 2021


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.


[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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove-widen-sub.patch
Type: text/x-patch
Size: 3942 bytes
Desc: remove-widen-sub.patch
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210121/f95e1ce1/attachment-0001.bin>


More information about the Gcc-patches mailing list