From: Robin Dapp Date: Tue, 15 Aug 2023 15:15:58 +0000 (+0200) Subject: RISC-V: Fix reduc_strict_run-1 test case. X-Git-Tag: basepoints/gcc-15~6694 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c3146ce0ee14bc6747fb92947879d82d43f3bb2;p=thirdparty%2Fgcc.git RISC-V: Fix reduc_strict_run-1 test case. This patch fixes the reduc_strict_run-1 testcase by introducing a variable that holds the reference result. This is necessary because in presence of _Float16 emulation an intermediate result used in a comparison is computed in higher precision. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/reduc/reduc_strict_run-1.c: Add variable to hold reference result. --- diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/reduc/reduc_strict_run-1.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/reduc/reduc_strict_run-1.c index 516be97e9eb5..39c36ef6307b 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/reduc/reduc_strict_run-1.c +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/reduc/reduc_strict_run-1.c @@ -17,7 +17,8 @@ asm volatile ("" ::: "memory"); \ } \ TYPE res = reduc_plus_##TYPE (a, b); \ - if (res != r * q) \ + TYPE ref = r * q; \ + if (res != ref) \ __builtin_abort (); \ }