From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11228 invoked by alias); 15 Oct 2013 07:06:50 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 11184 invoked by uid 48); 15 Oct 2013 07:06:47 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/58727] Sub-optimal code for bit clear/set sequence Date: Tue, 15 Oct 2013 07:06:00 -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: 4.9.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: minor X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW 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: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-10/txt/msg00858.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58727 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #5 from Jakub Jelinek --- I guess once we move (or duplicate) this optimization to be performed at GIMPLE in some pass (gimple_fold, forwprop, something else), perhaps after IPA we could add some target hook how expensive a constant is and we could try different variants and see what would be cheapest. Without that what GCC does now is right, generally for most targets the fewer bits set in a constant the better if the target cares at all.