From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9E4A03857400; Mon, 13 Feb 2023 20:37:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9E4A03857400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676320657; bh=UCS9fuf6nowJeM3TvESRoH/ewdnVFyo/Eo0+X8Rs718=; h=From:To:Subject:Date:In-Reply-To:References:From; b=xej6+g1mc5sj/SCqNDx//SAZ5v7mb9IdBAyD2WR70hNzAa8PiEAKg4kottx5gN/o1 iQS8UhNoSvT9x5hhXzt+XaowrfIU+VyVX2lpQuWQk6Oe3ZxOxkKtghOuxHGhGqWnRA s4U0DzoFlOYKE7s24XJzocK4UaAPvG2jAaqV3Sp8= From: "chip.kerchner at ibm dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/108757] We do not simplify (a - (N*M)) / N + M -> a / N Date: Mon, 13 Feb 2023 20:37:37 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: chip.kerchner at ibm dot com 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 #16 from Chip Kerchner --- Dang copy and paste issue... This is what I meant. unsigned long int foo (unsigned long int a) { return (a + (N*M)) / N - M; }=