]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Disable unsupported vsext/vzext patterns for XTheadVector.
authorJin Ma <jinma@linux.alibaba.com>
Mon, 7 Apr 2025 06:21:50 +0000 (14:21 +0800)
committerJin Ma <jinma@linux.alibaba.com>
Thu, 10 Apr 2025 11:22:00 +0000 (19:22 +0800)
commit51e041a9db714215d310bf69969de7b6f1c7c2bf
tree69391bc3f0704aa58df93280dbfc4a8bfc04bb9a
parentf2e2e255004dc35beef9d8b5800d69d228f7eec1
RISC-V: Disable unsupported vsext/vzext patterns for XTheadVector.

XThreadVector does not support the vsext/vzext instructions; however,
due to the reuse of RVV optimizations, it may generate these instructions
in certain cases. To prevent the error "Unknown opcode 'th.vsext.vf2',"
we should disable these patterns.

V2:
Change the value of dg-do in the test case from assemble to compile, and
remove the -save-temps option.

gcc/ChangeLog:

* config/riscv/vector.md: Disable vsext/vzext for XTheadVector.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/xtheadvector/vsext.c: New test.
* gcc.target/riscv/rvv/xtheadvector/vzext.c: New test.

(cherry picked from commit 196b45caca0aae57a95bffcdd5c188994317de08)
gcc/config/riscv/vector.md
gcc/testsuite/gcc.target/riscv/rvv/xtheadvector/vsext.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/xtheadvector/vzext.c [new file with mode: 0644]