From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19505 invoked by alias); 14 Nov 2012 22:19:14 -0000 Received: (qmail 19082 invoked by uid 48); 14 Nov 2012 22:18:56 -0000 From: "hubicka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/53346] [4.6/4.7/4.8 Regression] Bad vectorization in the proc cptrf2 of rnflow.f90 Date: Wed, 14 Nov 2012 22:19:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2012-11/txt/msg01305.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53346 Jan Hubicka changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org --- Comment #21 from Jan Hubicka 2012-11-14 22:18:53 UTC --- Well, as I wrote to the other PR, the main problem of cmov is extension of dependency chain. For well predicted sequence with conditional jump there is no update of rbs so the loop executes faster, because the loads/stores/comparisons executes "in parallel". The load in the next iteration can then happen speculatively before the condition from previous iteration is resolved. With cmov in it, there is dependence on rbx for all the other computations in the loop. I guess there is no localy available information suggesting suggesting that the particular branch is well predictable, at least without profile feedback (where we won't disable the conversion anyway). I wonder 1) why the conversion to cmov do not happen on RTL if conversion pass 2) whether we can do something to detect similar patterns and possibly disable cmovs on them...