From patchwork Mon Jan 21 10:38:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 214069 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 A6C3D2C0079 for ; Mon, 21 Jan 2013 21:38:35 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1359369515; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Date:Message-ID:Subject:From:To:Cc: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=FkBXGoi 3BlPNJUcw4JJk4jugoxs=; b=q47yUq5+1PFiPEPVDNp3H30RgHpXvh8aPcRJiNg gp6SiEAWMMQogoig4GSjF/vDZDj5Y9CHtXNVqdYdAE+t3XNp9HDIBUE3mJ1Oyfc2 t1Hc5PiB4KkfQXBG715b7hUbSSz3YJiTAdzpydXo4yATbTLZS8XAczsdyiMXfJyV 2r5o= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:MIME-Version:X-Received:Received:Date:Message-ID:Subject:From:To:Cc:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=K/6GnI9pmwWovlsKRcddegFvZhP6Rmhnc93icsjCYsoqwBl0J7JD4YZWh9AGL9 lSf0+IjRZD8VZcjghSmRUKaq229dDbQJfE1J52sf0BB3D8mqDXAi9egKtH9Mcfgv Lm6MpxdpI9l/28VqVNWgt6yb7fyR1iTIGq4gBJo7P2nZs=; Received: (qmail 18113 invoked by alias); 21 Jan 2013 10:38:30 -0000 Received: (qmail 18102 invoked by uid 22791); 21 Jan 2013 10:38:28 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, TW_ZJ X-Spam-Check-By: sourceware.org Received: from mail-ob0-f176.google.com (HELO mail-ob0-f176.google.com) (209.85.214.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 21 Jan 2013 10:38:23 +0000 Received: by mail-ob0-f176.google.com with SMTP id un3so5722201obb.35 for ; Mon, 21 Jan 2013 02:38:23 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.182.23.20 with SMTP id i20mr13660833obf.44.1358764703107; Mon, 21 Jan 2013 02:38:23 -0800 (PST) Received: by 10.182.153.201 with HTTP; Mon, 21 Jan 2013 02:38:22 -0800 (PST) Date: Mon, 21 Jan 2013 11:38:22 +0100 Message-ID: Subject: [PATCH,i386] Do not disable fma4 for TARGET_FMA From: Uros Bizjak To: "Ekanathan, Saravanan" Cc: "Kumar, Venkataramanan" , "Gopalasubramanian, Ganesh" , gcc-patches@gcc.gnu.org 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 On Mon, Jan 21, 2013 at 10:28 AM, Ekanathan, Saravanan wrote: 2012-01-21 Uros Bizjak * config/i386/i386.md (enabled): Do not disable fma4 for TARGET_FMA. Bootstrapped and regression tested on x86_64-pc-linux-gnu, also tested by AMD: > Hi Uros, > With your patch on bdver2, CPU2006 and polyhedron generated good instruction mix of FMA and FMA4 instructions. > The % improvement(Geomean difference for scores/runtime) for both benchmarks with the patch is negligible though. > Please go ahead and check in the patch. Committed to mainline SVN. Uros. Index: config/i386/i386.md =================================================================== --- config/i386/i386.md (revision 195330) +++ config/i386/i386.md (working copy) @@ -665,14 +665,8 @@ (eq_attr "isa" "avx2") (symbol_ref "TARGET_AVX2") (eq_attr "isa" "noavx2") (symbol_ref "!TARGET_AVX2") (eq_attr "isa" "bmi2") (symbol_ref "TARGET_BMI2") + (eq_attr "isa" "fma4") (symbol_ref "TARGET_FMA4") (eq_attr "isa" "fma") (symbol_ref "TARGET_FMA") - ;; Fma instruction selection has to be done based on - ;; register pressure. For generating fma4, a cost model - ;; based on register pressure is required. Till then, - ;; fma4 instruction is disabled for targets that implement - ;; both fma and fma4 instruction sets. - (eq_attr "isa" "fma4") - (symbol_ref "TARGET_FMA4 && !TARGET_FMA") ] (const_int 1)))