From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CAF263857C69; Thu, 11 Jan 2024 00:33:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CAF263857C69 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704933188; bh=IjYogrGP+wASFJEEjeKYAfEZRh5JLpIWJgKP51QUefE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hVwIV9NR0zJu0jsOZdcdxXcjIUIOwDsbiRZMsfMjBJaADqUqKQ5DCGH3TwJbhPVtd hXTnfcSFbAP5zKq1ibxI7YnMd8IEFfxTJ0/l1dHn+tNEylSQOEiNrmu4Tt9jrIu0mH Z0XdKxnLVHedbLIbWnatjcdYy6FH/PiJJDwfV3Z0= From: "patrick at rivosinc dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113087] [14] RISC-V rv64gcv vector: Runtime mismatch with rv64gc Date: Thu, 11 Jan 2024 00:33:06 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: patrick at rivosinc dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113087 --- Comment #32 from Patrick O'Neill --- (In reply to JuzheZhong from comment #31) > You are using -Ofast which will have precision issue on floating-point. >=20 > You can reference it: >=20 > https://godbolt.org/z/zzG8xbx95 >=20 > O3 result: 50002896.000000 > Ofast result: 50005000.000000 >=20 > They are different and not correctness issue. >=20 > GCC is same behavior as LLVM. >=20 > More details: > https://github.com/llvm/llvm-project/issues/77044 >=20 > So, to elide the potential floating-point precision confusion, > I suggest you first use -O3 -ftrapping-math to test SPEC. >=20 > Otherwise, it's really hard to locate the real issue. The cam4 failure still appears with: "-O3" "-ftrapping-math" "-mtune=3Dgeneric-ooo" "-march=3Drv64imafdcv_zba_zbb_zbs_zicond_zfa" "-fno-lto" "-ftree-vectorize" "--param=3Driscv-autovec-preference=3Dscalable" I'll keep digging through the harness and finding the remaining flags.=