[testsuite] [riscv] limit vwaddsub-1.c to rv64

The desired vw{add,sub}.wx instructions don't come up on rv32 for the
first two functions, we get v{add,sub}.vx instead.

I suppose this is an oversight, and something about the test is meant
for rv64 only, but the fact that the instruction is spelled out in the
intrinsic name and a different instruction is generated suggests
something may be wrong after all.


I could use a pointer to specs for these intrinsics and instructions to
tell for sure, but a closer look from someone more familiar with them
would definitely be welcome.

Tested on x86_64-linux-gnu native, and gcc-14 target riscv{64,32}-elf.
Ok to install?


for  gcc/testsuite/ChangeLog

        * gcc.target/riscv/rvv/base/vwaddsub-1.c: Require rv64.
---
 .../gcc.target/riscv/rvv/base/vwaddsub-1.c         |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/vwaddsub-1.c 
b/gcc/testsuite/gcc.target/riscv/rvv/base/vwaddsub-1.c
index 6e027a555f377..84d3c4cb4c717 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/base/vwaddsub-1.c
+++ b/gcc/testsuite/gcc.target/riscv/rvv/base/vwaddsub-1.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { ! riscv_abi_e } } } */
+/* { dg-do compile { target { { ! riscv_abi_e } && rv64 } } } */
 /* { dg-add-options riscv_v } */
 /* { dg-additional-options "-std=gnu99 -O3 -fno-schedule-insns 
-fno-schedule-insns2" } */
 


-- 
Alexandre Oliva, happy hacker            https://blog.lx.oliva.nom.br/
Free Software Activist     FSFLA co-founder     GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity.
Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

Reply via email to