qimode_for_vec_perm
commit2fda2c81798b91250ec0d2c8de21a23213a1043b
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Jan 2018 18:25:45 +0000 (2 18:25 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Jan 2018 18:25:45 +0000 (2 18:25 +0000)
tree97ee41fba95472080036586c5de1b5d4ed707397
parentf99a1f604a5f010ce77dd0449f82694d9ef5600d
qimode_for_vec_perm

The vec_perm code falls back to doing byte-level permutes if
element-level permutes aren't supported.  There were two copies
of the code to calculate the mode, and later patches add another,
so this patch splits it out into a helper function.

2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* optabs-query.h (qimode_for_vec_perm): Declare.
* optabs-query.c (can_vec_perm_p): Split out qimode search to...
(qimode_for_vec_perm): ...this new function.
* optabs.c (expand_vec_perm): Use qimode_for_vec_perm.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256089 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/optabs-query.c
gcc/optabs-query.h
gcc/optabs.c