From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3140B383F874; Mon, 27 Apr 2020 07:07:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3140B383F874 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587971272; bh=cNgEAfWZAc3RkSz8XWtUl0hacz6nhvZ0o/bbI2R5/1c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TaaNrmlVbs3/YhQx9BEEfhGhhbaRfnhSVsa92J/5j4zYpSg6wNuqEAy5zehKTmgLK Jncy4bXjG5XYZXElXpYTtnxKVRjAWzAL5/58r7x/evaimWpSHKKuHbJY7fLHQosG4h zvody20sX5x/L6BG8ELXreAXR2m8I4bD4+4OGrdY= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/94782] Simple multiplication-related arithmetic not optimized to direct multiplication Date: Mon, 27 Apr 2020 07:07:52 +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: 10.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: everconfirmed bug_status cf_reconfirmed_on 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: Mon, 27 Apr 2020 07:07:52 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94782 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2020-04-27 --- Comment #1 from Richard Biener --- Since the inner (a - 1U) * b is unsigned but a * b would be signed due to undefined signed overflow we cannot optimize to that. But we could indeed. optimize to (unsigned)a * (unsigned)b. fold-const.c contains related transforms that could be amended. reassoc could as well but would need enhancement for signed arithmetic.=