]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V: Fix testcase for vector .SAT_SUB in zip benchmark
authorEdwin Lu <ewlu@rivosinc.com>
Fri, 12 Jul 2024 18:31:16 +0000 (11:31 -0700)
committerEdwin Lu <ewlu@rivosinc.com>
Mon, 15 Jul 2024 16:43:46 +0000 (09:43 -0700)
The following testcase was not properly testing anything due to an
uninitialized variable. As a result, the loop was not iterating through
the testing data, but instead on undefined values which could cause an
unexpected abort.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/autovec/binop/vec_sat_binary_vx.h:
initialize variable

Signed-off-by: Edwin Lu <ewlu@rivosinc.com>
gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vec_sat_binary_vx.h

index d238c6392def5b622cb7ac90b5b6e470e3bac106..309d63377d536bb97df1613a961a862a0ec06741 100644 (file)
@@ -9,6 +9,7 @@ main ()
 
   for (i = 0; i < sizeof (DATA) / sizeof (DATA[0]); i++)
     {
+      d = DATA[i];
       RUN_BINARY_VX (&d.x[N], d.b, N);
 
       for (k = 0; k < N; k++)