From patchwork Tue Aug 27 18:11:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 270180 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "www.sourceware.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by ozlabs.org (Postfix) with ESMTPS id F0FF42C00D0 for ; Wed, 28 Aug 2013 04:12:09 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; q=dns; s=default; b=V0YXTAY9DEtAHv1DOx aQJdFAGsHGrD782DRHQLpKej/ABf/SQUzBNpYkuMTvNuPezXSSsRO40pEWxfJX4X Q/9Srk2MSIvesu0SDwulDlhPXUXMf0jrGjqEYhFFmIvmsTVfzX1gGBo/dWyLlmPw 0iW88b7lXH/46Bsx8lUraWDhg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; s=default; bh=atXYzHJ3aDqBecVAY7bLlnNW Nks=; b=YqLyee2cIAeGQaDc8xw0ZHWtUjd4fo04WriXbgnXPq88yK+JukxEEw+y 77+w3dhKXtvmP7pT4vNWNSqNcW5NG/v51uXlnu61k5OJW0L4zQk2JsIY+cyiERH0 0tN1sUOjplTr9GJ8f4hAZ6nxMpniDcHea/CcSz2tvnCfZ27HfsM= Received: (qmail 10160 invoked by alias); 27 Aug 2013 18:12:02 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 10151 invoked by uid 89); 27 Aug 2013 18:12:02 -0000 Received: from mail-ob0-f175.google.com (HELO mail-ob0-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 27 Aug 2013 18:12:02 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=BAYES_00, FREEMAIL_FROM, KHOP_THREADED, NO_RELAYS autolearn=ham version=3.3.2 X-HELO: mail-ob0-f175.google.com Received: by mail-ob0-f175.google.com with SMTP id xn12so5243898obc.20 for ; Tue, 27 Aug 2013 11:11:59 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.60.173.145 with SMTP id bk17mr2380330oec.64.1377627119712; Tue, 27 Aug 2013 11:11:59 -0700 (PDT) Received: by 10.76.174.70 with HTTP; Tue, 27 Aug 2013 11:11:59 -0700 (PDT) In-Reply-To: References: Date: Tue, 27 Aug 2013 11:11:59 -0700 Message-ID: Subject: Re: [PATCH, i386] PR 57927: -march=core-avx2 different than -march=native on INTEL Haswell (i7-4700K) From: "H.J. Lu" To: Uros Bizjak Cc: "gcc-patches@gcc.gnu.org" , Christian Widmer On Tue, Aug 27, 2013 at 10:41 AM, Uros Bizjak wrote: > On Tue, Aug 27, 2013 at 7:36 PM, H.J. Lu wrote: > >>>> As reported in [1] the host processor detection has not yet been updated >>>> to recognize Intel Ivy Bridge and Haswell processors. >>>> This small patch adds the detection of these processors and assumes >>>> core-avx2 as march for unknown processors of the PENTIUMPRO family that >>>> support AVX2. >>> >>> I have committed slightly improved (attached) patch that uses >>> core-avx-i for IvyBridge and adds another IvyBridge model number. >>> While there, I also reordered a bunch of statements. >>> >>> Thanks, >>> Uros. >> >> Page C-3 in ntel optimization guide shows: >> >> 06_3CH, 06_45H, 06_46H Intel microarchitecture Haswell >> 06_3AH, 06_3EH Intel microarchitecture Ivy Bridge >> 06_2AH, 06_2DH Intel microarchitecture Sandy Bridge >> 06_25H, 06_2CH, 06_2FH Intel microarchitecture Westmere >> 06_1AH, 06_1EH, 06_1FH, Intel microarchitecture Nehalem >> 06_2EH >> 06_17H, 06_1DH Enhanced Intel Core microarchitecture >> 06_0FH Intel Core microarchitecture >> >> At least, we should add 0x45 and 0x46 to Haswell. > > OK, the patch is pre-approved. > This is what I checked in. Thanks. diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9698dc9..54a4cf9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-08-27 H.J. Lu + + * config/i386/driver-i386.c (host_detect_local_cpu): Update + Haswell processor detection. + 2013-08-27 Christian Widmer PR target/57927 diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-i386.c index 001d12f..4cb9907 100644 --- a/gcc/config/i386/driver-i386.c +++ b/gcc/config/i386/driver-i386.c @@ -673,6 +673,8 @@ const char *host_detect_local_cpu (int argc, const char **argv) cpu = "core-avx-i"; break; case 0x3c: + case 0x45: + case 0x46: /* Haswell. */ cpu = "core-avx2";