]> git.ipfire.org Git - thirdparty/gcc.git/commit
autovectorizer: Add basic support for convert optabs
authorVictor Do Nascimento <victor.donascimento@arm.com>
Wed, 22 May 2024 09:06:57 +0000 (10:06 +0100)
committerVictor Do Nascimento <victor.donascimento@arm.com>
Mon, 30 Sep 2024 14:59:42 +0000 (15:59 +0100)
commitc7fba0e96641e57164fc72bdbffd9a1cea244818
treefecce3d409cf91ec05492fead19b7fc5dcb2938d
parent2f68d69e47b5b627c6bb71a6bb3d7b2e0e641b2f
autovectorizer: Add basic support for convert optabs

Given the shift from modeling dot products as direct optabs to
treating them as conversion optabs, we make necessary changes to the
autovectorizer code to ensure that given the relevant tree code,
together with the input and output data modes, we can retrieve the
relevant optab and subsequently the insn_code for it.

gcc/ChangeLog:

* gimple-match-exports.cc (directly_supported_p): Add overload
for conversion-type optabs.
* gimple-match.h (directly_supported_p): Add new function
prototype.
* optabs.cc (expand_widen_pattern_expr): Make the
DOT_PROD_EXPR tree code use `find_widening_optab_handler' to
retrieve icode.
* tree-vect-loop.cc (vect_is_emulated_mixed_dot_prod): make it
call conversion-type overloaded `directly_supported_p'.
* tree-vect-patterns.cc (vect_supportable_conv_optab_p): New.
(vect_recog_dot_prod_pattern): s/direct/conv/ in call to
`vect_supportable_direct_optab_p'.
gcc/gimple-match-exports.cc
gcc/gimple-match.h
gcc/optabs.cc
gcc/tree-vect-loop.cc
gcc/tree-vect-patterns.cc