]> git.ipfire.org Git - thirdparty/gcc.git/commit
LoongArch: Redefine pattern for xvfrecip/vfrecip instructions.
authorJiahao Xu <xujiahao@loongson.cn>
Wed, 6 Dec 2023 07:04:51 +0000 (15:04 +0800)
committerLulu Cheng <chenglulu@loongson.cn>
Fri, 8 Dec 2023 08:29:50 +0000 (16:29 +0800)
commit276c7618bf41bc2f03cf4b22c24b23c8ba29eca4
tree216210864665e6f6b1ea382e5a32255851abb312
parentcd2f1d911c766926c1e690476966d6d0b8089623
LoongArch: Redefine pattern for xvfrecip/vfrecip instructions.

Redefine pattern for [x]vfrecip instructions use rtx code instead of unspec, and enable
[x]vfrecip instructions to be generated during auto-vectorization.

gcc/ChangeLog:

* config/loongarch/lasx.md (lasx_xvfrecip_<flasxfmt>): Renamed to ..
(recip<mode>3): .. this.
* config/loongarch/loongarch-builtins.cc (CODE_FOR_lsx_vfrecip_d): Redefine
to new pattern name.
(CODE_FOR_lsx_vfrecip_s): Ditto.
(CODE_FOR_lasx_xvfrecip_d): Ditto.
(CODE_FOR_lasx_xvfrecip_s): Ditto.
(loongarch_expand_builtin_direct): For the vector recip instructions, construct a
temporary parameter const1_vector.
* config/loongarch/lsx.md (lsx_vfrecip_<flsxfmt>): Renamed to ..
(recip<mode>3): .. this.
* config/loongarch/predicates.md (const_vector_1_operand): New predicate.
gcc/config/loongarch/lasx.md
gcc/config/loongarch/loongarch-builtins.cc
gcc/config/loongarch/lsx.md
gcc/config/loongarch/predicates.md