From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B62E1385840F; Tue, 10 Oct 2023 18:38:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B62E1385840F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696963135; bh=RV2FjZ30I0QMWqDGaNUf+tC2lY4AcSAj0Wr/buSdIxw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Cldx5srluiTK6K8nLOZ6HjVhVzJdyITusqvXl8VOUX+7sIrMKsQZ/Gpa7JYZ9Yxo7 NS7sKqMl+GvD8cGvfO8HISCSyBD0NJ+TRwyvUSQ5B46PuxLv3FA6UzRVkox0Onvr99 0cQVbNHvTWBTsXE9KlZmCqZ9xJTqb3/gz0m7kJ/I= From: "roger at nextmovesoftware dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/17886] variable rotate and unsigned long long rotate should be better optimized Date: Tue, 10 Oct 2023 18:38:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 4.0.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: roger at nextmovesoftware dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc resolution bug_status 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=3D17886 Roger Sayle changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |roger at nextmovesoftware = dot com Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #27 from Roger Sayle --- I believe that this issue has been fixed (for a long time). For Andi's testcases in comment #3, -fdump-tree-optimized reveals all these cases are perceived as rotations by the early middle-end.=20 long long unsigned int f (long long unsigned int x, int y) { return x_1(D) r<< y_2(D); } unsigned int f2 (unsigned int x, int y) { return x_1(D) r<< y_2(D); } long long unsigned int f3 (long long unsigned int x) { return x_1(D) r>> 55; } long unsigned int f4 (unsigned int x) { return x_1(D) r>> 22; }=