]> git.ipfire.org Git - thirdparty/gcc.git/commit
[aarch64][vect] Support V8QI->V8HI WIDEN_ patterns
authorJoel Hutton <joel.hutton@arm.com>
Thu, 11 Feb 2021 14:59:26 +0000 (14:59 +0000)
committerJoel Hutton <joel.hutton@arm.com>
Thu, 11 Feb 2021 15:04:59 +0000 (15:04 +0000)
commit4af29981ab57ad7ef4467e371e4145cce9c16eaa
treea462a2e43e923cb3cab8caa4694f51e53dff6519
parentff6903288d96aa1d28ae4912b1270985475f3ba8
[aarch64][vect] Support V8QI->V8HI WIDEN_ patterns

In the case where 8 out of every 16 elements are widened using a
widening pattern and the next 8 are skipped, the patterns are not
recognized. This is because they are normally used in a pair, such  as
VEC_WIDEN_MINUS_HI/LO, to achieve a v16qi->v16hi conversion for example.
This patch adds support for V8QI->V8HI patterns.

gcc/ChangeLog:

PR tree-optimization/98772
* optabs-tree.c (supportable_half_widening_operation): New function
to check for supportable V8QI->V8HI widening patterns.
* optabs-tree.h (supportable_half_widening_operation): New function.
* tree-vect-stmts.c (vect_create_half_widening_stmts): New function
to create promotion stmts for V8QI->V8HI widening patterns.
(vectorizable_conversion): Add case for V8QI->V8HI.

gcc/testsuite/ChangeLog:

PR tree-optimization/98772
* gcc.target/aarch64/pr98772.c: New test.
gcc/optabs-tree.c
gcc/optabs-tree.h
gcc/testsuite/gcc.target/aarch64/pr98772.c [new file with mode: 0644]
gcc/tree-vect-stmts.c