From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CFDDC3857C47; Wed, 5 Aug 2020 10:15:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CFDDC3857C47 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1596622526; bh=YuHRXO5wgPOj9hySzOnO/ebbtBfgxAxgKAHP2hy2ZwA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=qhGPgmdzlDlSsJfUZdcyiK0zN8G09nVa3Spx5vKN2G2bhhdgwGfrRPrqGln9DZi5m OkIHiKm/IHApi/4jxUrqlExgzGjhVNyeI0W3KiGYKygMBLaVddAIBmsahfkpPjtMAl dnvIm/IQLl3pa7dkyeYBPBMLxeFq8VybBkwh78hk= From: "rguenther at suse dot de" 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 10:15:26 +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: rguenther at suse dot de 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 10:15:26 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96373 --- Comment #7 from rguenther at suse dot de --- On Wed, 5 Aug 2020, rsandifo at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96373 >=20 > --- Comment #6 from rsandifo at gcc dot gnu.org --- > FWIW, I think the reason I mentioned for skimping on this originally > was that we don't e.g. prevent if-conversion of: >=20 > void > foo (int *c, float *f) > { > for (int i =3D 0; i < 16; ++i) > f[i] =3D c[i] ? __builtin_sqrtf (f[i]) : f[i]; > } >=20 > for -O2 -ftree-vectorize -fno-math-errno. So it seemed like things > weren't very consistent. I think that's a bug in if-conversion - gimple_could_trap_p only says that the call instruction itself doesn't trap, it doesn't say anything about something in the callee body. You should need -fno-trapping-math to get the above if-converted.=