On 8/16/23 07:50, Robin Dapp wrote:
But if it's a float16 precision issue then I would have expected both the computations for the lhs and rhs values to have suffered similarly.Yeah, right. I didn't look closely enough. The problem is not the reduction but the additional return-value conversion that is omitted when calculating the reference value inline. The attached is simpler and does the trick. Regards Robin Subject: [PATCH v2] RISC-V: Fix reduc_strict_run-1 test case. This patch fixes the reduc_strict_run-1 testcase by converting the reference value to double and back to the tested type. Without that omitted the implicit return-value conversion and would produce a different result for _Float16. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/reduc/reduc_strict_run-1.c: Perform type -> double -> type conversion for reference value.
OK jeff
