]> 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>
Tue, 8 Apr 2025 02:13:52 +0000 (10:13 +0800)
commit196b45caca0aae57a95bffcdd5c188994317de08
tree2f73cc18b68cb67e00f60e40593095cefa3b4b5d
parent0980a6ff7ae318e4310be717327ee08b5ed914d0
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.
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]