]> git.ipfire.org Git - thirdparty/gcc.git/commit
LoongArch: testsuite: Fix gcc.dg/vect/vect-reduc-mul_{1, 2}.c FAIL.
authorLi Wei <liwei@loongson.cn>
Fri, 2 Feb 2024 01:42:28 +0000 (09:42 +0800)
committerLulu Cheng <chenglulu@loongson.cn>
Sun, 4 Feb 2024 09:31:16 +0000 (17:31 +0800)
commit8e6ebacc9e3cee0d2053fdaceda0ae052e34b777
tree333e48b02bcc20b4159e9024eed9a0ae0e065082
parent2ada8bc53e1924b805d5a623d7ce79b20c2a9feb
LoongArch: testsuite: Fix gcc.dg/vect/vect-reduc-mul_{1, 2}.c FAIL.

This FAIL was introduced from r14-6908. The reason is that when merging
constant vector permutation implementations, the 128-bit matching situation
was not fully considered. In fact, the expansion of 128-bit vectors after
merging only supports value-based 4 elements set shuffle, so this time is a
complete implementation of the entire 128-bit vector constant permutation,
and some structural adjustments have also been made to the code.

gcc/ChangeLog:

* config/loongarch/loongarch.cc (loongarch_expand_vselect): Adjust.
(loongarch_expand_vselect_vconcat): Ditto.
(loongarch_try_expand_lsx_vshuf_const): New, use vshuf to implement
all 128-bit constant permutation situations.
(loongarch_expand_lsx_shuffle): Adjust and rename function name.
(loongarch_is_imm_set_shuffle): Renamed function name.
(loongarch_expand_vec_perm_even_odd): Function forward declaration.
(loongarch_expand_vec_perm_even_odd_1): Add implement for 128-bit
extract-even and extract-odd permutations.
(loongarch_is_odd_extraction): Delete.
(loongarch_is_even_extraction): Ditto.
(loongarch_expand_vec_perm_const): Adjust.
gcc/config/loongarch/loongarch.cc