]> git.ipfire.org Git - thirdparty/gcc.git/commit
LoongArch: Use normal RTL pattern instead of UNSPEC for {x,}vsr{a,l}ri instructions
authorXi Ruoyao <xry111@xry111.site>
Thu, 13 Feb 2025 14:51:31 +0000 (22:51 +0800)
committerXi Ruoyao <xry111@xry111.site>
Wed, 19 Feb 2025 06:34:46 +0000 (14:34 +0800)
commit427386042f056a2910882bf0c632b4db68c52bbb
treedb3b8c138c915c02032073e8d0f424844bb758e2
parentcef5f23adb6f9f052d03286ad8ccf352eefccf86
LoongArch: Use normal RTL pattern instead of UNSPEC for {x,}vsr{a,l}ri instructions

Allowing (t + (1ul << imm >> 1)) >> imm to be recognized as a rounding
shift operation.

gcc/ChangeLog:

* config/loongarch/lasx.md (UNSPEC_LASX_XVSRARI): Remove.
(UNSPEC_LASX_XVSRLRI): Remove.
(lasx_xvsrari_<lsxfmt>): Remove.
(lasx_xvsrlri_<lsxfmt>): Remove.
* config/loongarch/lsx.md (UNSPEC_LSX_VSRARI): Remove.
(UNSPEC_LSX_VSRLRI): Remove.
(lsx_vsrari_<lsxfmt>): Remove.
(lsx_vsrlri_<lsxfmt>): Remove.
* config/loongarch/simd.md (simd_<optab>_imm_round_<mode>): New
define_insn.
(<simd_isa>_<x>v<insn>ri_<simdfmt>): New define_expand.

gcc/testsuite/ChangeLog:

* gcc.target/loongarch/vect-shift-imm-round.c: New test.
gcc/config/loongarch/lasx.md
gcc/config/loongarch/lsx.md
gcc/config/loongarch/simd.md
gcc/testsuite/gcc.target/loongarch/vect-shift-imm-round.c [new file with mode: 0644]