]> git.ipfire.org Git - thirdparty/gcc.git/commit
LoongArch: Improve lasx_xvpermi_q_<LASX:mode> insn pattern
authorJiahao Xu <xujiahao@loongson.cn>
Fri, 5 Jan 2024 07:37:13 +0000 (15:37 +0800)
committerLulu Cheng <chenglulu@loongson.cn>
Sat, 6 Jan 2024 07:50:20 +0000 (15:50 +0800)
commit7b158e036a95b1ab40793dd53bed7dbd770ffdaf
tree6616e276777c61c055b3a034ac4b9bf7c808bac6
parent6cf47447f6fba84a17864fc7a19a532a62b6e736
LoongArch: Improve lasx_xvpermi_q_<LASX:mode> insn pattern

For instruction xvpermi.q, unused bits in operands[3] need be set to 0 to avoid
causing undefined behavior on LA464.

gcc/ChangeLog:

* config/loongarch/lasx.md: Set the unused bits in operand[3] to 0.

gcc/testsuite/ChangeLog:

* gcc.target/loongarch/vector/lasx/lasx-xvpremi.c: Removed.
* gcc.target/loongarch/vector/lasx/lasx-xvpermi_q.c: New test.
gcc/config/loongarch/lasx.md
gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvpermi_q.c [new file with mode: 0644]
gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvpremi.c [deleted file]