]> git.ipfire.org Git - thirdparty/gcc.git/commit
LoongArch: NFC: Simplify logic of vec_perm{v32qi,v16hi}
authorXi Ruoyao <xry111@xry111.site>
Sun, 16 Nov 2025 11:57:35 +0000 (19:57 +0800)
committerXi Ruoyao <xry111@xry111.site>
Thu, 20 Nov 2025 07:24:16 +0000 (15:24 +0800)
commit53194a7bb0b60f0f37cdc69f76a339304bb1125b
tree5439565052752af48f0f41c8b463113e0066a60b
parent6641aaa9ad5d5b3b597935b715b00e526235a852
LoongArch: NFC: Simplify logic of vec_perm{v32qi,v16hi}

De-duplicate the login by introducing gen_lasx_xvpermi_d (mode, ...)
with "@".  Also remove the merge_two label: we should really not (ab)use
goto when avoiding it is trivial.

Link: https://dl.acm.org/doi/10.5555/1241515.1241518
gcc/

* config/loongarch/lasx.md (lasx_xvpermi_d): Add "@".
* config/loongarch/loongarch.cc (loongarch_expand_vec_perm_1):
Use gen_lasx_xvpermi_d instead of
gen_lasx_xvpermi_d_{v32qi,v16hi} to deduplicate the logic.  Do
structrual programming instead of goto and label.
gcc/config/loongarch/lasx.md
gcc/config/loongarch/loongarch.cc