From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BF8B33858D35; Mon, 13 Feb 2023 21:01:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BF8B33858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676322083; bh=Nf+IxMzUIkfkbZwaJBQkqzQtCzPOvco9jcqKSjeQxGs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uhl9sGs6IGOOazY52lzFanDPprHc8jWOJ1k7FoF5/cRcmXyex4/VJMHR0WYJkpEMa rPOLhL2gq3JN1afhpioBFQD6O3/WsHTJWkILJ+aG3gY27YERnv2RkaunNEWOAaY8Wo Ua+LaHeJN7xxWKps0gto/e1kLymrcfHWE+iLaex4= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108757] We do not simplify (a - (N*M)) / N + M -> a / N Date: Mon, 13 Feb 2023 21:01:23 +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: 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: 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=3D108757 --- Comment #19 from Andrew Pinski --- Note in the loop case we know it does not wrap because there is a check already: [local count: 118111600]: if (rows_8(D) > 3) goto ; [89.00%] else goto ; [11.00%] [local count: 105119324]: _13 =3D rows_8(D) + 18446744073709551612; _15 =3D _13 / 4; doloop.6_5 =3D _15 + 1;=