]> git.ipfire.org Git - thirdparty/gcc.git/commit
LoongArch: Use iorn and andn standard pattern names.
authorLulu Cheng <chenglulu@loongson.cn>
Thu, 1 Aug 2024 08:07:25 +0000 (16:07 +0800)
committerLulu Cheng <chenglulu@loongson.cn>
Mon, 12 Aug 2024 01:31:22 +0000 (09:31 +0800)
commit75e852b49fca399b9fd00a9cc943d9366e509711
tree68946716872dc9ec4cc6c96517982eec26cf5e00
parent9f3b5c2314239e1d3b6e1722e676ea1935bc2836
LoongArch: Use iorn and andn standard pattern names.

R15-1890 introduced new optabs iorc and andc, and its corresponding
internal functions BIT_{ANDC,IORC}, and if targets defines such optabs
for vector modes.  And in r15-2258 the iorc and andc were renamed to
iorn and andn.
So we changed the andn and iorn implementation templates to the standard
template names.

gcc/ChangeLog:

* config/loongarch/lasx.md (xvandn<mode>3): Rename to ...
(andn<mode>3): This.
(xvorn<mode>3): Rename to ...
(iorn<mode>3): This.
* config/loongarch/loongarch-builtins.cc
(CODE_FOR_lsx_vandn_v): Defined as the modified name.
(CODE_FOR_lsx_vorn_v): Likewise.
(CODE_FOR_lasx_xvandn_v): Likewise.
(CODE_FOR_lasx_xvorn_v): Likewise.
(loongarch_expand_builtin_insn): When the builtin function to be
called is __builtin_lasx_xvandn or __builtin_lsx_vandn, swap the
two operands.
* config/loongarch/loongarch.md (<optab>n<mode>): Rename to ...
(<optab>n<mode>3): This.
* config/loongarch/lsx.md (vandn<mode>3): Rename to ...
(andn<mode>3): This.
(vorn<mode>3): Rename to ...
(iorn<mode>3): This.

gcc/testsuite/ChangeLog:

* gcc.target/loongarch/lasx-andn-iorn.c: New test.
* gcc.target/loongarch/lsx-andn-iorn.c: New test.
gcc/config/loongarch/lasx.md
gcc/config/loongarch/loongarch-builtins.cc
gcc/config/loongarch/loongarch.md
gcc/config/loongarch/lsx.md
gcc/testsuite/gcc.target/loongarch/lasx-andn-iorn.c [new file with mode: 0644]
gcc/testsuite/gcc.target/loongarch/lsx-andn-iorn.c [new file with mode: 0644]