From patchwork Tue Oct 19 20:23:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 68378 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]) by ozlabs.org (Postfix) with SMTP id D2538B70CD for ; Wed, 20 Oct 2010 07:23:22 +1100 (EST) Received: (qmail 31424 invoked by alias); 19 Oct 2010 20:23:20 -0000 Received: (qmail 31414 invoked by uid 22791); 19 Oct 2010 20:23:20 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL, BAYES_00, NO_DNS_FOR_FROM, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga14.intel.com (HELO mga14.intel.com) (143.182.124.37) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 19 Oct 2010 20:23:16 +0000 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 19 Oct 2010 13:23:14 -0700 X-ExtLoop1: 1 Received: from gnu-6.sc.intel.com ([10.3.194.135]) by azsmga001.ch.intel.com with ESMTP; 19 Oct 2010 13:23:14 -0700 Received: by gnu-6.sc.intel.com (Postfix, from userid 500) id F3F3E20E62; Tue, 19 Oct 2010 13:23:13 -0700 (PDT) Date: Tue, 19 Oct 2010 13:23:13 -0700 From: "H.J. Lu" To: gcc-patches@gcc.gnu.org Cc: Richard Henderson , Uros Bizjak Subject: PATCH: Update -march=native for Cora e2 and Core i7 Message-ID: <20101019202313.GA18638@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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 After this patch: http://gcc.gnu.org/ml/gcc-patches/2010-10/msg01616.html is checked in, we can use core2/corei7 for -march=native on Core 2 and Core i7. OK for trunk? Thanks. H.J. --- 2010-10-19 H.J. Lu * config/i386/driver-i386.c (host_detect_local_cpu): Updated for Core 2 and Core i7. diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-i386.c index 8a76857..998214b 100644 --- a/gcc/config/i386/driver-i386.c +++ b/gcc/config/i386/driver-i386.c @@ -554,21 +554,21 @@ const char *host_detect_local_cpu (int argc, const char **argv) case 0x1e: case 0x1f: case 0x2e: - /* FIXME: Optimize for Nehalem. */ - cpu = "core2"; + /* Nehalem. */ + cpu = "corei7"; break; case 0x25: case 0x2f: - /* FIXME: Optimize for Westmere. */ - cpu = "core2"; + /* Westmere. */ + cpu = "corei7"; break; case 0x17: case 0x1d: - /* Penryn. FIXME: -mtune=core2 is slower than -mtune=generic */ + /* Penryn. */ cpu = "core2"; break; case 0x0f: - /* Merom. FIXME: -mtune=core2 is slower than -mtune=generic */ + /* Merom. */ cpu = "core2"; break; default: