From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2E0063870924; Wed, 5 Aug 2020 12:24:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2E0063870924 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1596630244; bh=bfOdyRNBqtqAhbhBMsgnPHjcpQfe1i8zJ82airJeCCQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=dbYJ5bcWfZ201rh5xwzEEgVn0yPbd5RL0Dk1c0JxlW0TqSWi/B2uKhtws//1h5N/N 239FcUpOdagL55X8zVeEX1bYBCNY18rE6C5b5ZbgMkG8KaiEzDExSUzew3Zbia5GfG BP1frXxhmxL4jwvzbokA2JUs0eBtSxdZT1k4Bdnw= From: "matz at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/96373] SVE miscompilation on vectorized division loop, leading to FP exception Date: Wed, 05 Aug 2020 12:24:03 +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: 10.2.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: matz at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rsandifo 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Aug 2020 12:24:04 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96373 --- Comment #10 from Michael Matz --- (In reply to Andreas Schwab from comment #5) > > Just note that _all_ floating point operations, not just divisions, can= trap > > (without fast-math). You never know if the user enabled stops for any = of > > the FP exceptions (overflow, underflow, inexact, invalid op, div-by-zer= o).=20 >=20 > You need #pragma STDC FENV_ACCESS ON for that, otherwise it's undefined > behaviour. Sure, that's for operations that occur due to normal abstract machine evaluations. The point here is that we introduce operations that aren't in= the original program (for the testcase on "array elements" after [10]), and if we do so those must be unobservable. These pragmas don't give license to introduce additi= onal faults that can't possibly have happened in the abstract machine. (To see this, replace all arrays elements by 1.0, then the FP operations are all ex= act, we still get SIGFPE).=