From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D93EC3858D28; Sat, 6 May 2023 20:20:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D93EC3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683404435; bh=w/s875tOONS2HW7xl7HSn8CqBdq5nYFbIoNn8MeltOU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=i10RObtK0fWSYNMc5x8h+k73KzMBpHSgw1mLFq/rxlFqt+bB8eWkBSgSBDRx+Nno1 tUhW69gDNEA9bpe0VEGG7dEYpP+uJ1cWXPwIhSrWq1mU1xnSp/xUPXoO+u/LLriU/x W7Uubyc97QJh7pmTjkEYw9cXfAVVOqtdtY4tqyO8= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/79119] absolute value of a pointer difference can be assumed to be less than or equal to PTRDIFF_MAX Date: Sat, 06 May 2023 20:20:35 +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: 7.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: 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: see_also 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=3D79119 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=3D94274 --- Comment #5 from Andrew Pinski --- (In reply to Andrew Pinski from comment #3) > So a couple of things need to happen really: > optimized now: > if (p_10 < q_12) > goto ; [50.00%] > else > goto ; [50.00%] >=20 > [local count: 536870913]: > _3 =3D _22 - _21; > _4 =3D _3 /[ex] 4; > iftmp.0_14 =3D (long unsigned int) _4; > goto ; [100.00%] >=20 > [local count: 536870913]: > _5 =3D _21 - _22; > _6 =3D _5 /[ex] 4; > iftmp.0_13 =3D (long unsigned int) _6; >=20 > [local count: 1073741824]: > # iftmp.0_7 =3D PHI Most of that is PR 94274 .=