From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 78B513858C53; Wed, 10 Jan 2024 23:09:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 78B513858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704928183; bh=/ys5E1ELiTItjw2V5XQhWQYWIfK4d9qseeivl4BQLWo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=thl6bfWTxDB0PGt+yKfDZwHcz9/jIxtTaI4yBkEfZ/Yq4RSDxpeUhMOlXA50/yPgd Rto+395QF4bFuNjNfgzcZdRlLUMbaNK5iCDdjKhwpsD/kZvYCC66sFx+2MIqWBIR/3 xncaeBdh5VWWP6mD2s3wheekCEs0tB5R/4Vt/e7Q= From: "juzhe.zhong at rivai dot ai" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113087] [14] RISC-V rv64gcv vector: Runtime mismatch with rv64gc Date: Wed, 10 Jan 2024 23:09:42 +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: juzhe.zhong at rivai dot ai 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 #31 from JuzheZhong --- (In reply to Patrick O'Neill from comment #30) > (In reply to Li Pan from comment #29) > > Thanks a lot for the summary. Could you please help to share some more > > information about the spec2017 for above data? Like data set (test, tra= in, > > or ref), the enviornment (qemu, spike, or hardware) as well as the spec > > config file. Just would like to make sure we are on the same page for t= he > > failures and reproducible from others. >=20 > Hi Pan, >=20 > We use nix to build/run spec so it's a bit opaque to me but I've extracted > out: > ref data set > qemu > flags: > "-Ofast" > "-mtune=3Dgeneric-ooo" > "-march=3Drv64imafdcv_zba_zbb_zbs_zicond_zfa" > "-fno-lto" > "-ftree-vectorize" > "--param=3Driscv-autovec-preference=3Dscalable" >=20 > There are other flags that are are injected by the nix harness and I'm in > the process of pulling them out. With these flags you should at least see > the cam4 failure. Vineet is looking at the cam4 failure and is planning to > open a bugzilla with details. >=20 > Thanks, > Patrick You are using -Ofast which will have precision issue on floating-point. You can reference it: https://godbolt.org/z/zzG8xbx95 O3 result: 50002896.000000 Ofast result: 50005000.000000 They are different and not correctness issue. GCC is same behavior as LLVM. More details: https://github.com/llvm/llvm-project/issues/77044 So, to elide the potential floating-point precision confusion, I suggest you first use -O3 -ftrapping-math to test SPEC. Otherwise, it's really hard to locate the real issue.=