]> git.ipfire.org Git - thirdparty/gcc.git/commit
LoongArch: Fix bugs in insn patterns lasx_xvrepl128vei_b/h/w/d_internal
authorGuo Jie <guojie@loongson.cn>
Mon, 30 Dec 2024 02:37:57 +0000 (10:37 +0800)
committerLulu Cheng <chenglulu@loongson.cn>
Thu, 2 Jan 2025 01:29:02 +0000 (09:29 +0800)
commit18d3b87b17fd6157e3aff64099a5bf84ea5f82f3
treec04a3207f12b0d19fa96cbc5835e4ba93ea1de62
parent693a5e6ae83f8606a5af674e18166060cd6a2e0c
LoongArch: Fix bugs in insn patterns lasx_xvrepl128vei_b/h/w/d_internal

There are two aspects that affect the matching of instruction templates:

1. vec_duplicate is redundant in the following operations.
    set (match_operand:V4DI ...)
(vec_duplicate:V4DI (vec_select:V4DI ...))

2. The range of values for testing predicate const_8_to_15_operand and
const_16_to_31_operand should be [8, 15] and [16, 31] respectively.

However, there is currently no suitable testcase to verify.

gcc/ChangeLog:

* config/loongarch/lasx.md: Remove useless vec_select.
* config/loongarch/predicates.md: Correct error predicate.
gcc/config/loongarch/lasx.md
gcc/config/loongarch/predicates.md