From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 110C93858C5E; Mon, 20 Mar 2023 13:00:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 110C93858C5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679317242; bh=7iBDlawampdLvVg1oh/tzrn3C3a7QnuR86cjlexXy6c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=KV1wR5y45HBFr0t/cChCkUYvdBJPQmPP8aEitnlT1LYDMSzPQJFJCEVCTqKlcLuX9 NJ8smiN97DVYbVTdojoIQlHjT9fFlycnrhluur2P9tz4bAiYvMEHMmQoIQuYD6v1ZJ QYCPaJ+OCTrhf3ktiw7SdSTQfViT37ZkEhf1e+HU= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109184] [10/11/12/13 Regression] csmith: 2017 bug with -floop-interchange Date: Mon, 20 Mar 2023 13:00:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.5 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=3D109184 --- Comment #11 from Richard Biener --- Fails even with -O2 -floop-interchange -fno-move-loop-stores (otherwise we complicate the IL by applying store-motion to g_1731). (compute_affine_dependence ref_a: l_1930[k_33], stmt_a: _1 =3D l_1930[k_33]; ref_b: g_1731[_51], stmt_b: g_1731[_51] =3D _5; ) -> no dependence (compute_affine_dependence ref_a: l_1930[k_33], stmt_a: l_1930[k_33] =3D _2; ref_b: g_1731[_51], stmt_b: _4 =3D g_1731[_51]; ) -> no dependence (compute_affine_dependence ref_a: l_1930[k_33], stmt_a: l_1930[k_33] =3D _2; ref_b: g_1731[_51], stmt_b: g_1731[_51] =3D _5; ) -> no dependence maybe I'm missing something but we seem to fail to honor dependences from SSA edges? [local count: 894749066]: # k_33 =3D PHI # ivtmp_41 =3D PHI _1 =3D l_1930[k_33]; _2 =3D _1 + 18446744073709551615; l_1930[k_33] =3D _2; _4 =3D g_1731[_51]; _38 =3D _2 & _4; _5 =3D _38 & 38; g_1731[_51] =3D _5; k_24 =3D k_33 + 1; ivtmp_40 =3D ivtmp_41 - 1; if (ivtmp_40 !=3D 0) Of course DDR_ARE_DEPENDENT (ddr) =3D=3D chrec_known just tells us there's = no memory dependece. As said, maybe I'm missing something ...=