On Tue, 2023-11-28 at 15:39 +0800, Li Wei wrote: > For vector constant extract-{even/odd} permutation replace the default > [x]vshuf instruction combination with [x]vilv{l/h} instruction, which > can reduce instructions and improves performance. > > gcc/ChangeLog: > > * config/loongarch/loongarch.cc > (loongarch_is_odd_extraction): > Supplementary function prototype. ^^ These two white spaces should be removed. And I'd suggest "New forward declaration".
Otherwise LGTM. > (loongarch_is_even_extraction): Adjust. > (loongarch_try_expand_lsx_vshuf_const): Adjust. > (loongarch_is_extraction_permutation): Adjust. > (loongarch_expand_vec_perm_const_2): Adjust. > > gcc/testsuite/ChangeLog: > > * gcc.target/loongarch/lasx-extract-even_odd-opt.c: New test. -- Xi Ruoyao <xry...@xry111.site> School of Aerospace Science and Technology, Xidian University