From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8F1053854171; Fri, 21 Oct 2022 19:10:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8F1053854171 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666379437; bh=uTBZy8B7D0GSqzyFI0RLpsrUFTWMwTitKt6U/wnP/ak=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jAPwdidbrZ5VvfY3Xomvt6tA4RaEqWBNXAZfU4NsprAvmoJsd5OdAdRYQ1Q1PAhN5 1JE4IXp9fSzh7a+ucvhPLeDZRucdWp3hLmI7RLfb+TmOc/vNkebEIfYp34Hkql9pDT 3NRYPEcSPaKCMpXSbbFN7Ux2ZpsXp+U4Jx5eRFjo= From: "aldyh at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107342] Optimization opportunity where integer '/' corresponds to '>>' Date: Fri, 21 Oct 2022 19:10:37 +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: aldyh 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: attachments.created 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=3D107342 --- Comment #2 from Aldy Hernandez --- Created attachment 53749 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53749&action=3Dedit untested patch I'm sure somebody smarter could handle other shift amounts that are not pow= ers of 2, but this seems to do the trick for the test case. DOM2 does the threa= ding and DOM3 will remove the second call to foo4b.=