From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128886 invoked by alias); 18 Jun 2015 16:27:54 -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 128842 invoked by uid 48); 18 Jun 2015 16:27:49 -0000 From: "jmcguiness at liquidcapital dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/66584] gcc differs in static, branch-prediction cost from icc in switch. Date: Thu, 18 Jun 2015 16:27:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jmcguiness at liquidcapital dot com X-Bugzilla-Status: REOPENED 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: 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: 2015-06/txt/msg01666.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66584 --- Comment #8 from Jason McG --- (In reply to Andrew Pinski from comment #6) ... > compiler developer. This is the first time I have seen a non-compiler > developer care about documenting gcc heuristics. Note there is no one paper. ... See comment 5. The documentation I am proposing is pretty trivial, I repeat: "code generation for switch statements may not follow a top-down approach nor prefer the default case (if it exists) in terms of static branch-prediction. The __builtin_expected() intrinsic has no effect". I find it had to understand how that documentation could be considered contentious.