From patchwork Wed Sep 18 18:06:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 1164174 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-509225-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="llGSp5Fu"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="AjDAPKtd"; dkim-atps=neutral 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 46YSc14KwTz9sN1 for ; Thu, 19 Sep 2019 04:06:57 +1000 (AEST) 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:from:date:message-id:subject:to:content-type; q= dns; s=default; b=LotO7Zy2bUJDg6BYZC4RwThzN9I6KFP4t5c4aQPKs9ZLKs AtFBpl1tDB44MReFL8+iy6q3OFD1Z9jAH3p98IgU3Dg0MUc7NaYwB2Z0nLYFV1xc GDoBd/R8YN0/lP627pDNYi5BKG/0oCTIdnJrQn+s7b/E1dWalVkJU7uox2QKo= 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:from:date:message-id:subject:to:content-type; s= default; bh=LqnBNSHjyik4IPWIjgqdQFUc/5g=; b=llGSp5Fufjm35K3gmFMs y+nhw/lTu8qjuLfr8yuy1oxZUFpW+e1dF4lM3iu1CA8G0quFfbtOk1cQetXpf3lT JsTrH+Qb8aOn+olJn3PQG2CdFVEjLZR09kqk81cSEPNKigUZwbX6XXgD06FduWs1 Evv1jz5N+g2rtpig7FPkA+Y= Received: (qmail 118711 invoked by alias); 18 Sep 2019 18:06:50 -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 118698 invoked by uid 89); 18 Sep 2019 18:06:50 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.4 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=uf, HX-Languages-Length:2451 X-HELO: mail-oi1-f180.google.com Received: from mail-oi1-f180.google.com (HELO mail-oi1-f180.google.com) (209.85.167.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Sep 2019 18:06:49 +0000 Received: by mail-oi1-f180.google.com with SMTP id 7so420861oip.5 for ; Wed, 18 Sep 2019 11:06:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=+fzwKmQ1z7zsNSIA3PPLcvmh3d7A3lB1qDm+LKK+/Bg=; b=AjDAPKtd8Y6KbjtBHY4G0zPCN+PbfOs9lJkcvWaGcsF5ZMabcKH4+RcQ/nq7z3O6Jg z2yhDmolsdoCZfccfCJl3GQnBlfNcnzfatt6U5fhzwUNRwwOW9somO2PipluFahhjNrr M1Fp9XsgKwQZGPJrA1tMX1LUv0MMtCCYn0qLD29/3XdGnBy8Q69a6QhEFEEgGZxnCLg/ zFcu+0BEYk82iJVyBENG2PBNI/prhELPIiKW9h1/Us9LacXEjumexPd6Bbp3hdUIlpPB ON45n9Fv4SoRsfmzQKWS6Z2Q4qmJ1eHBlD4EhdakpbZaFm09rcuY93TkH3/x981qSeV4 FV9g== MIME-Version: 1.0 From: "H.J. Lu" Date: Wed, 18 Sep 2019 11:06:11 -0700 Message-ID: Subject: [PATCH] i386: Restore Skylake SImode hard register store cost To: GCC Patches , Uros Bizjak X-IsSubscribed: yes On Skylake, we should move integer register to SSE register without going through memory. This patch restores Skylake SImode hard register store cost to 6. gcc/ PR target/90878 * config/i386/x86-tune-costs.h (skylake_cost): Restore SImode hard register store cost to 6. gcc/testsuite/ PR target/90878 * gcc.target/i386/pr90878.c: New test. OK for trunk? Thanks. From 827748528f5418fb3d28d4f023bd158e7951d33c Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 14 Aug 2019 19:42:52 -0700 Subject: [PATCH] i386: Restore Skylake SImode hard register store cost On Skylake, we should move integer register to SSE register without going through memory. This patch restores Skylake SImode hard register store cost to 6. gcc/ PR target/90878 * config/i386/x86-tune-costs.h (skylake_cost): Restore SImode hard register store cost to 6. gcc/testsuite/ PR target/90878 * gcc.target/i386/pr90878.c: New test. --- gcc/config/i386/x86-tune-costs.h | 2 +- gcc/testsuite/gcc.target/i386/pr90878.c | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr90878.c diff --git a/gcc/config/i386/x86-tune-costs.h b/gcc/config/i386/x86-tune-costs.h index 00edece3eb68..7a2c7c55b4cc 100644 --- a/gcc/config/i386/x86-tune-costs.h +++ b/gcc/config/i386/x86-tune-costs.h @@ -1594,7 +1594,7 @@ struct processor_costs skylake_cost = { {4, 4, 4}, /* cost of loading integer registers in QImode, HImode and SImode. Relative to reg-reg move (2). */ - {6, 6, 3}, /* cost of storing integer registers */ + {6, 6, 6}, /* cost of storing integer registers */ 2, /* cost of reg,reg fld/fst */ {6, 6, 8}, /* cost of loading fp registers in SFmode, DFmode and XFmode */ diff --git a/gcc/testsuite/gcc.target/i386/pr90878.c b/gcc/testsuite/gcc.target/i386/pr90878.c new file mode 100644 index 000000000000..18dd64bdaa7a --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr90878.c @@ -0,0 +1,25 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -march=skylake" } */ + +union ieee754_float + { + float f; + + struct + { + unsigned int mantissa:23; + unsigned int exponent:8; + unsigned int negative:1; + } ieee; +}; + +double +foo (float f) +{ + union ieee754_float u; + u.f = f; + u.ieee.negative = 0; + return u.f; +} + +/* { dg-final { scan-assembler-not "vcvtss2sd\[^\\n\]*\\\(%.sp\\\)" } } */ -- 2.20.1