From patchwork Tue Mar 8 13:51:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kumar, Venkataramanan" X-Patchwork-Id: 594211 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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id AA7C61402DE for ; Wed, 9 Mar 2016 00:51:30 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=KnkOphrf; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:content-type :content-transfer-encoding:mime-version; q=dns; s=default; b=QAB mvAnw5mWbsVMlYpQpoG9SyF5k+O3D4lrA7p4HxmhZ94tcY1A5wPY6Yqc1hZH6msa qWC1oVGZMPDtJq+JckW2se2+DfX3f0RU1CRQ+IhoKSoIGYr15PgCSGfpfwb6dfPm 2hMnN9YX+q/S7AHnsxBpLRkfWAneSbLFLej2pdto= 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:from :to:cc:subject:date:message-id:content-type :content-transfer-encoding:mime-version; s=default; bh=4W4ziplPe 9Dwy9r7+Potou+YNdA=; b=KnkOphrfTFlg5PBV9STN/WRTG6+H94V4WOKQCr+WG ckkhfbIhqwSMCriIXtSiBDZX+a6Lt2Zk1vbbgWhmjne03EiGiHYpDl2BYTqgpKRP oAWfxqQHhg0TyKM6/qbsd75DvQd0SMWZ/p0HIHsIAzfjrtks2ybelTaUke0pPbyg c8= Received: (qmail 14964 invoked by alias); 8 Mar 2016 13:51:21 -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 14867 invoked by uid 89); 8 Mar 2016 13:51:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=no version=3.3.2 spammy=H*F:D*amd.com, avx2, ptt, HX-HELO:sk:na01-by X-HELO: na01-by2-obe.outbound.protection.outlook.com Received: from mail-by2on0071.outbound.protection.outlook.com (HELO na01-by2-obe.outbound.protection.outlook.com) (207.46.100.71) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA256 encrypted) ESMTPS; Tue, 08 Mar 2016 13:51:10 +0000 Received: from CY1PR1201MB1098.namprd12.prod.outlook.com (10.169.19.14) by CY1PR1201MB1097.namprd12.prod.outlook.com (10.169.19.13) with Microsoft SMTP Server (TLS) id 15.1.427.16; Tue, 8 Mar 2016 13:51:07 +0000 Received: from CY1PR1201MB1098.namprd12.prod.outlook.com ([10.169.19.14]) by CY1PR1201MB1098.namprd12.prod.outlook.com ([10.169.19.14]) with mapi id 15.01.0427.019; Tue, 8 Mar 2016 13:51:06 +0000 From: "Kumar, Venkataramanan" To: "Uros Bizjak (ubizjak@gmail.com)" , "gcc-patches@gcc.gnu.org" CC: "Richard Beiner (richard.guenther@gmail.com)" Subject: [Patch x86_64]: fix order of cost table initialization for -march=znver1. Date: Tue, 8 Mar 2016 13:51:06 +0000 Message-ID: authentication-results: gmail.com; dkim=none (message not signed) header.d=none; gmail.com; dmarc=none action=none header.from=amd.com; x-ms-office365-filtering-correlation-id: 8af6f706-7184-45c3-4b9e-08d34758b2a5 x-microsoft-exchange-diagnostics: 1; CY1PR1201MB1097; 5:S8uKn60P4FngNoWwnFQOVLD4Cu9zx0WuOu2t2t5DNy1s4EynITxBV4ktnD1YsqaRl3JyIedQa7vDimbrko/mJqjRN0VWQrEoryNWMyAXXYsy9EcarnaCklSq4ssQxbWHNBeC8p+3OeQxFhzH/g5dFA==; 24:xRHfj83bTZkY13hT2403Rq1axhbE0IH6sC3kErEHWqcvH4G8/8Jidqf/wNSsCbtFV5olBnZRPtYJIc6H1SwEmQoZGjH0fUXOChPs3ElJHWk=; 20:fEu7rsvJHkHArYe6wOinAEXPDa+QUmaV4UPC2s5pqlHD4PHJIupHFAhQ4iN2+N2gxPXNVyq8nF04N9vF/WFxvxmsGoxbDuh9TeBnsy5BQ3c88LJMfSAI2LgaZHAdNEuDP5yK9gD7D9jNTy9beXfjtjh+Qjh/WmtWSoF1RoHcRSRHNtZIkEdR1NqyIAl/SDNfEPMSz1ZNhIpi3GYhuj+Nlk7sgyO8/jBMmdJR3g/SHaFmryDTX3Atal8cAxePdggm x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR1201MB1097; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:CY1PR1201MB1097; BCL:0; PCL:0; RULEID:; SRVR:CY1PR1201MB1097; x-forefront-prvs: 08756AC3C8 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(377424004)(102836003)(6116002)(3846002)(50986999)(54356999)(2501003)(5001770100001)(5008740100001)(1220700001)(4326007)(586003)(189998001)(2906002)(1096002)(33656002)(2900100001)(5003600100002)(66066001)(86362001)(77096005)(3660700001)(40100003)(19580395003)(76576001)(87936001)(99286002)(81166005)(5002640100001)(74316001)(5004730100002)(19580405001)(229853001)(122556002)(10400500002)(3280700002)(92566002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR1201MB1097; H:CY1PR1201MB1098.namprd12.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2016 13:51:06.6899 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR1201MB1097 X-IsSubscribed: yes Hi Uros, While debugging GCC to see if cost of multiplication for DI mode is set correctly for znver1 target. I found that the order of cost table insertion is wrong for znver1 and it worked because btver2 had same cost for multiply . The patch corrects the mistake I made. 2016-03-08 Venkataramanan Kumar * config/i386/i386.c (processor_target_table): Fix cost table initialization order for znver1. Is it ok for trunk? Regards, Venkat. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 8a026ae..3d67c65 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -2662,9 +2662,9 @@ static const struct ptt processor_target_table[PROCESSOR_max] = {"bdver2", &bdver2_cost, 16, 10, 16, 7, 11}, {"bdver3", &bdver3_cost, 16, 10, 16, 7, 11}, {"bdver4", &bdver4_cost, 16, 10, 16, 7, 11}, - {"znver1", &znver1_cost, 16, 10, 16, 7, 11}, {"btver1", &btver1_cost, 16, 10, 16, 7, 11}, - {"btver2", &btver2_cost, 16, 10, 16, 7, 11} + {"btver2", &btver2_cost, 16, 10, 16, 7, 11}, + {"znver1", &znver1_cost, 16, 10, 16, 7, 11}, }; It passes normal bootstrap and bootstrap with BOOT_CFLAGS="-O2 -g -march=znver1 -mno-clzero -mno-sha " on avx2 target.