[2/3][vect] Add widening add, subtract vect patterns
Joel Hutton
Joel.Hutton@arm.com
Thu Nov 12 19:34:54 GMT 2020
Hi all,
This patch adds widening add and widening subtract patterns to tree-vect-patterns.
All 3 patches together bootstrapped and regression tested on aarch64.
gcc/ChangeLog:
2020-11-12 Joel Hutton <joel.hutton@arm.com>
* expr.c (expand_expr_real_2): add widen_add,widen_subtract cases
* optabs-tree.c (optab_for_tree_code): optabs for widening adds,subtracts
* optabs.def (OPTAB_D): define vectorized widen add, subtracts
* tree-cfg.c (verify_gimple_assign_binary): Add case for widening adds, subtracts
* tree-inline.c (estimate_operator_cost): Add case for widening adds, subtracts
* tree-vect-generic.c (expand_vector_operations_1): Add case for widening adds, subtracts
* tree-vect-patterns.c (vect_recog_widen_add_pattern): New recog ptatern
(vect_recog_widen_sub_pattern): New recog pattern
(vect_recog_average_pattern): Update widened add code
(vect_recog_average_pattern): Update widened add code
* tree-vect-stmts.c (vectorizable_conversion): Add case for widened add, subtract
(supportable_widening_operation): Add case for widened add, subtract
* tree.def (WIDEN_ADD_EXPR): New tree code
(WIDEN_SUB_EXPR): New tree code
(VEC_WIDEN_ADD_HI_EXPR): New tree code
(VEC_WIDEN_ADD_LO_EXPR): New tree code
(VEC_WIDEN_SUB_HI_EXPR): New tree code
(VEC_WIDEN_SUB_LO_EXPR): New tree code
gcc/testsuite/ChangeLog:
2020-11-12 Joel Hutton <joel.hutton@arm.com>
* gcc.target/aarch64/vect-widen-add.c: New test.
* gcc.target/aarch64/vect-widen-sub.c: New test.
Ok for trunk?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-vect-Add-widening-add-subtract-patterns.patch
Type: text/x-patch
Size: 17233 bytes
Desc: 0002-vect-Add-widening-add-subtract-patterns.patch
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201112/539d05fb/attachment-0001.bin>
More information about the Gcc-patches
mailing list